Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2572bb13
Commit
2572bb13
authored
Nov 30, 2012
by
antirez
Browse files
redis-benchmark: seed the PRNG with time() at startup.
parent
e34c14df
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
2572bb13
...
@@ -35,6 +35,7 @@
...
@@ -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) {
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment