Skip to content

Commit 9678680

Browse files
Added aggregate and total ops and avgs to UI dashboard
1 parent 213c6e2 commit 9678680

File tree

2 files changed

+153
-60
lines changed

2 files changed

+153
-60
lines changed

internal/webui/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ func (s *WebServer) handleStart(w http.ResponseWriter, r *http.Request) {
192192
cfg.CSVExportPath = v
193193
}
194194

195-
// Integers: Use the pre-loaded config value as the fallback instead of hardcoded numbers!
196195
cfg.ConnectionParams.ConnectionTimeout = parseInt(r.FormValue("connection_timeout"), cfg.ConnectionParams.ConnectionTimeout)
197196
cfg.ConnectionParams.ServerSelectionTimeout = parseInt(r.FormValue("server_selection_timeout"), cfg.ConnectionParams.ServerSelectionTimeout)
198197
cfg.ConnectionParams.MaxPoolSize = parseInt(r.FormValue("max_pool_size"), cfg.ConnectionParams.MaxPoolSize)
@@ -509,11 +508,13 @@ func (s *WebServer) handleStats(w http.ResponseWriter, r *http.Request) {
509508
"upsertOps": atomic.LoadUint64(&collector.UpsertOps),
510509
"updateOps": atomic.LoadUint64(&collector.UpdateOps),
511510
"deleteOps": atomic.LoadUint64(&collector.DeleteOps),
511+
"aggOps": atomic.LoadUint64(&collector.AggOps),
512512

513513
"findLatAvg": collector.FindHist.GetAverage(),
514514
"insertLatAvg": collector.InsertHist.GetAverage(),
515515
"updateLatAvg": collector.UpdateHist.GetAverage(),
516516
"deleteLatAvg": collector.DeleteHist.GetAverage(),
517+
"aggLatAvg": collector.AggHist.GetAverage(),
517518
}
518519
json.NewEncoder(w).Encode(statsResp)
519520
}

0 commit comments

Comments
 (0)