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:
parent
3e6c185381
commit
66464d1fde
@ -101,7 +101,6 @@ namespace rocksdb {
|
|||||||
const std::string kDefaultColumnFamilyName("default");
|
const std::string kDefaultColumnFamilyName("default");
|
||||||
const std::string kPersistentStatsColumnFamilyName(
|
const std::string kPersistentStatsColumnFamilyName(
|
||||||
"___rocksdb_stats_history___");
|
"___rocksdb_stats_history___");
|
||||||
const int kMicrosInSecond = 1000 * 1000;
|
|
||||||
void DumpRocksDBBuildVersion(Logger* log);
|
void DumpRocksDBBuildVersion(Logger* log);
|
||||||
|
|
||||||
CompressionType GetCompressionFlush(
|
CompressionType GetCompressionFlush(
|
||||||
|
@ -91,7 +91,7 @@ class BlockCacheTracerTest : public testing::Test {
|
|||||||
assert(writer);
|
assert(writer);
|
||||||
for (uint32_t i = 0; i < nblocks; i++) {
|
for (uint32_t i = 0; i < nblocks; i++) {
|
||||||
uint32_t key_id = from_key_id + 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;
|
BlockCacheTraceRecord record;
|
||||||
record.block_type = block_type;
|
record.block_type = block_type;
|
||||||
record.block_size = kBlockSize + key_id;
|
record.block_size = kBlockSize + key_id;
|
||||||
|
@ -1547,7 +1547,6 @@ class ReporterAgent {
|
|||||||
private:
|
private:
|
||||||
std::string Header() const { return "secs_elapsed,interval_qps"; }
|
std::string Header() const { return "secs_elapsed,interval_qps"; }
|
||||||
void SleepAndReport() {
|
void SleepAndReport() {
|
||||||
uint64_t kMicrosInSecond = 1000 * 1000;
|
|
||||||
auto time_started = env_->NowMicros();
|
auto time_started = env_->NowMicros();
|
||||||
while (true) {
|
while (true) {
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,7 @@ bool ShouldTrace(const Slice& block_key, const TraceOptions& trace_options) {
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
const uint64_t kMicrosInSecond = 1000 * 1000;
|
||||||
const std::string BlockCacheTraceHelper::kUnknownColumnFamilyName =
|
const std::string BlockCacheTraceHelper::kUnknownColumnFamilyName =
|
||||||
"UnknownColumnFamily";
|
"UnknownColumnFamily";
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
namespace rocksdb {
|
namespace rocksdb {
|
||||||
|
|
||||||
|
extern const uint64_t kMicrosInSecond;
|
||||||
|
|
||||||
// Lookup context for tracing block cache accesses.
|
// Lookup context for tracing block cache accesses.
|
||||||
// We trace block accesses at five places:
|
// We trace block accesses at five places:
|
||||||
// 1. BlockBasedTable::GetFilter
|
// 1. BlockBasedTable::GetFilter
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
namespace rocksdb {
|
namespace rocksdb {
|
||||||
|
|
||||||
const uint64_t kMicrosInSecond = 1000000;
|
|
||||||
|
|
||||||
// A cache configuration provided by user.
|
// A cache configuration provided by user.
|
||||||
struct CacheConfiguration {
|
struct CacheConfiguration {
|
||||||
std::string cache_name; // LRU.
|
std::string cache_name; // LRU.
|
||||||
|
Loading…
Reference in New Issue
Block a user