aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/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
commit877b5e3653f12882e12c75aa0bb5be47f847bd09 (patch)
tree399b43ec4298fdefe16fd9c33e684b3e58867755 /src/leveldb/db/db_impl.h
parente9e2ef5fbd610fbaa3801440254c39ac4ba8f91d (diff)
parenteed29f0f50806b9cfe9653509e7ed7f7eebdd3e3 (diff)
Merge src/leveldb changes for LevelDB 1.13
Diffstat (limited to 'src/leveldb/db/db_impl.h')
-rw-r--r--src/leveldb/db/db_impl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/leveldb/db/db_impl.h b/src/leveldb/db/db_impl.h
index 3c8d711ae0..75fd30abe9 100644
--- a/src/leveldb/db/db_impl.h
+++ b/src/leveldb/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_;