Skip to content

Add JSON Queries section to README.md#514

Closed
abitrolly wants to merge 1 commit intoZxilly:masterfrom
abitrolly:patch-1
Closed

Add JSON Queries section to README.md#514
abitrolly wants to merge 1 commit intoZxilly:masterfrom
abitrolly:patch-1

Conversation

@abitrolly
Copy link
Copy Markdown

@abitrolly abitrolly commented Mar 29, 2026

To collect useful oneliners for analysis.

Needed it here opencontainers/runc#5184 (comment)

@abitrolly abitrolly requested a review from Zxilly as a code owner March 29, 2026 08:51
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #514   +/-   ##
=======================================
  Coverage   87.99%   87.99%           
=======================================
  Files          86       86           
  Lines        3939     3939           
  Branches      102      102           
=======================================
  Hits         3466     3466           
  Misses        322      322           
  Partials      151      151           
Flag Coverage Δ
integration 59.84% <ø> (ø)
ui 90.36% <ø> (ø)
unit 71.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📢 Thoughts on this report? Let us know!

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 29, 2026

Bundle Report

Bundle size has no change ✅

@abitrolly
Copy link
Copy Markdown
Author

There is another query I needed - a breakdown of sizes by function for comparison.

gsa /usr/bin/runc -f json | jq -r '.packages."github.com/urfave/cli".files[] |
  "\(.file_path)", (.functions[] | "    \(."type") \(.receiver).\(.name) \t\t\(.code_size)")

But jq doesn't have a function for human readable output and columns are not aligned, and there is extra "." when .receiver is empty.

...
/builddir/build/BUILD/runc-1.4.1-build/runc-1.4.1/vendor/github.com/urfave/cli/fish.go
    method (*App).ToFishCompletion 		224
    method (*App).writeFishCompletionTemplate 		2016
    method (*App).prepareFishCommands 		5120
    method (*App).prepareFishFlags 		3296
    method (*App).fishSubcommandHelper 		256
/builddir/build/BUILD/runc-1.4.1-build/runc-1.4.1/vendor/github.com/urfave/cli/flag_generic.go
    method (*Context).Generic 		160
    method (*Context).GlobalGeneric 		288

@Zxilly
Copy link
Copy Markdown
Owner

Zxilly commented Mar 29, 2026

Thanks for the contribution, but this seems too limited to a specific scenario, and the Bash syntax doesn't look quite right.

@Zxilly Zxilly closed this Apr 25, 2026
@abitrolly
Copy link
Copy Markdown
Author

@Zxilly so what syntax do you propose?

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