forked from TrueCloudLab/frostfs-node
[#1410] engine: Provide the default implementation to MetricsRegister
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
9206ce5cd2
commit
9a87acb87a
11 changed files with 77 additions and 55 deletions
|
@ -59,9 +59,7 @@ func (e *StorageEngine) Select(ctx context.Context, prm SelectPrm) (res SelectRe
|
|||
}
|
||||
|
||||
func (e *StorageEngine) _select(ctx context.Context, prm SelectPrm) (SelectRes, error) {
|
||||
if e.metrics != nil {
|
||||
defer elapsed("Search", e.metrics.AddMethodDuration)()
|
||||
}
|
||||
defer elapsed("Search", e.metrics.AddMethodDuration)()
|
||||
|
||||
addrList := make([]oid.Address, 0)
|
||||
uniqueMap := make(map[string]struct{})
|
||||
|
@ -108,9 +106,7 @@ func (e *StorageEngine) List(ctx context.Context, limit uint64) (res SelectRes,
|
|||
}
|
||||
|
||||
func (e *StorageEngine) list(ctx context.Context, limit uint64) (SelectRes, error) {
|
||||
if e.metrics != nil {
|
||||
defer elapsed("ListObjects", e.metrics.AddMethodDuration)()
|
||||
}
|
||||
defer elapsed("ListObjects", e.metrics.AddMethodDuration)()
|
||||
|
||||
addrList := make([]oid.Address, 0, limit)
|
||||
uniqueMap := make(map[string]struct{})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue