forked from TrueCloudLab/frostfs-node
[#424] morphcache: Use labels for method duration
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
85deb12f4d
commit
c8023a9c8d
3 changed files with 16 additions and 48 deletions
|
@ -86,7 +86,7 @@ func (c *Client) NNSHash() (util.Uint160, error) {
|
|||
startedAt := time.Now()
|
||||
|
||||
defer func() {
|
||||
c.cache.metrics.AddNNSContractHashDuration(success, time.Since(startedAt))
|
||||
c.cache.metrics.AddMethodDuration("NNSContractHash", success, time.Since(startedAt))
|
||||
}()
|
||||
|
||||
nnsHash := c.cache.nns()
|
||||
|
@ -233,7 +233,7 @@ func (c *Client) contractGroupKey() (*keys.PublicKey, error) {
|
|||
success := false
|
||||
startedAt := time.Now()
|
||||
defer func() {
|
||||
c.cache.metrics.AddGroupKeyDuration(success, time.Since(startedAt))
|
||||
c.cache.metrics.AddMethodDuration("GroupKey", success, time.Since(startedAt))
|
||||
}()
|
||||
|
||||
if gKey := c.cache.groupKey(); gKey != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue