提交 289efe99 编写于 作者: D Dhruba Borthakur

Update statistics only if needed.

Summary:
Update statistics only if needed.

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
上级 7cb8d462
...@@ -2169,8 +2169,10 @@ Compaction* VersionSet::PickCompactionUniversal(int level, double score) { ...@@ -2169,8 +2169,10 @@ Compaction* VersionSet::PickCompactionUniversal(int level, double score) {
} }
// update statistics // update statistics
options_->statistics->measureTime(NUM_FILES_IN_SINGLE_COMPACTION, if (options_->statistics != nullptr) {
c->inputs_[0].size()); options_->statistics->measureTime(NUM_FILES_IN_SINGLE_COMPACTION,
c->inputs_[0].size());
}
c->input_version_ = current_; c->input_version_ = current_;
c->input_version_->Ref(); c->input_version_->Ref();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册