mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
chore: add pending_ops to disk stats (#3837)
This commit is contained in:
parent
79dc98dd03
commit
2d11a046be
3 changed files with 6 additions and 3 deletions
|
@ -190,8 +190,9 @@ std::error_code DiskStorage::Stash(io::Bytes bytes, io::Bytes footer, StashCb cb
|
|||
}
|
||||
|
||||
DiskStorage::Stats DiskStorage::GetStats() const {
|
||||
return {alloc_.allocated_bytes(), alloc_.capacity(), heap_buf_alloc_cnt_, reg_buf_alloc_cnt_,
|
||||
static_cast<size_t>(max_size_)};
|
||||
return {
|
||||
alloc_.allocated_bytes(), alloc_.capacity(), heap_buf_alloc_cnt_, reg_buf_alloc_cnt_,
|
||||
static_cast<size_t>(max_size_), pending_ops_};
|
||||
}
|
||||
|
||||
bool DiskStorage::CanGrow() const {
|
||||
|
|
|
@ -23,6 +23,7 @@ class DiskStorage {
|
|||
uint64_t heap_buf_alloc_count = 0;
|
||||
uint64_t registered_buf_alloc_count = 0;
|
||||
size_t max_file_size = 0;
|
||||
size_t pending_ops = 0;
|
||||
};
|
||||
|
||||
using ReadCb = std::function<void(io::Result<std::string_view>)>;
|
||||
|
|
|
@ -27,7 +27,8 @@ ostream& operator<<(ostream& os, const OpManager::Stats& stats) {
|
|||
<< ", capacity_bytes: " << stats.disk_stats.capacity_bytes
|
||||
<< ", heap_buf_allocs: " << stats.disk_stats.heap_buf_alloc_count
|
||||
<< ", registered_buf_allocs: " << stats.disk_stats.registered_buf_alloc_count
|
||||
<< ", max_file_size: " << stats.disk_stats.max_file_size;
|
||||
<< ", max_file_size: " << stats.disk_stats.max_file_size
|
||||
<< ", pending_ops: " << stats.disk_stats.pending_ops;
|
||||
}
|
||||
|
||||
struct OpManagerTest : PoolTestBase, OpManager {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue