From 032e59907b7491a9d8d6d7616f0761d9fa6135fc Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 11 Dec 2019 00:36:40 +0100 Subject: [PATCH] Add metric on election winners License: MIT Signed-off-by: Jakub Sztandera --- tools/stats/metrics.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/stats/metrics.go b/tools/stats/metrics.go index 8d63f1c6d..8082e3c51 100644 --- a/tools/stats/metrics.go +++ b/tools/stats/metrics.go @@ -124,8 +124,11 @@ func RecordTipsetPoints(ctx context.Context, api api.FullNode, pl *PointList, ti if err != nil { return err } + p := NewPoint("chain.election", 1) + p.AddTag("miner", blockheader.Miner.String()) + pl.AddPoint(p) - p := NewPoint("chain.blockheader_size", len(bs)) + p = NewPoint("chain.blockheader_size", len(bs)) pl.AddPoint(p) }