Browse files

Make qps limit mostly work.

  • Loading branch information...
1 parent e02d595 commit f18de7fd5fb23b9f8f76ab54a217e04b3905437c @evan committed Mar 18, 2012
Showing with 9 additions and 5 deletions.
  1. +9 −5 hstress.c
View
14 hstress.c
@@ -306,8 +306,9 @@ complete(int how, Runner *runner)
}
}
-
- free(req);
+ if (!rateLimitingEnabled())
+ // FIXME Memory leak?
+ free(req);
}
void
@@ -653,13 +654,16 @@ main(int argc, char **argv)
for(i = 0; params.buckets[i] != 0; i++)
request_timeout = params.buckets[i];
- if(params.count > 0)
- params.count /= nprocs;
-
// FIXME Should also show bucket parameters
fprintf(stderr, "# params: -c %d -n %d -p %d -r %d -i %d -l %d -u %s %s %d\n",
params.concurrency, params.count, nprocs, params.rpc, (int) reporttv.tv_sec, params.qps, params.path, http_hostname, http_port);
+ // Convert absolute params to be relative to concurrency
+ params.count /= nprocs;
+
+ params.qps /= nprocs;
+ params.qps /= params.concurrency;
+
fprintf(stderr, "# \t\tconn\tconn\tconn\tconn\thttp\thttp\n");
fprintf(stderr, "# ts\t\tsuccess\terrors\ttimeout\tcloses\tsuccess\terror\t");
for(i=0; params.buckets[i]!=0; i++)

0 comments on commit f18de7f

Please sign in to comment.