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
|
@ -60,6 +60,10 @@ func (r *RngRes) Object() *object.Object {
|
|||
// Returns ErrAlreadyRemoved if requested object is inhumed.
|
||||
// Returns ErrRangeOutOfBounds if requested object range is out of bounds.
|
||||
func (e *StorageEngine) GetRange(prm *RngPrm) (*RngRes, error) {
|
||||
if e.enableMetrics {
|
||||
defer elapsed(rangeDuration)()
|
||||
}
|
||||
|
||||
var (
|
||||
obj *object.Object
|
||||
siErr *objectSDK.SplitInfoError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue