Merge pull request #601 from adamretter/jdb-bench
Small fixes to Java benchmark
This commit is contained in:
commit
37bbd31856
@ -94,7 +94,7 @@ class Stats {
|
|||||||
|
|
||||||
void stop() {
|
void stop() {
|
||||||
finish_ = System.nanoTime();
|
finish_ = System.nanoTime();
|
||||||
seconds_ = (double) (finish_ - start_) / 1000000;
|
seconds_ = (double) (finish_ - start_) * 1e-9;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addMessage(String msg) {
|
void addMessage(String msg) {
|
||||||
@ -140,15 +140,15 @@ class Stats {
|
|||||||
if (bytes_ > 0) {
|
if (bytes_ > 0) {
|
||||||
// Rate is computed on actual elapsed time, not the sum of per-thread
|
// Rate is computed on actual elapsed time, not the sum of per-thread
|
||||||
// elapsed times.
|
// 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(String.format("%6.1f MB/s", (bytes_ / 1048576.0) / elapsed));
|
||||||
}
|
}
|
||||||
extra.append(message_.toString());
|
extra.append(message_.toString());
|
||||||
double elapsed = (finish_ - start_) * 1e-6;
|
double elapsed = (finish_ - start_);
|
||||||
double throughput = (double) done_ / elapsed;
|
double throughput = (double) done_ / (elapsed * 1e-9);
|
||||||
|
|
||||||
System.out.format("%-12s : %11.3f micros/op %d ops/sec;%s%s\n",
|
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());
|
(long) throughput, (extra.length() == 0 ? "" : " "), extra.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -541,8 +541,6 @@ public class DbBenchmark {
|
|||||||
(Integer)flags_.get(Flag.max_background_flushes));
|
(Integer)flags_.get(Flag.max_background_flushes));
|
||||||
options.setMaxOpenFiles(
|
options.setMaxOpenFiles(
|
||||||
(Integer)flags_.get(Flag.open_files));
|
(Integer)flags_.get(Flag.open_files));
|
||||||
options.setTableCacheRemoveScanCountLimit(
|
|
||||||
(Integer)flags_.get(Flag.cache_remove_scan_count_limit));
|
|
||||||
options.setDisableDataSync(
|
options.setDisableDataSync(
|
||||||
(Boolean)flags_.get(Flag.disable_data_sync));
|
(Boolean)flags_.get(Flag.disable_data_sync));
|
||||||
options.setUseFsync(
|
options.setUseFsync(
|
||||||
@ -1200,11 +1198,6 @@ public class DbBenchmark {
|
|||||||
return Integer.parseInt(value);
|
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" +
|
verify_checksum(false,"Verify checksum for every block read\n" +
|
||||||
"\tfrom storage.") {
|
"\tfrom storage.") {
|
||||||
@Override public Object parseValue(String value) {
|
@Override public Object parseValue(String value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user