diff options
author | Craig Tiller <ctiller@google.com> | 2016-02-18 07:40:26 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-02-18 07:40:26 -0800 |
commit | 8d8246ecc6407f617e6aac20040e5884b974f8fb (patch) | |
tree | ea363894a9813f3017aaa44641b1455a60829812 /test/cpp/qps/qps_interarrival_test.cc | |
parent | 5a6644602e086ee4c4825c33508e4c67389f246e (diff) | |
parent | 311445fd32956e9383823400c82ce3fcd71b2b31 (diff) |
Merge branch 'cleaner-posix' into cleaner-posix2
Diffstat (limited to 'test/cpp/qps/qps_interarrival_test.cc')
-rw-r--r-- | test/cpp/qps/qps_interarrival_test.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index ccda28f09a..77e81fb84b 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,17 @@ #include "test/cpp/qps/interarrival.h" -using grpc::testing::RandomDist; +using grpc::testing::RandomDistInterface; using grpc::testing::InterarrivalTimer; -static void RunTest(RandomDist &&r, int threads, std::string title) { +static void RunTest(RandomDistInterface &&r, int threads, std::string title) { InterarrivalTimer timer; timer.init(r, threads); gpr_histogram *h(gpr_histogram_create(0.01, 60e9)); for (int i = 0; i < 10000000; i++) { for (int j = 0; j < threads; j++) { - gpr_histogram_add(h, timer(j).count()); + gpr_histogram_add(h, timer.next(j)); } } @@ -70,7 +70,7 @@ using grpc::testing::ParetoDist; int main(int argc, char **argv) { RunTest(ExpDist(10.0), 5, std::string("Exponential(10)")); RunTest(DetDist(5.0), 5, std::string("Det(5)")); - RunTest(UniformDist(0.0, 10.0), 5, std::string("Uniform(1,10)")); + RunTest(UniformDist(0.0, 10.0), 5, std::string("Uniform(0,10)")); RunTest(ParetoDist(1.0, 1.0), 5, std::string("Pareto(1,1)")); return 0; } |