Skip to content

Commit

Permalink
Merge pull request facebook#601 from adamretter/jdb-bench
Browse files Browse the repository at this point in the history
Small fixes to Java benchmark
  • Loading branch information
fyrz committed May 7, 2015
2 parents 77a5a54 + 197f01b commit 37bbd31
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void merge(final Stats other) {

void stop() {
finish_ = System.nanoTime();
seconds_ = (double) (finish_ - start_) / 1000000;
seconds_ = (double) (finish_ - start_) * 1e-9;
}

void addMessage(String msg) {
Expand Down Expand Up @@ -140,15 +140,15 @@ void report(String name) {
if (bytes_ > 0) {
// Rate is computed on actual elapsed time, not the sum of per-thread
// elapsed times.
double elapsed = (finish_ - start_) * 1e-6;
double elapsed = (finish_ - start_) * 1e-9;
extra.append(String.format("%6.1f MB/s", (bytes_ / 1048576.0) / elapsed));
}
extra.append(message_.toString());
double elapsed = (finish_ - start_) * 1e-6;
double throughput = (double) done_ / elapsed;
double elapsed = (finish_ - start_);
double throughput = (double) done_ / (elapsed * 1e-9);

System.out.format("%-12s : %11.3f micros/op %d ops/sec;%s%s\n",
name, elapsed * 1e6 / done_,
name, (elapsed * 1e-6) / done_,
(long) throughput, (extra.length() == 0 ? "" : " "), extra.toString());
}
}
Expand Down Expand Up @@ -541,8 +541,6 @@ private void prepareOptions(Options options) throws RocksDBException {
(Integer)flags_.get(Flag.max_background_flushes));
options.setMaxOpenFiles(
(Integer)flags_.get(Flag.open_files));
options.setTableCacheRemoveScanCountLimit(
(Integer)flags_.get(Flag.cache_remove_scan_count_limit));
options.setDisableDataSync(
(Boolean)flags_.get(Flag.disable_data_sync));
options.setUseFsync(
Expand Down Expand Up @@ -1200,11 +1198,6 @@ private enum Flag {
return Integer.parseInt(value);
}
},
cache_remove_scan_count_limit(32,"") {
@Override public Object parseValue(String value) {
return Integer.parseInt(value);
}
},
verify_checksum(false,"Verify checksum for every block read\n" +
"\tfrom storage.") {
@Override public Object parseValue(String value) {
Expand Down

0 comments on commit 37bbd31

Please sign in to comment.