aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-05-09 12:05:11 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2017-05-09 12:05:11 -0700
commit0725d3a4b385f0213a1058037443f5c016b823c4 (patch)
tree84d09a7c08968ae119f7ce177a883aea326a3a8a /test/cpp
parentb6ac9b4573d5f8bc9fbac09482d254b6a7a241b2 (diff)
Run bm resonable number of times
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack_trickle.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
index b0f7b34bb5..db07a553e3 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
@@ -404,15 +404,18 @@ static void BM_PumpUnbalancedUnary_Trickle(benchmark::State& state) {
}
static void UnaryTrickleArgs(benchmark::internal::Benchmark* b) {
- for (int i = 1; i <= 128 * 1024 * 1024; i *= 32) {
- for (int j = 1; j <= 128 * 1024 * 1024; j *= 32) {
- for (int k = 64; k <= 128 * 1024 * 1024; k *= 16) {
- double expected_time =
- static_cast<double>(14 + i + k) / (125.0 * 2 * static_cast<double>(j));
- if (expected_time > 2.0) continue;
- b->Args({i, j, k});
- }
- }
+ const int cli_1024k = 1024 * 1024;
+ const int cli_32M = 32 * 1024 * 1024;
+ const int svr_256k = 256 * 1024;
+ const int svr_4M = 4 * 1024 * 1024;
+ const int svr_64M = 64 * 1024 * 1024;
+ for (int bw = 64; bw <= 128 * 1024 * 1024; bw *= 16) {
+ b->Args({bw, cli_1024k, svr_256k});
+ b->Args({bw, cli_1024k, svr_4M});
+ b->Args({bw, cli_1024k, svr_64M});
+ b->Args({bw, cli_32M, svr_256k});
+ b->Args({bw, cli_32M, svr_4M});
+ b->Args({bw, cli_32M, svr_64M});
}
}
BENCHMARK(BM_PumpUnbalancedUnary_Trickle)->Apply(UnaryTrickleArgs);