Skip to content

Commit 48a607c

Browse files
committed
metrics: fix neofs_node_engine_list_objects_time_bucket
The metric was called in a function that was not called anywhere because there is a similar function that is being used. Now the metric is called on the used function. Fix #3108. Signed-off-by: Andrey Butusov <[email protected]>
1 parent 64dac4c commit 48a607c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Changelog for NeoFS Node
1919
- The parent of the split object is not removed from the metabase (#3089)
2020
- A split expired object is not deleted after the lock is removed or expired (#3089)
2121
- `neofs_node_engine_list_containers_time_bucket` and `neofs_node_engine_exists_time_bucket` metrics (#3014)
22+
- `neofs_node_engine_list_objects_time_bucket` metric (#3120)
2223

2324
### Changed
2425
- Number of cuncurrenly handled notifications from the chain was increased from 10 to 300 for IR (#3068)

pkg/local_object_storage/engine/list.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ type Cursor struct {
2828
// Returns ErrEndOfListing if there are no more objects to return or count
2929
// parameter set to zero.
3030
func (e *StorageEngine) ListWithCursor(count uint32, cursor *Cursor) ([]objectcore.AddressWithType, *Cursor, error) {
31+
if e.metrics != nil {
32+
defer elapsed(e.metrics.AddListObjectsDuration)()
33+
}
34+
3135
result := make([]objectcore.AddressWithType, 0, count)
3236

3337
// 1. Get available shards and sort them.

0 commit comments

Comments
 (0)