diff options
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/client.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 23993131cc..a6bd1e4343 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -83,7 +83,8 @@ class Client { ClientStats Mark() { Histogram latencies; - Histogram to_merge[threads_.size()]; // avoid std::vector for old compilers + // avoid std::vector for old compilers + Histogram *to_merge = new Histogram[threads_.size()]; for (size_t i = 0; i < threads_.size(); i++) { threads_[i]->BeginSwap(&to_merge[i]); } @@ -93,6 +94,7 @@ class Client { threads_[i]->EndSwap(); latencies.Merge(&to_merge[i]); } + delete[] to_merge; auto timer_result = timer->Mark(); |