Skip to content

Commit

Permalink
Fix facebook#26 by putting the implementation of CreateDBStatistics()…
Browse files Browse the repository at this point in the history
… to a cc file
  • Loading branch information
liukai committed Dec 6, 2013
1 parent 92e8316 commit b1d2de4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 14 additions & 0 deletions db/db_statistics.cc
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions db/db_statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ class DBStatistics: public Statistics {
std::vector<HistogramImpl> allHistograms_;
};

std::shared_ptr<Statistics> CreateDBStatistics() {
return std::make_shared<DBStatistics>();
}
std::shared_ptr<Statistics> CreateDBStatistics();

} // namespace rocksdb
2 changes: 1 addition & 1 deletion table/table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

{
Expand Down

0 comments on commit b1d2de4

Please sign in to comment.