mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
Update statistics only if needed.
Summary: Update statistics only if needed. Test Plan: Reviewers: CC: Task ID: # Blame Rev:
This commit is contained in:
parent
7cb8d462d5
commit
289efe9922
|
@ -2169,8 +2169,10 @@ Compaction* VersionSet::PickCompactionUniversal(int level, double score) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// update statistics
|
// update statistics
|
||||||
|
if (options_->statistics != nullptr) {
|
||||||
options_->statistics->measureTime(NUM_FILES_IN_SINGLE_COMPACTION,
|
options_->statistics->measureTime(NUM_FILES_IN_SINGLE_COMPACTION,
|
||||||
c->inputs_[0].size());
|
c->inputs_[0].size());
|
||||||
|
}
|
||||||
|
|
||||||
c->input_version_ = current_;
|
c->input_version_ = current_;
|
||||||
c->input_version_->Ref();
|
c->input_version_->Ref();
|
||||||
|
|
Loading…
Reference in a new issue