[Rocksdb] measure table open io in a histogram
Summary: as title Test Plan: db_bench --statistics=1 check for statistic. Reviewers: dhruba, haobo Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D11109
This commit is contained in:
parent
8ef328ee6a
commit
e982b5a489
@ -742,6 +742,7 @@ class Benchmark {
|
||||
"COMPACTION OUT FILE SYNC MICROS");
|
||||
PrintHistogram(WAL_FILE_SYNC_MICROS, "WAL FILE SYNC MICROS");
|
||||
PrintHistogram(MANIFEST_FILE_SYNC_MICROS, "Manifest SYNC MICROS");
|
||||
PrintHistogram(TABLE_OPEN_IO_MICROS, "Table Open IO Micros");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "leveldb/statistics.h"
|
||||
#include "table/table.h"
|
||||
#include "util/coding.h"
|
||||
#include "util/stop_watch.h"
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
@ -57,6 +58,7 @@ Status TableCache::FindTable(const EnvOptions& toptions,
|
||||
if (options_->advise_random_on_open) {
|
||||
file->Hint(RandomAccessFile::RANDOM);
|
||||
}
|
||||
StopWatch sw(env_, options_->statistics, TABLE_OPEN_IO_MICROS);
|
||||
s = Table::Open(*options_, toptions, std::move(file), file_size, &table);
|
||||
}
|
||||
|
||||
|
@ -73,8 +73,10 @@ enum Histograms {
|
||||
COMPACTION_OUTFILE_SYNC_MICROS = 4,
|
||||
WAL_FILE_SYNC_MICROS = 5,
|
||||
MANIFEST_FILE_SYNC_MICROS = 6,
|
||||
DB_MULTIGET = 7,
|
||||
HISTOGRAM_ENUM_MAX = 8
|
||||
// TIME SPENT IN IO DURING TABLE OPEN
|
||||
TABLE_OPEN_IO_MICROS = 7,
|
||||
DB_MULTIGET = 8,
|
||||
HISTOGRAM_ENUM_MAX = 9
|
||||
};
|
||||
|
||||
struct HistogramData {
|
||||
|
Loading…
Reference in New Issue
Block a user