Skip to content

Commit

Permalink
Fix issue #211. Allow key_stddev and key_median options to be set val…
Browse files Browse the repository at this point in the history
…ues (#212)
  • Loading branch information
clkbug authored Apr 20, 2023
1 parent 1620979 commit d6083ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,15 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
break;
case o_key_stddev:
endptr = NULL;
cfg->key_stddev = (unsigned int) strtof(optarg, &endptr);
cfg->key_stddev = strtod(optarg, &endptr);
if (cfg->key_stddev<= 0 || !endptr || *endptr != '\0') {
fprintf(stderr, "error: key-stddev must be greater than zero.\n");
return -1;
}
break;
case o_key_median:
endptr = NULL;
cfg->key_median = (unsigned int) strtof(optarg, &endptr);
cfg->key_median = strtod(optarg, &endptr);
if (cfg->key_median<= 0 || !endptr || *endptr != '\0') {
fprintf(stderr, "error: key-median must be greater than zero.\n");
return -1;
Expand Down

0 comments on commit d6083ed

Please sign in to comment.