Summary: Because windtunnel quirkloads needs `--json` which is enabled with gflags
Test Plan:
$ wangle-bench --json
{
"%hundredThens" :
28133155.
113220215,
"no_contention" :
4842268655.11322,
"%fourThens" :
1495655.
1132202148,
"%twoThens" : 882311.
3632202148,
"oneThen" : 581053.
5507202148,
"-" : 0,
"%withThen" : 559830.
8944702148,
"%promiseAndFuture" : 250840.
66009521484,
"%contention" :
8074419655.11322,
"constantFuture" : 239916.
83197021484
}
Reviewed By: meisner@fb.com
Subscribers: robbert, net-systems@, fugalh, exa, njormrod, davejwatson, jsedgwick
FB internal diff:
D1601364
Tasks:
5277907
* limitations under the License.
*/
+#include <gflags/gflags.h>
#include <folly/Baton.h>
#include <folly/Benchmark.h>
#include <folly/wangle/Future.h>
using namespace folly::wangle;
using namespace std;
+namespace {
+
template <class T>
T incr(Try<T>&& t) {
return t.value() + 1;
}
}
+} // anonymous namespace
+
BENCHMARK(constantFuture) {
makeFuture(42);
}
producer.join();
}
-int main() {
+int main(int argc, char** argv) {
+ gflags::ParseCommandLineFlags(&argc, &argv, true);
folly::runBenchmarks();
+ return 0;
}