• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

topfreegames / pitaya / 27216433365
61%
master: 69%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 09 Jun 2026 03:21PM UTC
Jobs 1
Files 85
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jun 2026 03:19PM UTC coverage: 61.468% (-0.2%) from 61.703%
27216433365

push

github

web-flow
feat(metrics): instrument handler/RPC channel buffers and worker pools (#500)

Several buffered channels and goroutine pools that sit on the hot path
had no instrumentation, so there was no way to tell from metrics when a
server was hitting its buffer (BUFFER_*) or concurrency (CONCURRENCY_*)
limits — the channels would just fill and apply backpressure silently.

Add capacity/utilization metrics for the previously-unmonitored ones:

Channel capacity (reuses channel_capacity_histogram, new `channel` tags):
  - handler_chlocalprocess   (buffer.handler.localprocess)
  - handler_chremoteprocess  (buffer.handler.remoteprocess)
  - rpc_server_userkickchan  (shares the nats messages buffer)

Worker-pool utilization (new gauges pitaya_worker_pool_busy_workers and
pitaya_worker_pool_total_workers, tagged by `pool`):
  - handler_dispatch    (concurrency.handler.dispatch)
  - rpc_server_remote   (cluster.rpc.server.nats.services)

Implementation:
  - Handler dispatch channels and pool are sampled periodically from
    App.periodicMetrics (no extra work on the per-message path).
  - userKickCh and the remote pool are reported from the existing nats
    reportMetrics, alongside the channels already covered there.
  - Add metrics.ReportChannelCapacity / ReportWorkerPoolUsage helpers and
    refactor nats reportMetrics to use them; each call builds its own
    label map so prometheus's label mutation can't leak across reporters.

Busy-worker counts are tracked with atomic int32 counters (two adds per
message, dwarfed by the actual handler/RPC work). Purely additive — no
existing metric, behaviour, or config is changed; works on both the
prometheus and statsd reporters.

26 of 84 new or added lines in 5 files covered. (30.95%)

5 existing lines in 3 files now uncovered.

5191 of 8445 relevant lines covered (61.47%)

0.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
22
0.0
0.0% metrics/prometheus_reporter.go
21
52.22
-15.89% metrics/report.go
10
69.39
-1.72% service/handler.go
5
73.31
2.83% cluster/nats_rpc_server.go

Coverage Regressions

Lines Coverage ∆ File
2
78.26
0.0% modules/binary.go
2
69.39
-1.72% service/handler.go
1
73.31
2.83% cluster/nats_rpc_server.go
Jobs
ID Job ID Ran Files Coverage
1 27216433365.1 09 Jun 2026 03:21PM UTC 85
61.47
GitHub Action Run
Source Files on build 27216433365
  • Tree
  • List 85
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ccf9f673 on github
  • Prev Build on v2 (#25187905565)
  • Next Build on v2 (#27218689096)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc