From 8f0de0554f6d49689798b53d3e567f9879b623d0 Mon Sep 17 00:00:00 2001 From: anand76 Date: Tue, 27 Apr 2021 17:20:52 -0700 Subject: [PATCH] Address comments --- TARGETS | 1 + cache/cache_bench_tool.cc | 2 +- include/rocksdb/cache.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TARGETS b/TARGETS index 1504f1323..816f1c3c1 100644 --- a/TARGETS +++ b/TARGETS @@ -803,6 +803,7 @@ cpp_library( os_deps = ROCKSDB_OS_DEPS, os_preprocessor_flags = ROCKSDB_OS_PREPROCESSOR_FLAGS, preprocessor_flags = ROCKSDB_PREPROCESSOR_FLAGS, + include_paths = ROCKSDB_INCLUDE_PATHS, deps = [":rocksdb_lib"], external_deps = ROCKSDB_EXTERNAL_DEPS, link_whole = False, diff --git a/cache/cache_bench_tool.cc b/cache/cache_bench_tool.cc index db40ddcc5..e372907c6 100644 --- a/cache/cache_bench_tool.cc +++ b/cache/cache_bench_tool.cc @@ -137,7 +137,7 @@ class Stats { insert_us += other.insert_us; } void Report() { - fprintf(stdout, "%lu hits, %lu misses, %lu lookup_ns, %lu insert_ns\n", + fprintf(stdout, "%lu hits, %lu misses, %lu lookup_us, %lu insert_us\n", hits, misses, lookup_us, insert_us); fflush(stdout); } diff --git a/include/rocksdb/cache.h b/include/rocksdb/cache.h index 3b65d06a4..4e5bdeeb8 100644 --- a/include/rocksdb/cache.h +++ b/include/rocksdb/cache.h @@ -373,6 +373,7 @@ class Cache { Handle** handle = nullptr, Priority priority = Priority::LOW) { DeletionCallback delete_cb = nullptr; + assert(helper_cb != nullptr); (*helper_cb)(nullptr, nullptr, &delete_cb); return Insert(key, value, charge, delete_cb, handle, priority); }