Skip to content
Snippets Groups Projects
Commit b0fd6933 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Better formatting for graphed values in devconsole status view.

parent 84c2c35f
Branches
Tags
No related merge requests found
...@@ -4,6 +4,9 @@ All notable changes to this project are documented below. ...@@ -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). The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).
## [Unreleased] ## [Unreleased]
### Changed
- Better formatting for graphed values in devconsole status view.
### Fixed ### Fixed
- Correct cursor usage in group listings using only open/closed group state filter. - Correct cursor usage in group listings using only open/closed group state filter.
- Remap original Google IDs to "next generation player IDs". - Remap original Google IDs to "next generation player IDs".
......
...@@ -16,6 +16,7 @@ package server ...@@ -16,6 +16,7 @@ package server
import ( import (
"context" "context"
"math"
"runtime" "runtime"
"github.com/heroiclabs/nakama/v3/console" "github.com/heroiclabs/nakama/v3/console"
...@@ -55,10 +56,10 @@ func (s *LocalStatusHandler) GetStatus(ctx context.Context) ([]*console.StatusLi ...@@ -55,10 +56,10 @@ func (s *LocalStatusHandler) GetStatus(ctx context.Context) ([]*console.StatusLi
PresenceCount: int32(s.tracker.Count()), PresenceCount: int32(s.tracker.Count()),
MatchCount: int32(s.matchRegistry.Count()), MatchCount: int32(s.matchRegistry.Count()),
GoroutineCount: int32(runtime.NumGoroutine()), GoroutineCount: int32(runtime.NumGoroutine()),
AvgLatencyMs: s.metrics.SnapshotLatencyMs(), AvgLatencyMs: math.Floor(s.metrics.SnapshotLatencyMs()*100) / 100,
AvgRateSec: s.metrics.SnapshotRateSec(), AvgRateSec: math.Floor(s.metrics.SnapshotRateSec()*100) / 100,
AvgInputKbs: s.metrics.SnapshotRecvKbSec(), AvgInputKbs: math.Floor(s.metrics.SnapshotRecvKbSec()*100) / 100,
AvgOutputKbs: s.metrics.SnapshotSentKbSec(), AvgOutputKbs: math.Floor(s.metrics.SnapshotSentKbSec()*100) / 100,
}, },
}, nil }, nil
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment