[#426] Put prometheus behind pkg/metrics
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
3c0e47e6fd
commit
b8e10571c6
19 changed files with 561 additions and 311 deletions
|
@ -38,8 +38,8 @@ func (p *ExistsRes) Exists() bool {
|
|||
// Returns any error encountered that does not allow to
|
||||
// unambiguously determine the presence of an object.
|
||||
func (e *StorageEngine) Exists(prm *ExistsPrm) (*ExistsRes, error) {
|
||||
if e.enableMetrics {
|
||||
defer elapsed(existsDuration)()
|
||||
if e.metrics != nil {
|
||||
defer elapsed(e.metrics.AddExistsDuration)()
|
||||
}
|
||||
|
||||
exists, err := e.exists(prm.addr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue