Fix benchmark output for ares and getaddrinfo

This commit is contained in:
Ryan Dahl 2011-07-20 11:53:09 -07:00
parent abf854597b
commit b38ba04698
2 changed files with 3 additions and 4 deletions

View File

@ -110,7 +110,8 @@ BENCHMARK_IMPL(gethostbyname) {
if (ares_errors > 0) {
printf("There were %d failures\n", ares_errors);
}
LOGF("ares_gethostbyname: %d calls in %d ms \n", ares_callbacks, (int) (end_time - start_time));
LOGF("ares_gethostbyname: %.0f req/s\n",
1000.0 * ares_callbacks / (double)(end_time - start_time));
return 0;
}

View File

@ -83,9 +83,7 @@ BENCHMARK_IMPL(getaddrinfo) {
ASSERT(calls_initiated == TOTAL_CALLS);
ASSERT(calls_completed == TOTAL_CALLS);
LOGF("getaddrinfo: %d calls in %d ms (%.0f requests/second)\n",
calls_completed,
(int) (end_time - start_time),
LOGF("getaddrinfo: %.0f req/s\n",
(double) calls_completed / (double) (end_time - start_time) * 1000.0);
return 0;