mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
memtables: count read row tombstones
Refs #7749. Signed-off-by: Michael Livshin <michael.livshin@scylladb.com>
This commit is contained in:
@@ -335,6 +335,7 @@ struct table_stats {
|
||||
int64_t memtable_partition_insertions = 0;
|
||||
int64_t memtable_partition_hits = 0;
|
||||
int64_t memtable_range_tombstone_reads = 0;
|
||||
int64_t memtable_row_tombstone_reads = 0;
|
||||
mutation_application_stats memtable_app_stats;
|
||||
utils::timed_rate_moving_average_and_histogram reads{256};
|
||||
utils::timed_rate_moving_average_and_histogram writes{256};
|
||||
|
||||
@@ -380,7 +380,11 @@ class partition_snapshot_read_accounter {
|
||||
public:
|
||||
explicit partition_snapshot_read_accounter(memtable& mt): _mt(mt) {}
|
||||
|
||||
void operator()(const clustering_row& cr) {}
|
||||
void operator()(const clustering_row& cr) {
|
||||
if (cr.tomb()) {
|
||||
++_mt._table_stats.memtable_row_tombstone_reads;
|
||||
}
|
||||
}
|
||||
void operator()(const static_row& sr) {}
|
||||
void operator()(const range_tombstone& rt) {
|
||||
++_mt._table_stats.memtable_range_tombstone_reads;
|
||||
|
||||
1
table.cc
1
table.cc
@@ -680,6 +680,7 @@ void table::set_metrics() {
|
||||
ms::make_counter("memtable_row_writes", _stats.memtable_app_stats.row_writes, ms::description("Number of row writes performed in memtables"))(cf)(ks),
|
||||
ms::make_counter("memtable_row_hits", _stats.memtable_app_stats.row_hits, ms::description("Number of rows overwritten by write operations in memtables"))(cf)(ks),
|
||||
ms::make_counter("memtable_range_tombstone_reads", _stats.memtable_range_tombstone_reads, ms::description("Number of range tombstones read from memtables"))(cf)(ks),
|
||||
ms::make_counter("memtable_row_tombstone_reads", _stats.memtable_row_tombstone_reads, ms::description("Number of row tombstones read from memtables"))(cf)(ks),
|
||||
ms::make_gauge("pending_tasks", ms::description("Estimated number of tasks pending for this column family"), _stats.pending_flushes)(cf)(ks),
|
||||
ms::make_gauge("live_disk_space", ms::description("Live disk space used"), _stats.live_disk_space_used)(cf)(ks),
|
||||
ms::make_gauge("total_disk_space", ms::description("Total disk space used"), _stats.total_disk_space_used)(cf)(ks),
|
||||
|
||||
Reference in New Issue
Block a user