Skip to content

Commit c9aecaa

Browse files
committed
bugfix in randomize
1 parent eb64cf5 commit c9aecaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

memtier_benchmark.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
341341
cfg->distinct_client_seed++;
342342
break;
343343
case o_randomize:
344-
cfg->randomize = (int)time(NULL);
344+
srandom((int)time(NULL));
345+
cfg->randomize = random();
345346
break;
346347
case 'n':
347348
endptr = NULL;

0 commit comments

Comments
 (0)