/* Redis benchmark utility.
*
- * Copyright (c) 2009-2010, Salvatore Sanfilippo <antirez at gmail dot com>
+ * Copyright (c) 2009-2012, Salvatore Sanfilippo <antirez at gmail dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
long long mst;
gettimeofday(&tv, NULL);
- mst = ((long)tv.tv_sec)*1000;
+ mst = ((long long)tv.tv_sec)*1000;
mst += tv.tv_usec/1000;
return mst;
}
if (config.requests_finished < config.requests)
config.latency[config.requests_finished++] = c->latency;
c->pending--;
- if (c->pending == 0) clientDone(c);
+ if (c->pending == 0) {
+ clientDone(c);
+ break;
+ }
} else {
break;
}