Commit b692cb2f authored by Hans Fugal's avatar Hans Fugal Committed by Andrii Grynenko

wangle-bench gflags

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
parent d6488e3c
......@@ -14,6 +14,7 @@
* limitations under the License.
*/
#include <gflags/gflags.h>
#include <folly/Baton.h>
#include <folly/Benchmark.h>
#include <folly/wangle/Future.h>
......@@ -24,6 +25,8 @@
using namespace folly::wangle;
using namespace std;
namespace {
template <class T>
T incr(Try<T>&& t) {
return t.value() + 1;
......@@ -36,6 +39,8 @@ void someThens(size_t n) {
}
}
} // anonymous namespace
BENCHMARK(constantFuture) {
makeFuture(42);
}
......@@ -160,6 +165,8 @@ BENCHMARK_RELATIVE(contention) {
producer.join();
}
int main() {
int main(int argc, char** argv) {
gflags::ParseCommandLineFlags(&argc, &argv, true);
folly::runBenchmarks();
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment