Skip to content

Add cache_weight_mb gauge#10640

Closed
dimas-b wants to merge 1 commit intoprojectnessie:mainfrom
dimas-b:cache-weight-metrics
Closed

Add cache_weight_mb gauge#10640
dimas-b wants to merge 1 commit intoprojectnessie:mainfrom
dimas-b:cache-weight-metrics

Conversation

@dimas-b
Copy link
Member

@dimas-b dimas-b commented Apr 3, 2025

Expose the weighted size of the objects cache as a metric.

Since weigher is designed to approximate actual size of objects on the heap, the metric is defined in MB and can be compared to cache_capacity_mb exactly and to heap usage approximately (but with good accuracy).

Expose the weighted size of the objects cache as a metric.

Since weigher is designed to approximate actual size of objects
on the heap, the metric is defined in MB and can be compared
to `cache_capacity_mb` exactly and to heap usage approximately
(but with good accuracy).
@dimas-b dimas-b requested a review from snazy April 3, 2025 01:11
}

private double weightedSizeMb() {
// Note: calling Policy.Eviction::weightedSize may actually perform evictions.
Copy link
Member Author

@dimas-b dimas-b Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose evictions in this call may only happen in practice under load.

@snazy
Copy link
Member

snazy commented Apr 7, 2025

Guess we can close this one?

@dimas-b
Copy link
Member Author

dimas-b commented Apr 7, 2025

Obsoleted by #10629

@dimas-b dimas-b closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments