From aa2d8d1922f5f284f1bbf8294834af95f06f5ec8 Mon Sep 17 00:00:00 2001 From: papabear99 <89408276+papabear99@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:15:20 -0700 Subject: [PATCH 1/5] Initialize Winning Tickets and Current Sessions to 0 --- monitor/census.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitor/census.go b/monitor/census.go index d6d0a7390b..01d416d10e 100644 --- a/monitor/census.go +++ b/monitor/census.go @@ -1141,6 +1141,8 @@ func SetTranscodersNumberAndLoad(load, capacity, number int) { stats.Record(census.ctx, census.mTranscodersLoad.M(int64(load))) stats.Record(census.ctx, census.mTranscodersCapacity.M(int64(capacity))) stats.Record(census.ctx, census.mTranscodersNumber.M(int64(number))) + stats.Record(census.ctx, census.mWinningTicketsRecv.M(int64(number))) + stats.Record(census.ctx, census.mCurrentSessions.M(int64(number))) } func SegmentEmerged(ctx context.Context, nonce, seqNo uint64, profilesNum int, dur float64) { From bc68563ee46f8d0dc83b8adc3c13da585d951c8d Mon Sep 17 00:00:00 2001 From: papabear99 <89408276+papabear99@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:35:46 -0700 Subject: [PATCH 2/5] Update census.go Moved functions to // init metrics values SetTranscodersNumberAndLoad(0, 0, 0) --- monitor/census.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitor/census.go b/monitor/census.go index 01d416d10e..3d6dd9e43e 100644 --- a/monitor/census.go +++ b/monitor/census.go @@ -855,6 +855,8 @@ func InitCensus(nodeType NodeType, version string) { Exporter = pe // init metrics values SetTranscodersNumberAndLoad(0, 0, 0) + stats.Record(census.ctx, census.mWinningTicketsRecv.M(int64(0))) + stats.Record(census.ctx, census.mCurrentSessions.M(int64(0))) } /* From c67b0161d09d5e8db25a081929a1a2a46b0b5be6 Mon Sep 17 00:00:00 2001 From: papabear99 <89408276+papabear99@users.noreply.github.com> Date: Mon, 23 Oct 2023 08:44:03 -0700 Subject: [PATCH 3/5] Update census.go Removed lines from first change --- monitor/census.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monitor/census.go b/monitor/census.go index 3d6dd9e43e..6ede5e438f 100644 --- a/monitor/census.go +++ b/monitor/census.go @@ -1143,8 +1143,7 @@ func SetTranscodersNumberAndLoad(load, capacity, number int) { stats.Record(census.ctx, census.mTranscodersLoad.M(int64(load))) stats.Record(census.ctx, census.mTranscodersCapacity.M(int64(capacity))) stats.Record(census.ctx, census.mTranscodersNumber.M(int64(number))) - stats.Record(census.ctx, census.mWinningTicketsRecv.M(int64(number))) - stats.Record(census.ctx, census.mCurrentSessions.M(int64(number))) + } func SegmentEmerged(ctx context.Context, nonce, seqNo uint64, profilesNum int, dur float64) { From c255295afe376c79b6d3eceb4904ce5c943e1c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Leszko?= Date: Tue, 24 Oct 2023 09:47:35 +0200 Subject: [PATCH 4/5] Update monitor/census.go --- monitor/census.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/census.go b/monitor/census.go index 6ede5e438f..cf78de84e5 100644 --- a/monitor/census.go +++ b/monitor/census.go @@ -856,7 +856,7 @@ func InitCensus(nodeType NodeType, version string) { // init metrics values SetTranscodersNumberAndLoad(0, 0, 0) stats.Record(census.ctx, census.mWinningTicketsRecv.M(int64(0))) - stats.Record(census.ctx, census.mCurrentSessions.M(int64(0))) + stats.Record(census.ctx, census.mCurrentSessions.M(int64(0))) } /* From 2335cecca1de75d9f450d3a08f018b70ad538dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Leszko?= Date: Tue, 24 Oct 2023 09:47:50 +0200 Subject: [PATCH 5/5] Update monitor/census.go --- monitor/census.go | 1 - 1 file changed, 1 deletion(-) diff --git a/monitor/census.go b/monitor/census.go index cf78de84e5..f34396d49b 100644 --- a/monitor/census.go +++ b/monitor/census.go @@ -1143,7 +1143,6 @@ func SetTranscodersNumberAndLoad(load, capacity, number int) { stats.Record(census.ctx, census.mTranscodersLoad.M(int64(load))) stats.Record(census.ctx, census.mTranscodersCapacity.M(int64(capacity))) stats.Record(census.ctx, census.mTranscodersNumber.M(int64(number))) - } func SegmentEmerged(ctx context.Context, nonce, seqNo uint64, profilesNum int, dur float64) {