aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/qps_interarrival_test.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-06-05 03:41:30 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-06-05 03:41:30 -0700
commitcf3fb092cc595066e70f780a6ffc5c79f4531148 (patch)
treecb8e63031e983acbb6f595cdd03ad0567da0d0f8 /test/cpp/qps/qps_interarrival_test.cc
parentc7de81e57ec4131993bd469a146739d74d564ab1 (diff)
clang-format
Diffstat (limited to 'test/cpp/qps/qps_interarrival_test.cc')
-rw-r--r--test/cpp/qps/qps_interarrival_test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc
index 14af4c6506..95fe1b8b0d 100644
--- a/test/cpp/qps/qps_interarrival_test.cc
+++ b/test/cpp/qps/qps_interarrival_test.cc
@@ -42,21 +42,21 @@
using grpc::testing::ExpDist;
using grpc::testing::InterarrivalTimer;
-void RunTest(InterarrivalTimer&& timer, std::string title) {
- gpr_histogram *h(gpr_histogram_create(0.01,60e9));
-
- for (int i=0; i<10000000; i++) {
- for (int j=0; j<5; j++) {
+void RunTest(InterarrivalTimer &&timer, std::string title) {
+ gpr_histogram *h(gpr_histogram_create(0.01, 60e9));
+
+ for (int i = 0; i < 10000000; i++) {
+ for (int j = 0; j < 5; j++) {
gpr_histogram_add(h, timer(j).count());
}
}
-
- std::cout << title << " Distribution" << std::endl;
+
+ 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;
}
-
+
gpr_histogram_destroy(h);
}
@@ -68,9 +68,9 @@ using grpc::testing::ParetoDist;
int main(int argc, char **argv) {
RunTest(InterarrivalTimer(ExpDist(10.0), 5), std::string("Exponential(10)"));
RunTest(InterarrivalTimer(DetDist(5.0), 5), std::string("Det(5)"));
- RunTest(InterarrivalTimer(UniformDist(0.0,10.0), 5),
+ RunTest(InterarrivalTimer(UniformDist(0.0, 10.0), 5),
std::string("Uniform(1,10)"));
- RunTest(InterarrivalTimer(ParetoDist(1.0,1.0), 5),
+ RunTest(InterarrivalTimer(ParetoDist(1.0, 1.0), 5),
std::string("Pareto(1,1)"));
return 0;