[#424] morphcache: Use labels for method duration

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-13 16:15:59 +03:00
parent 85deb12f4d
commit c8023a9c8d
3 changed files with 16 additions and 48 deletions

View file

@ -800,7 +800,7 @@ func (c *Client) getTransactionHeight(h util.Uint256) (uint32, error) {
success := false
startedAt := time.Now()
defer func() {
c.cache.metrics.AddTxHeightDuration(success, time.Since(startedAt))
c.cache.metrics.AddMethodDuration("TxHeight", success, time.Since(startedAt))
}()
if rh, ok := c.cache.txHeights.Get(h); ok {