aboutsummaryrefslogtreecommitdiff
path: root/db/db_impl.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-08-24 22:21:41 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-08-24 22:21:41 +0200
commiteed29f0f50806b9cfe9653509e7ed7f7eebdd3e3 (patch)
treeb7c699c2c085ef911eca46890093d04644eb96c5 /db/db_impl.h
parent1bb86d6f154da45464eb8b009c298dccd1cb3dab (diff)
Squashed 'src/leveldb/' changes from be1b0ff..936b461
936b461 Merge upstream LevelDB 1.13. 748539c LevelDB 1.13 git-subtree-dir: src/leveldb git-subtree-split: 936b4613ea4551992e6096b1e05eeefc09a20e3b
Diffstat (limited to 'db/db_impl.h')
-rw-r--r--db/db_impl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/db/db_impl.h b/db/db_impl.h
index 3c8d711ae0..75fd30abe9 100644
--- a/db/db_impl.h
+++ b/db/db_impl.h
@@ -59,13 +59,19 @@ class DBImpl : public DB {
// file at a level >= 1.
int64_t TEST_MaxNextLevelOverlappingBytes();
+ // Record a sample of bytes read at the specified internal key.
+ // Samples are taken approximately once every config::kReadBytesPeriod
+ // bytes.
+ void RecordReadSample(Slice key);
+
private:
friend class DB;
struct CompactionState;
struct Writer;
Iterator* NewInternalIterator(const ReadOptions&,
- SequenceNumber* latest_snapshot);
+ SequenceNumber* latest_snapshot,
+ uint32_t* seed);
Status NewDB();
@@ -135,6 +141,7 @@ class DBImpl : public DB {
WritableFile* logfile_;
uint64_t logfile_number_;
log::Writer* log_;
+ uint32_t seed_; // For sampling.
// Queue of writers.
std::deque<Writer*> writers_;