Skip to content

Commit

Permalink
Remove multiple declarations o kMicrosInSecond.
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebook#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
  • Loading branch information
HaoyuHuang authored and facebook-github-bot committed Jul 1, 2019
1 parent 3e6c185 commit 66464d1
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tools/block_cache_trace_analyzer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
{
Expand Down
1 change: 1 addition & 0 deletions trace_replay/block_cache_tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 2 additions & 0 deletions trace_replay/block_cache_tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions utilities/simulator_cache/cache_simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

namespace rocksdb {

const uint64_t kMicrosInSecond = 1000000;

// A cache configuration provided by user.
struct CacheConfiguration {
std::string cache_name; // LRU.
Expand Down

0 comments on commit 66464d1

Please sign in to comment.