[#1410] engine: Provide the default implementation to MetricsRegister
All checks were successful
DCO action / DCO (pull_request) Successful in 1m6s
Tests and linters / Run gofumpt (pull_request) Successful in 1m26s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m9s
Vulncheck / Vulncheck (pull_request) Successful in 2m16s
Build / Build Components (pull_request) Successful in 2m40s
Tests and linters / gopls check (pull_request) Successful in 2m53s
Tests and linters / Staticcheck (pull_request) Successful in 3m11s
Tests and linters / Lint (pull_request) Successful in 3m42s
Tests and linters / Tests (pull_request) Successful in 4m29s
Tests and linters / Tests with -race (pull_request) Successful in 6m13s

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-10-03 10:40:56 +03:00
parent 82674c0439
commit 906f3edfaa
11 changed files with 77 additions and 55 deletions

View file

@ -66,9 +66,7 @@ func (e *StorageEngine) Get(ctx context.Context, prm GetPrm) (res GetRes, err er
}
func (e *StorageEngine) get(ctx context.Context, prm GetPrm) (GetRes, error) {
if e.metrics != nil {
defer elapsed("Get", e.metrics.AddMethodDuration)()
}
defer elapsed("Get", e.metrics.AddMethodDuration)()
errNotFound := new(apistatus.ObjectNotFound)