mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
Update rocksdb.read.block.get.micros when block cache disabled
Summary: Previously `ReadBlockFromFile` for data blocks was only measured when reading a block to populate block cache. This PR adds the corresponding measurements for users who disabled block cache. Closes https://github.com/facebook/rocksdb/pull/3442 Differential Revision: D6848671 Pulled By: ajkr fbshipit-source-id: bb4bbe1797fa2cc1d9a5bad44891af2b55384b41
This commit is contained in:
parent
5eccf0b9d5
commit
1edac32b77
|
@ -1499,11 +1499,15 @@ BlockIter* BlockBasedTable::NewDataBlockIterator(
|
|||
return iter;
|
||||
}
|
||||
std::unique_ptr<Block> block_value;
|
||||
s = ReadBlockFromFile(rep->file.get(), nullptr /* prefetch_buffer */,
|
||||
rep->footer, ro, handle, &block_value, rep->ioptions,
|
||||
true /* compress */, compression_dict,
|
||||
rep->persistent_cache_options, rep->global_seqno,
|
||||
rep->table_options.read_amp_bytes_per_bit);
|
||||
{
|
||||
StopWatch sw(rep->ioptions.env, rep->ioptions.statistics,
|
||||
READ_BLOCK_GET_MICROS);
|
||||
s = ReadBlockFromFile(
|
||||
rep->file.get(), nullptr /* prefetch_buffer */, rep->footer, ro,
|
||||
handle, &block_value, rep->ioptions, true /* compress */,
|
||||
compression_dict, rep->persistent_cache_options, rep->global_seqno,
|
||||
rep->table_options.read_amp_bytes_per_bit);
|
||||
}
|
||||
if (s.ok()) {
|
||||
block.value = block_value.release();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue