static void benchmark(char *title, char *cmd, int len) { client c; config.title = title; config.requests_issued = 0; config.requests_finished = 0; c = createClient(cmd,len,NULL); createMissingClients(c); config.start = mstime(); aeMain(config.el); config.totlatency = mstime()-config.start; showLatencyReport(); freeAllClients(); }
static void endBenchmark(void) { config.totlatency = (microseconds()-config.start)/1000; showLatencyReport(); }