X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/7407797596cdc7ff4df1588cb0bacd2d3d5c67ac..6f376729209b8af1f2e0ea6a7e04598f7644c5e3:/benchmark.c diff --git a/benchmark.c b/benchmark.c index b550196c..0d53c935 100644 --- a/benchmark.c +++ b/benchmark.c @@ -28,6 +28,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "fmacros.h" + #include #include #include @@ -423,15 +425,6 @@ int main(int argc, char **argv) { } do { - prepareForBenchmark(); - c = createClient(); - if (!c) exit(1); - c->obuf = sdscat(c->obuf,"PING\r\n"); - c->replytype = REPLY_RETCODE; - createMissingClients(c); - aeMain(config.el); - endBenchmark("PING"); - prepareForBenchmark(); c = createClient(); if (!c) exit(1); @@ -486,6 +479,15 @@ int main(int argc, char **argv) { aeMain(config.el); endBenchmark("LPOP"); + prepareForBenchmark(); + c = createClient(); + if (!c) exit(1); + c->obuf = sdscat(c->obuf,"PING\r\n"); + c->replytype = REPLY_RETCODE; + createMissingClients(c); + aeMain(config.el); + endBenchmark("PING"); + printf("\n"); } while(config.loop);