Skip to content

Cleanup policies: format cleanup cache hit ratio

🎪 Context

In !69459 (merged), we added a caching system to the background jobs that execute cleanup policies for container images.

At that time, we updated the background job to log the cache hit ratio so that we establish observability on the performance of the cache.

The hit ratio is currently logged as a float number between 0 and 1. We want to build a counter in Kibana that will show the cache performance in the last 24 hours. It would be more useable if the hit ratio is logged as percentage (eg. 0.27669 -> 27.67)

This MR does exactly that.

🔍 What does this MR do and why?

  • Update the format of the cache hit ratio logged by the cleanup policy background job.
  • Update the related specs

This MR has no changelog as it has no impact on user features. We are merely changing how a number is dumped in the log.

📸 Screenshots or screen recordings

n / a

🎱 How to set up and validate locally

Follow !69459 (merged) and check the logs for the hit ratio.

📐 MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by David Fernandez

Merge request reports