fix(server): Add additional metrics (#1975)

* fix(server): Clean up metrics collection
* feat(server): Replication memory metrics
* fix(server): Limit dispatch queue size

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
Vladislav 2023-10-06 14:16:22 +03:00 committed by GitHub
parent 2d28b48481
commit e84d9a65d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 307 additions and 172 deletions

View file

@ -23,6 +23,17 @@ namespace dfly {
__thread ServerState* ServerState::state_ = nullptr;
ServerState::Stats& ServerState::Stats::operator+=(const ServerState::Stats& other) {
this->ooo_tx_cnt += other.ooo_tx_cnt;
this->eval_io_coordination_cnt += other.eval_io_coordination_cnt;
this->eval_shardlocal_coordination_cnt += other.eval_shardlocal_coordination_cnt;
this->eval_squashed_flushes += other.eval_squashed_flushes;
this->tx_schedule_cancel_cnt += other.tx_schedule_cancel_cnt;
static_assert(sizeof(Stats) == 5 * 8);
return *this;
}
void MonitorsRepo::Add(facade::Connection* connection) {
VLOG(1) << "register connection "
<< " at address 0x" << std::hex << (const void*)connection << " for thread "