aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-08-07 17:21:08 +0000
committerGravatar Vijay Pai <vpai@google.com>2015-08-07 17:21:08 +0000
commitad3e00c22001cbd3a313a9c577bcacad8cf805b0 (patch)
tree396ac44227e80099354c12e70c5030e291024fe1 /test/cpp/qps
parent90e7369484cd2e036c0e4915abf2a641b04b6dc1 (diff)
Stop using a variable-sized array since that's not standards-compliant
Diffstat (limited to 'test/cpp/qps')
-rw-r--r--test/cpp/qps/client.h4
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();