add metrics and optimize query

This commit is contained in:
2023-11-03 23:59:35 +03:00
parent e69244a2ff
commit 3d789437c2
3 changed files with 87 additions and 54 deletions

View File

@ -109,7 +109,7 @@ func (r *rpsReporter) loop() {
ticker := time.NewTicker(time.Second)
for range ticker.C {
rps := r.reset()
dbStats := r.db.GetStats()
dbStats := r.db.GetDBStats()
r.log.Info(
"tick",
slog.Int64("rps", int64(rps)),