提交 c92425e0 编写于 作者: A Ankit Gupta

Merge branch 'master' of https://github.com/facebook/rocksdb

......@@ -800,11 +800,17 @@ public class DbBenchmark {
}
}
}
String extra = "";
if (benchmark.indexOf("read") >= 0) {
extra = String.format(" %d / %d found; ", stats.found_, stats.done_);
} else {
extra = String.format(" %d ops done; ", stats.done_);
}
System.out.printf(
"%-16s : %11.5f micros/op; %6.1f MB/s; %d / %d task(s) finished.\n",
"%-16s : %11.5f micros/op; %6.1f MB/s;%s %d / %d task(s) finished.\n",
benchmark, (double) elapsedSeconds / stats.done_ * 1e6,
(stats.bytes_ / 1048576.0) / elapsedSeconds,
(stats.bytes_ / 1048576.0) / elapsedSeconds, extra,
taskFinishedCount, concurrentThreads);
}
......
......@@ -17,13 +17,14 @@ namespace {
class FixedPrefixTransform : public SliceTransform {
private:
size_t prefix_len_;
std::string name_;
public:
explicit FixedPrefixTransform(size_t prefix_len) : prefix_len_(prefix_len) { }
explicit FixedPrefixTransform(size_t prefix_len)
: prefix_len_(prefix_len),
name_("rocksdb.FixedPrefix." + std::to_string(prefix_len_)) {}
virtual const char* Name() const {
return "rocksdb.FixedPrefix";
}
virtual const char* Name() const { return name_.c_str(); }
virtual Slice Transform(const Slice& src) const {
assert(InDomain(src));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册