mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-03 18:43:38 +01:00
19 lines
427 B
Go
19 lines
427 B
Go
package ai
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prometheus/client_golang/prometheus/testutil"
|
|
)
|
|
|
|
func TestPatrolMetrics_StreamRecorders(t *testing.T) {
|
|
m := GetPatrolMetrics()
|
|
m.RecordStreamReplay(3)
|
|
m.RecordStreamSnapshot("buffer_rotated")
|
|
m.RecordStreamMiss()
|
|
|
|
if got := testutil.CollectAndCount(m.streamReplayBatch); got != 1 {
|
|
t.Fatalf("expected stream replay batch histogram to be registered once, got %d", got)
|
|
}
|
|
}
|