chore: consolidate facade stats under a single struct (#2368)

* chore: consolidate facade stats under a single struct

Remove connection stats from server state and move them under FacadeStats.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>

* chore: fixing comments

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-01-03 10:09:00 +02:00 committed by GitHub
parent e063180c8d
commit 0e72846457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 138 additions and 129 deletions

View file

@ -195,10 +195,8 @@ ConnectionMemoryUsage GetConnectionMemoryUsage(ServerFamily* server) {
}
shard_set->pool()->Await([&](unsigned index, auto*) {
mems[index].pipelined_bytes +=
server->service().GetThreadLocalConnectionStats()->pipeline_cmd_cache_bytes;
mems[index].pipelined_bytes +=
server->service().GetThreadLocalConnectionStats()->dispatch_queue_bytes;
mems[index].pipelined_bytes += tl_facade_stats->conn_stats.pipeline_cmd_cache_bytes;
mems[index].pipelined_bytes += tl_facade_stats->conn_stats.dispatch_queue_bytes;
});
ConnectionMemoryUsage mem;