Fix #26 by putting the implementation of CreateDBStatistics() to a cc file

main
kailiu 11 years ago
parent 92e8316118
commit b1d2de4a40
  1. 14
      db/db_statistics.cc
  2. 4
      db/db_statistics.h
  3. 2
      table/table_test.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<Statistics> CreateDBStatistics() {
return std::make_shared<DBStatistics>();
}
} // namespace rocksdb

@ -58,8 +58,6 @@ class DBStatistics: public Statistics {
std::vector<HistogramImpl> allHistograms_; std::vector<HistogramImpl> allHistograms_;
}; };
std::shared_ptr<Statistics> CreateDBStatistics() { std::shared_ptr<Statistics> CreateDBStatistics();
return std::make_shared<DBStatistics>();
}
} // namespace rocksdb } // namespace rocksdb

@ -1047,7 +1047,7 @@ TEST(TableTest, BlockCacheTest) {
// -- PART 2: Open without block cache // -- PART 2: Open without block cache
options.block_cache.reset(); options.block_cache.reset();
options.statistics = CreateDBStatistics(); // reset the props options.statistics = CreateDBStatistics(); // reset the stats
c.Reopen(options); c.Reopen(options);
{ {

Loading…
Cancel
Save