[Rocksdb] Record WriteBlock Times into a histogram

Summary: Add a histogram to track WriteBlock times

Test Plan: db_bench and print

Reviewers: haobo, dhruba

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D11319
This commit is contained in:
Abhishek Kona
2013-06-17 10:11:10 -07:00
parent 8926b72751
commit 39ee47fbf4
2 changed files with 6 additions and 2 deletions

View File

@@ -14,6 +14,7 @@
#include "table/format.h"
#include "util/coding.h"
#include "util/crc32c.h"
#include "util/stop_watch.h"
namespace leveldb {
@@ -231,6 +232,7 @@ void TableBuilder::WriteRawBlock(const Slice& block_contents,
CompressionType type,
BlockHandle* handle) {
Rep* r = rep_;
StopWatch sw(r->options.env, r->options.statistics, WRITE_RAW_BLOCK_MICROS);
handle->set_offset(r->offset);
handle->set_size(block_contents.size());
r->status = r->file->Append(block_contents);