forked from TrueCloudLab/frostfs-node
[#424] metrics: Refactor engine metrics
Use histogram vector to measure request duration. Fix naming like in Prometheus best practice. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c8023a9c8d
commit
1b364d8cf4
13 changed files with 46 additions and 122 deletions
|
@ -60,7 +60,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(e.metrics.AddSearchDuration)()
|
||||
defer elapsed("Search", e.metrics.AddMethodDuration)()
|
||||
}
|
||||
|
||||
addrList := make([]oid.Address, 0)
|
||||
|
@ -109,7 +109,7 @@ func (e *StorageEngine) List(limit uint64) (res SelectRes, err error) {
|
|||
|
||||
func (e *StorageEngine) list(limit uint64) (SelectRes, error) {
|
||||
if e.metrics != nil {
|
||||
defer elapsed(e.metrics.AddListObjectsDuration)()
|
||||
defer elapsed("ListObjects", e.metrics.AddMethodDuration)()
|
||||
}
|
||||
|
||||
addrList := make([]oid.Address, 0, limit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue