Remove multiple declarations o kMicrosInSecond.

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/5526

Test Plan:
OPT=-g V=1 make J=1 unity_test -j32
make clean && make -j32

Differential Revision: D16079315

Pulled By: HaoyuHuang

fbshipit-source-id: 294ab439cf0db8dd5da44e30eabf0cbb2bb8c4f6
main
haoyuhuang 6 years ago committed by Facebook Github Bot
parent 3e6c185381
commit 66464d1fde
  1. 1
      db/db_impl/db_impl.cc
  2. 2
      tools/block_cache_trace_analyzer_test.cc
  3. 1
      tools/db_bench_tool.cc
  4. 1
      trace_replay/block_cache_tracer.cc
  5. 2
      trace_replay/block_cache_tracer.h
  6. 2
      utilities/simulator_cache/cache_simulator.h

@ -101,7 +101,6 @@ namespace rocksdb {
const std::string kDefaultColumnFamilyName("default");
const std::string kPersistentStatsColumnFamilyName(
"___rocksdb_stats_history___");
const int kMicrosInSecond = 1000 * 1000;
void DumpRocksDBBuildVersion(Logger* log);
CompressionType GetCompressionFlush(

@ -91,7 +91,7 @@ class BlockCacheTracerTest : public testing::Test {
assert(writer);
for (uint32_t i = 0; i < nblocks; i++) {
uint32_t key_id = from_key_id + i;
uint32_t timestamp = (key_id + 1) * kMicrosInSecond;
uint64_t timestamp = (key_id + 1) * kMicrosInSecond;
BlockCacheTraceRecord record;
record.block_type = block_type;
record.block_size = kBlockSize + key_id;

@ -1547,7 +1547,6 @@ class ReporterAgent {
private:
std::string Header() const { return "secs_elapsed,interval_qps"; }
void SleepAndReport() {
uint64_t kMicrosInSecond = 1000 * 1000;
auto time_started = env_->NowMicros();
while (true) {
{

@ -28,6 +28,7 @@ bool ShouldTrace(const Slice& block_key, const TraceOptions& trace_options) {
}
} // namespace
const uint64_t kMicrosInSecond = 1000 * 1000;
const std::string BlockCacheTraceHelper::kUnknownColumnFamilyName =
"UnknownColumnFamily";

@ -16,6 +16,8 @@
namespace rocksdb {
extern const uint64_t kMicrosInSecond;
// Lookup context for tracing block cache accesses.
// We trace block accesses at five places:
// 1. BlockBasedTable::GetFilter

@ -10,8 +10,6 @@
namespace rocksdb {
const uint64_t kMicrosInSecond = 1000000;
// A cache configuration provided by user.
struct CacheConfiguration {
std::string cache_name; // LRU.

Loading…
Cancel
Save