From 71bbeddb64793cc5e7be7d4d144293dc1d38efcc Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Tue, 13 Jun 2023 15:03:37 +0300 Subject: [PATCH] [#424] metrics: Drop unused arg Signed-off-by: Dmitrii Stepanov --- pkg/metrics/morphcache.go | 5 ++--- pkg/morph/client/notary.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/metrics/morphcache.go b/pkg/metrics/morphcache.go index 2440adcf..000ec0d8 100644 --- a/pkg/metrics/morphcache.go +++ b/pkg/metrics/morphcache.go @@ -6,7 +6,6 @@ import ( "time" "git.frostfs.info/TrueCloudLab/frostfs-observability/metrics" - "github.com/nspcc-dev/neo-go/pkg/util" "github.com/prometheus/client_golang/prometheus" ) @@ -20,7 +19,7 @@ type MorphCacheMetrics interface { AddGroupKeyDuration(success bool, d time.Duration) - AddTxHeightDuration(hash util.Uint256, success bool, d time.Duration) + AddTxHeightDuration(success bool, d time.Duration) } type morphCacheMetrics struct { @@ -60,7 +59,7 @@ func (m *morphCacheMetrics) AddGroupKeyDuration(success bool, d time.Duration) { ).Observe(float64(d)) } -func (m *morphCacheMetrics) AddTxHeightDuration(hash util.Uint256, success bool, d time.Duration) { +func (m *morphCacheMetrics) AddTxHeightDuration(success bool, d time.Duration) { m.txHeightDuration.With( prometheus.Labels{ mcSuccess: strconv.FormatBool(success), diff --git a/pkg/morph/client/notary.go b/pkg/morph/client/notary.go index 680ba6a6..e567b6df 100644 --- a/pkg/morph/client/notary.go +++ b/pkg/morph/client/notary.go @@ -800,7 +800,7 @@ func (c *Client) getTransactionHeight(h util.Uint256) (uint32, error) { success := false startedAt := time.Now() defer func() { - c.cache.metrics.AddTxHeightDuration(h, success, time.Since(startedAt)) + c.cache.metrics.AddTxHeightDuration(success, time.Since(startedAt)) }() if rh, ok := c.cache.txHeights.Get(h); ok {