[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:
Abhishek Kona
2013-06-07 10:02:28 -07:00
parent 8ef328ee6a
commit e982b5a489
3 changed files with 7 additions and 2 deletions

View File

@@ -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);
}