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
|
@ -34,8 +34,8 @@ func (p *PutPrm) WithObject(obj *object.Object) *PutPrm {
|
|||
// Returns any error encountered that
|
||||
// did not allow to completely save the object.
|
||||
func (e *StorageEngine) Put(prm *PutPrm) (*PutRes, error) {
|
||||
if e.enableMetrics {
|
||||
defer elapsed(putDuration)()
|
||||
if e.metrics != nil {
|
||||
defer elapsed(e.metrics.AddPutDuration)()
|
||||
}
|
||||
|
||||
_, err := e.exists(prm.obj.Address()) // todo: make this check parallel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue