Merge pull request #13326 from vjpai/cpu_test

Reduce # of arithmetic ops to reduce time spent in gpr_cpu_test
pull/13331/head
Vijay Pai 7 years ago committed by GitHub
commit 2da79b8feb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/core/support/cpu_test.cc

@ -68,7 +68,7 @@ static void worker_thread(void* arg) {
unsigned i, j;
/* Avoid repetitive division calculations */
int64_t max_i = 1000 / grpc_test_slowdown_factor();
int64_t max_j = 1000000 / grpc_test_slowdown_factor();
int64_t max_j = 1000 / grpc_test_slowdown_factor();
for (i = 0; i < max_i; i++) {
/* run for a bit - just calculate something random. */
for (j = 0; j < max_j; j++) {

Loading…
Cancel
Save