Fix a uncleaned counter in PerfContext::Reset()

Summary:
new_table_iterator_nanos is not cleaned in PerfContext::Reset() while new_table_block_iter_nanos is cleaned twice. Fix it.
Also fix a comment.

Test Plan: Build and db_bench with --perf_context to see the value shown.

Reviewers: kradhakrishnan, anthony, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D41721
This commit is contained in:
sdong 2015-07-10 16:09:10 -07:00
parent e41cbd9c2f
commit a6e38fd170
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ struct PerfContext {
uint64_t read_filter_block_nanos;
// Time spent on creating data block iterator
uint64_t new_table_block_iter_nanos;
// Time spent on new_table_block_iter_micros
// Time spent on creating a iterator of an SST file.
uint64_t new_table_iterator_nanos;
// Time spent on seeking a key in data/index blocks
uint64_t block_seek_nanos;

View File

@ -50,7 +50,7 @@ void PerfContext::Reset() {
read_index_block_nanos = 0;
read_filter_block_nanos = 0;
new_table_block_iter_nanos = 0;
new_table_block_iter_nanos = 0;
new_table_iterator_nanos = 0;
block_seek_nanos = 0;
find_table_nanos = 0;
#endif