diff options
author | 2016-01-20 07:06:16 -0800 | |
---|---|---|
committer | 2016-01-20 07:06:16 -0800 | |
commit | fb0a918155c6056482532f3e31d9f1018fb41c61 (patch) | |
tree | d8b4100207d243085f24d7272159e275d8ff194c /test | |
parent | 9e1e99aa7291336affb4912ff6754d0d330285fe (diff) |
Cap fling tests by time not rpcs processed
Diffstat (limited to 'test')
-rw-r--r-- | test/core/fling/client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/core/fling/client.c b/test/core/fling/client.c index 99b30d6c4a..d5f78b277a 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -201,13 +201,16 @@ int main(int argc, char **argv) { sc.init(); - for (i = 0; i < 1000; i++) { + gpr_timespec end_warmup = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3); + gpr_timespec end_profiling = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(30); + + while (gpr_time_cmp(gpr_now(end_warmup.clock_type), end_warmup) < 0) { sc.do_one_step(); } gpr_log(GPR_INFO, "start profiling"); grpc_profiler_start("client.prof"); - for (i = 0; i < 100000; i++) { + while (gpr_time_cmp(gpr_now(end_profiling.clock_type), end_profiling) < 0) { start = now(); sc.do_one_step(); stop = now(); |