aboutsummaryrefslogtreecommitdiff
path: root/db/db_impl.h
diff options
context:
space:
mode:
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 3c8d711..75fd30a 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_;