diff options
author | 2017-11-30 10:56:06 -0800 | |
---|---|---|
committer | 2017-11-30 15:02:04 -0800 | |
commit | 195cf1ebfd5e3ab12d8271e116e1f022a9b23ef6 (patch) | |
tree | 1fd1ebc2321b09b3de08686f9f73c1bd1b7df2b1 /test/cpp/qps/qps_interarrival_test.cc | |
parent | 5f662537deb01539a204273977c7e32394fc3454 (diff) |
Move histogram to test/core/util
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 461bf624ce..625b7db426 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -20,7 +20,7 @@ #include <iostream> // Use the C histogram rather than C++ to avoid depending on proto -#include <grpc/support/histogram.h> +#include "test/core/util/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/util/test_config.h" @@ -31,21 +31,21 @@ using grpc::testing::RandomDistInterface; 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)); + grpc_histogram* h(grpc_histogram_create(0.01, 60e9)); for (int i = 0; i < 10000000; i++) { for (int j = 0; j < threads; j++) { - gpr_histogram_add(h, timer.next(j)); + grpc_histogram_add(h, timer.next(j)); } } std::cout << title << " Distribution" << std::endl; std::cout << "Value, Percentile" << std::endl; for (double pct = 0.0; pct < 100.0; pct += 1.0) { - std::cout << gpr_histogram_percentile(h, pct) << "," << pct << std::endl; + std::cout << grpc_histogram_percentile(h, pct) << "," << pct << std::endl; } - gpr_histogram_destroy(h); + grpc_histogram_destroy(h); } using grpc::testing::ExpDist; |