mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
redis-benchmark: seed the PRNG with time() at startup.
This commit is contained in:
parent
395d663d29
commit
b4abbaf755
@ -35,6 +35,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -510,6 +511,7 @@ int main(int argc, const char **argv) {
|
|||||||
|
|
||||||
client c;
|
client c;
|
||||||
|
|
||||||
|
srandom(time(NULL));
|
||||||
signal(SIGHUP, SIG_IGN);
|
signal(SIGHUP, SIG_IGN);
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user