forked from TrueCloudLab/frostfs-node
[#426] engine: Support duration metrics
With `enable metrics` option, engine will collect durations for all public methods. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
bc6e7a823b
commit
980b774af2
12 changed files with 169 additions and 0 deletions
|
@ -49,6 +49,10 @@ var errInhumeFailure = errors.New("inhume operation failed")
|
|||
// Inhume calls metabase. Inhume method to mark object as removed. It won't be
|
||||
// removed physically from shard until `Delete` operation.
|
||||
func (e *StorageEngine) Inhume(prm *InhumePrm) (*InhumeRes, error) {
|
||||
if e.enableMetrics {
|
||||
defer elapsed(inhumeDuration)()
|
||||
}
|
||||
|
||||
shPrm := new(shard.InhumePrm)
|
||||
|
||||
for i := range prm.addrs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue