diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index baa5c397eb786ae1aa8bf392f68fd3648092f45f..26c1365c4e770538a032dda818c8afd013003743 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -3341,7 +3341,7 @@ Status BlockBasedTable::Get(const ReadOptions& read_options, const Slice& key, CachableEntry filter_entry; bool may_match; FilterBlockReader* filter = nullptr; - uint64_t tracing_get_id = get_context->tracing_get_id(); + uint64_t tracing_get_id = get_context->get_tracing_get_id(); BlockCacheLookupContext lookup_context{TableReaderCaller::kUserGet, tracing_get_id}; { @@ -3517,7 +3517,7 @@ void BlockBasedTable::MultiGet(const ReadOptions& read_options, mget_range->end()); uint64_t tracing_mget_id = BlockCacheTraceHelper::kReservedGetId; if (!sst_file_range.empty() && sst_file_range.begin()->get_context) { - tracing_mget_id = sst_file_range.begin()->get_context->tracing_get_id(); + tracing_mget_id = sst_file_range.begin()->get_context->get_tracing_get_id(); } BlockCacheLookupContext lookup_context{TableReaderCaller::kUserMultiGet, tracing_mget_id}; diff --git a/table/get_context.h b/table/get_context.h index f567229cc9feb143159da5bba7df9634204f772c..7a37beb2df238a82551bb3b68ab616fb2d6cdf48 100644 --- a/table/get_context.h +++ b/table/get_context.h @@ -136,7 +136,7 @@ class GetContext { void ReportCounters(); - uint64_t tracing_get_id() const { return tracing_get_id_; } + uint64_t get_tracing_get_id() const { return tracing_get_id_; } private: const Comparator* ucmp_; diff --git a/utilities/simulator_cache/cache_simulator.cc b/utilities/simulator_cache/cache_simulator.cc index 145efdb6cbae740902237be9a46b87e104c952ec..65f626036b083229b759052b3dd1c3e4a0cd639a 100644 --- a/utilities/simulator_cache/cache_simulator.cc +++ b/utilities/simulator_cache/cache_simulator.cc @@ -34,8 +34,8 @@ void PrioritizedCacheSimulator::Access(const BlockCacheTraceRecord& access) { double CacheSimulator::miss_ratio() { uint64_t hits = sim_cache_->get_hit_counter(); uint64_t misses = sim_cache_->get_miss_counter(); - uint64_t total_accesses = hits + misses; - return static_cast(misses * 100.0 / total_accesses); + uint64_t accesses = hits + misses; + return static_cast(misses * 100.0 / accesses); } uint64_t CacheSimulator::total_accesses() {