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
main
sdong 10 years ago
parent e41cbd9c2f
commit a6e38fd170
  1. 2
      include/rocksdb/perf_context.h
  2. 2
      util/perf_context.cc

@ -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;

@ -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

Loading…
Cancel
Save