Skip to content

add an option to show JSON cache metrics#4464

Merged
tonistiigi merged 3 commits intomoby:masterfrom
azr:azr/cache-metrics
Jan 8, 2024
Merged

add an option to show JSON cache metrics#4464
tonistiigi merged 3 commits intomoby:masterfrom
azr:azr/cache-metrics

Conversation

@azr
Copy link
Copy Markdown
Contributor

@azr azr commented Dec 5, 2023

Hello there,

this adds a new json-cache-metrics parameter to write to an os.File. Handy in deamonless mode, mode with which it is a bit hard to scrape metrics the good way.

At first it was just writting to stderr like the rest, after everything is done. But while seeking the end of log file to just get the last line works, it turned out a bit brittle at scale (in our case).

So I made it possible to pick a file just like for trace. (But also kept the std(out/err) option, nice locally)

LMK what you think.

Closes #4445

Copy link
Copy Markdown
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

Ah, from the initial issue I thought you meant something on the daemon side. I think this is fine though, maybe "debug" prefix for the buildctl flag? @AkihiroSuda wdyt?

@AkihiroSuda
Copy link
Copy Markdown
Member

I think this is fine though, maybe "debug" prefix for the buildctl flag? @AkihiroSuda wdyt?

👍
eventually we may drop the prefix though

@azr
Copy link
Copy Markdown
Contributor Author

azr commented Dec 6, 2023

Owkay, switching for debug-json-cache-metrics !

@azr azr force-pushed the azr/cache-metrics branch 3 times, most recently from 34836ad to 71f1a05 Compare December 6, 2023 08:44
azr added 3 commits December 6, 2023 11:04
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
@azr
Copy link
Copy Markdown
Contributor Author

azr commented Jan 8, 2024

Thanks for the green checkmark ! Is there anything I can do from here ?

@tonistiigi tonistiigi merged commit 8a7e5c7 into moby:master Jan 8, 2024
@azr azr deleted the azr/cache-metrics branch January 9, 2024 08:27
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.

Feature request: cache hit / miss metric

3 participants