From b1d2de4a40f625011bf71d8b59d0f8436eb5f1a9 Mon Sep 17 00:00:00 2001 From: kailiu Date: Thu, 5 Dec 2013 22:29:03 -0800 Subject: [PATCH] Fix #26 by putting the implementation of CreateDBStatistics() to a cc file --- db/db_statistics.cc | 14 ++++++++++++++ db/db_statistics.h | 4 +--- table/table_test.cc | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 db/db_statistics.cc diff --git a/db/db_statistics.cc b/db/db_statistics.cc new file mode 100644 index 000000000..f0cfd6740 --- /dev/null +++ b/db/db_statistics.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2013, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. + +#include "db/db_statistics.h" + +namespace rocksdb { + +std::shared_ptr CreateDBStatistics() { + return std::make_shared(); +} + +} // namespace rocksdb diff --git a/db/db_statistics.h b/db/db_statistics.h index 87bc86304..ec71e1688 100644 --- a/db/db_statistics.h +++ b/db/db_statistics.h @@ -58,8 +58,6 @@ class DBStatistics: public Statistics { std::vector allHistograms_; }; -std::shared_ptr CreateDBStatistics() { - return std::make_shared(); -} +std::shared_ptr CreateDBStatistics(); } // namespace rocksdb diff --git a/table/table_test.cc b/table/table_test.cc index e4aab1f69..1f79fcdf9 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -1047,7 +1047,7 @@ TEST(TableTest, BlockCacheTest) { // -- PART 2: Open without block cache options.block_cache.reset(); - options.statistics = CreateDBStatistics(); // reset the props + options.statistics = CreateDBStatistics(); // reset the stats c.Reopen(options); {