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
This commit is contained in:
haoyuhuang 2019-07-01 15:11:43 -07:00 committed by Facebook Github Bot
parent 3e6c185381
commit 66464d1fde
6 changed files with 4 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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