forked from TrueCloudLab/frostfs-node
[#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 (r *ListContainersRes) Containers() []*container.ID {
|
|||
|
||||
// ContainerSize returns sum of estimation container sizes among all shards.
|
||||
func (e *StorageEngine) ContainerSize(prm *ContainerSizePrm) *ContainerSizeRes {
|
||||
if e.enableMetrics {
|
||||
defer elapsed(estimateContainerSizeDuration)()
|
||||
if e.metrics != nil {
|
||||
defer elapsed(e.metrics.AddEstimateContainerSizeDuration)()
|
||||
}
|
||||
|
||||
return &ContainerSizeRes{
|
||||
|
@ -74,8 +74,8 @@ func (e *StorageEngine) containerSize(id *container.ID) (total uint64) {
|
|||
|
||||
// ListContainers returns unique container IDs presented in the engine objects.
|
||||
func (e *StorageEngine) ListContainers(_ *ListContainersPrm) *ListContainersRes {
|
||||
if e.enableMetrics {
|
||||
defer elapsed(listContainersDuration)()
|
||||
if e.metrics != nil {
|
||||
defer elapsed(e.metrics.AddListContainersDuration)()
|
||||
}
|
||||
|
||||
return &ListContainersRes{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue