diff --git a/AUTHORS b/AUTHORS index 818dd2ef..2aa19bb0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -16,4 +16,5 @@ Eugene Zhuk Felix Homann Google Inc. Oleksandr Sochka +Shuo Chen Yusuke Suzuki diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9ee150c6..5b735109 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -30,4 +30,5 @@ Eugene Zhuk Felix Homann Oleksandr Sochka Pierre Phaneuf +Shuo Chen Yusuke Suzuki diff --git a/test/benchmark_test.cc b/test/benchmark_test.cc index 7bbc908c..95999c50 100644 --- a/test/benchmark_test.cc +++ b/test/benchmark_test.cc @@ -86,12 +86,13 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10,8<<10, 1,10); template static void BM_Sequential(benchmark::State& state) { - Q q; - typename Q::value_type v; - while (state.KeepRunning()) + typename Q::value_type v = 42; + while (state.KeepRunning()) { + Q q; for (int i = state.range_x(); --i; ) q.push_back(v); - const int64_t items_processed = + } + const int64_t items_processed = static_cast(state.iterations()) * state.range_x(); state.SetItemsProcessed(items_processed); state.SetBytesProcessed(items_processed * sizeof(v));