From a6e38fd170679e5844590e317b29712b7e418d3f Mon Sep 17 00:00:00 2001 From: sdong Date: Fri, 10 Jul 2015 16:09:10 -0700 Subject: [PATCH] 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 --- include/rocksdb/perf_context.h | 2 +- util/perf_context.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rocksdb/perf_context.h b/include/rocksdb/perf_context.h index aee719ff1..126d16572 100644 --- a/include/rocksdb/perf_context.h +++ b/include/rocksdb/perf_context.h @@ -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; diff --git a/util/perf_context.cc b/util/perf_context.cc index 2ba35ca72..643b3f004 100644 --- a/util/perf_context.cc +++ b/util/perf_context.cc @@ -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