Skip to content

Commit

Permalink
[Java] Fixed a bug in Java DB Benchmark where random reads does not c…
Browse files Browse the repository at this point in the history
…onsider full key range.

Summary: Fixed a bug in Java DB Benchmark where random reads does not consider full key range.

Test Plan:
make rocksdbjava
make jdb_bench
cd java
jdb_bench.sh --db=/tmp/rocksdb-test --benchmarks=fillseq --use_existing_db=false --num=100000
jdb_bench.sh --db=/tmp/rocksdb-test --benchmarks=readrandom --use_existing_db=true --num=100000 --reads=1000000

Reviewers: haobo, sdong

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D18693
  • Loading branch information
yhchiang committed May 13, 2014
1 parent 26f5dd9 commit e30dec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/org/rocksdb/benchmark/DbBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public ReadRandomTask(
byte[] key = new byte[keySize_];
byte[] value = new byte[valueSize_];
for (long i = 0; i < numEntries_; i++) {
getRandomKey(key, numEntries_);
getRandomKey(key, keyRange_);
int len = db_.get(key, value);
if (len != RocksDB.NOT_FOUND) {
stats_.found_++;
Expand Down

0 comments on commit e30dec9

Please sign in to comment.