projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update CachelinePadded
[folly.git]
/
folly
/
test
/
FBVectorBenchmark.cpp
diff --git
a/folly/test/FBVectorBenchmark.cpp
b/folly/test/FBVectorBenchmark.cpp
index a66eac947342f1346813225938c5848b991ac8b3..ca327cdf0d5917b07979d110a44354e401fe03bb 100644
(file)
--- a/
folly/test/FBVectorBenchmark.cpp
+++ b/
folly/test/FBVectorBenchmark.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
3
Facebook, Inc.
+ * Copyright 201
7
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-17,27
+17,26
@@
//
// Author: andrei.alexandrescu@fb.com
//
// Author: andrei.alexandrescu@fb.com
-#include "folly/Traits.h"
-#include "folly/Random.h"
-#include "folly/FBString.h"
-#include "folly/FBVector.h"
-#include "folly/Benchmark.h"
-
-#include <gflags/gflags.h>
-
-#include <gtest/gtest.h>
#include <list>
#include <memory>
#include <list>
#include <memory>
+
#include <boost/random.hpp>
#include <boost/random.hpp>
+#include <folly/Benchmark.h>
+#include <folly/FBString.h>
+#include <folly/FBVector.h>
+#include <folly/Foreach.h>
+#include <folly/Random.h>
+#include <folly/Traits.h>
+#include <folly/portability/GFlags.h>
+#include <folly/portability/GTest.h>
+
using namespace std;
using namespace folly;
auto static const seed = randomNumberSeed();
typedef boost::mt19937 RandomT;
static RandomT rng(seed);
using namespace std;
using namespace folly;
auto static const seed = randomNumberSeed();
typedef boost::mt19937 RandomT;
static RandomT rng(seed);
-static const size_t maxString = 100;
-static const bool avoidAliasing = true;
template <class Integral1, class Integral2>
Integral2 random(Integral1 low, Integral2 up) {
template <class Integral1, class Integral2>
Integral2 random(Integral1 low, Integral2 up) {
@@
-55,7
+54,7
@@
void randomString(String* toFill, unsigned int maxSize = 1000) {
}
template <class String, class Integral>
}
template <class String, class Integral>
-void Num2String(String& str, Integral
n
) {
+void Num2String(String& str, Integral
/* n */
) {
str.resize(10, '\0');
sprintf(&str[0], "%ul", 10);
str.resize(strlen(str.c_str()));
str.resize(10, '\0');
sprintf(&str[0], "%ul", 10);
str.resize(strlen(str.c_str()));
@@
-93,20
+92,20
@@
typedef vector<folly::fbstring> FBStringVector;
typedef fbvector<folly::fbstring> FBStringFBVector;
#define VECTOR IntVector
typedef fbvector<folly::fbstring> FBStringFBVector;
#define VECTOR IntVector
-#include
"folly/test/FBVectorTestBenchmarks.cpp.h"
+#include
<folly/test/FBVectorTestBenchmarks.cpp.h> // nolint
#undef VECTOR
#define VECTOR IntFBVector
#undef VECTOR
#define VECTOR IntFBVector
-#include
"folly/test/FBVectorTestBenchmarks.cpp.h"
+#include
<folly/test/FBVectorTestBenchmarks.cpp.h> // nolint
#undef VECTOR
#define VECTOR FBStringVector
#undef VECTOR
#define VECTOR FBStringVector
-#include
"folly/test/FBVectorTestBenchmarks.cpp.h"
+#include
<folly/test/FBVectorTestBenchmarks.cpp.h> // nolint
#undef VECTOR
#define VECTOR FBStringFBVector
#undef VECTOR
#define VECTOR FBStringFBVector
-#include
"folly/test/FBVectorTestBenchmarks.cpp.h"
+#include
<folly/test/FBVectorTestBenchmarks.cpp.h> // nolint
#undef VECTOR
int main(int argc, char** argv) {
#undef VECTOR
int main(int argc, char** argv) {
- g
oogle
::ParseCommandLineFlags(&argc, &argv, true);
+ g
flags
::ParseCommandLineFlags(&argc, &argv, true);
folly::runBenchmarks();
return 0;
}
folly::runBenchmarks();
return 0;
}