Refactor metrics #213

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:refactoring/object-3610-metrics into master 2023-07-26 21:07:57 +00:00

Resolve funlen linters.

Resolve funlen linters.
dstepanov-yadro force-pushed refactoring/object-3610-metrics from a966fe240d to 1a1f8d1c7f 2023-04-05 09:47:46 +00:00 Compare
dstepanov-yadro requested review from storage-core-committers 2023-04-05 09:47:54 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-04-05 09:47:54 +00:00
fyrchik reviewed 2023-04-05 11:10:14 +00:00
@ -120,3 +30,1 @@
Help: "Accumulated size of all objects in a shard",
}, []string{shardIDLabelKey})
)
var ()
Owner

Hm

Hm
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
@ -138,3 +46,4 @@
}
}
func getListContainersDurationEngCounter() prometheus.Counter {
Owner

It feels a bit klunky, what about using engineMetric("list_containers_duration", "Accumulated duration of engine list containers operations") at the call site?

I think there is no need to duplicate namespace and subsystem in each function and without the it isn't worth to have a separate function.

It feels a bit klunky, what about using `engineMetric("list_containers_duration", "Accumulated duration of engine list containers operations")` at the call site? I think there is no need to duplicate namespace and subsystem in each function and without the it isn't worth to have a separate function.
Owner

Also, some of them follow the same pattern both in name and help.

Also, some of them follow the same pattern both in name and help.
Author
Member

Fixed

Fixed
fyrchik marked this conversation as resolved
@ -95,2 +79,2 @@
Help: "Accumulated get request process duration",
})
return objectServiceMetrics{
getCounter: newMethodCallCounter("get"),
Owner

We have duration for all methods, what about combining them together, inside newMethodCallCounter?

We have duration for all methods, what about combining them together, inside `newMethodCallCounter`?
Author
Member

I didn't catch the thought. duration and call counter are different metrics.

I didn't catch the thought. `duration` and `call counter` are different metrics.
Owner

Yes, but they all are generic and parametrized by method.
So, maybe not newMethodCallCounter, but newMethodCallMetrics?

Yes, but they all are generic and parametrized by method. So, maybe not `newMethodCallCounter`, but `newMethodCallMetrics`?
Author
Member

Done.

newMethodCallMetrics - too general, metrics can be different.

Done. ```newMethodCallMetrics``` - too general, metrics can be different.
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed refactoring/object-3610-metrics from 1a1f8d1c7f to c8a8765046 2023-04-05 12:22:00 +00:00 Compare
dstepanov-yadro force-pushed refactoring/object-3610-metrics from c8a8765046 to 9172573c54 2023-04-05 13:01:53 +00:00 Compare
aarifullin approved these changes 2023-04-05 13:39:13 +00:00
aarifullin left a comment
Member

LGTM

LGTM
dstepanov-yadro force-pushed refactoring/object-3610-metrics from 9172573c54 to c6fc3a7f4c 2023-04-05 14:20:14 +00:00 Compare
dstepanov-yadro force-pushed refactoring/object-3610-metrics from c6fc3a7f4c to 02f2ebd890 2023-04-05 14:55:45 +00:00 Compare
dstepanov-yadro reviewed 2023-04-07 14:20:01 +00:00
@ -136,2 +33,2 @@
containerSize: *containerSize,
payloadSize: *payloadSize,
listContainersDuration: newEngineMethodDurationCounter("list_containers_"),
estimateContainerSizeDuration: newEngineCounter("estimate_container_size_duration", "Accumulated duration of engine container size estimate operations"),
Author
Member

Different word order in name and help.

Different word order in name and help.
dstepanov-yadro force-pushed refactoring/object-3610-metrics from 02f2ebd890 to 49142dc9eb 2023-04-07 14:21:06 +00:00 Compare
dstepanov-yadro force-pushed refactoring/object-3610-metrics from 49142dc9eb to 02831d427b 2023-04-10 06:43:46 +00:00 Compare
acid-ant approved these changes 2023-04-10 06:49:07 +00:00
fyrchik approved these changes 2023-04-10 07:32:47 +00:00
fyrchik merged commit 02831d427b into master 2023-04-10 07:32:59 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#213
No description provided.