diff --git a/CHANGELOG.md b/CHANGELOG.md index 75c24baa82310e4c9414949ab03bf2485c3629a7..99cebf46912585640a2149d8794094d5ac52be06 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org). ## [Unreleased] +### Changed +- Better formatting for graphed values in devconsole status view. + ### Fixed - Correct cursor usage in group listings using only open/closed group state filter. - Remap original Google IDs to "next generation player IDs". diff --git a/server/status_handler.go b/server/status_handler.go index c3d756025d3b480690b0a3def56e192bbeebd1c4..20116f0c090ce4a734df50da1ef4b82b5f4facc5 100644 --- a/server/status_handler.go +++ b/server/status_handler.go @@ -16,6 +16,7 @@ package server import ( "context" + "math" "runtime" "github.com/heroiclabs/nakama/v3/console" @@ -55,10 +56,10 @@ func (s *LocalStatusHandler) GetStatus(ctx context.Context) ([]*console.StatusLi PresenceCount: int32(s.tracker.Count()), MatchCount: int32(s.matchRegistry.Count()), GoroutineCount: int32(runtime.NumGoroutine()), - AvgLatencyMs: s.metrics.SnapshotLatencyMs(), - AvgRateSec: s.metrics.SnapshotRateSec(), - AvgInputKbs: s.metrics.SnapshotRecvKbSec(), - AvgOutputKbs: s.metrics.SnapshotSentKbSec(), + AvgLatencyMs: math.Floor(s.metrics.SnapshotLatencyMs()*100) / 100, + AvgRateSec: math.Floor(s.metrics.SnapshotRateSec()*100) / 100, + AvgInputKbs: math.Floor(s.metrics.SnapshotRecvKbSec()*100) / 100, + AvgOutputKbs: math.Floor(s.metrics.SnapshotSentKbSec()*100) / 100, }, }, nil }