From fb11842fac391f138ac2bc4bc358468e0d40616f Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Mon, 18 Dec 2023 14:01:36 -0600 Subject: [PATCH] Add block height --- internal/metrics/fullnode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/metrics/fullnode.go b/internal/metrics/fullnode.go index 8ee7236..4864a5f 100644 --- a/internal/metrics/fullnode.go +++ b/internal/metrics/fullnode.go @@ -318,10 +318,10 @@ func (s *FullNodeServiceMetrics) Block(resp *types.WebsocketResponse) { s.validationTime.Set(block.ValidationTime) if viper.GetBool("log-block-times") { - if err = utils.LogToFile("pre-validation-time.log", fmt.Sprintf("%f", block.PreValidationTime)); err != nil { + if err = utils.LogToFile("pre-validation-time.log", fmt.Sprintf("%d:%f", block.Height, block.PreValidationTime)); err != nil { log.Error(err.Error()) } - if err = utils.LogToFile("validation-time.log", fmt.Sprintf("%f", block.ValidationTime)); err != nil { + if err = utils.LogToFile("validation-time.log", fmt.Sprintf("%d:%f", block.Height, block.ValidationTime)); err != nil { log.Error(err.Error()) } }