Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON output format #48

Closed
theduke opened this issue Sep 21, 2019 · 6 comments
Closed

JSON output format #48

theduke opened this issue Sep 21, 2019 · 6 comments

Comments

@theduke
Copy link

theduke commented Sep 21, 2019

I'd love to leverage the output of cargo-bloat in a development dashboard.

For this a json output format would be greatly appreciated.

@RazrFalcon
Copy link
Owner

Sure, I'll add it later.

@RazrFalcon
Copy link
Owner

By the way, what kind of output do you prefer? As is:

[
  {
    "File": "0.4%",
    ".text": "5.6%",
    "Size": "8.8KiB",
    "Crate": "[Unknown]",
    "Name": "read_line_info"
  },
  {
    "File": "0.3%",
    ".text": "4.4%",
    "Size": "6.8KiB",
    "Crate": "std",
    "Name": "__rdos_backtrace_dwarf_add"
  }
]

or more low-level:

{
  "file-size": 2527192,
  "text-section-size": 160154,
  "functions": [
    {
      "name": "read_line_info",
      "size": 9012
    },
    {
      "crate": "std",
      "name": "__rdos_backtrace_dwarf_add",
      "size": 6964
    }
  ]
}

@theduke
Copy link
Author

theduke commented Sep 23, 2019

I think the second variant would be more useful.

@theduke
Copy link
Author

theduke commented Oct 2, 2019

Thanks!

@RazrFalcon
Copy link
Owner

Feel free to report any issues.

@theduke
Copy link
Author

theduke commented Oct 2, 2019

Will do.

I'm working on a "cargo dashbaord" UI that ties together all the analysis tools in a nice interface, so I'll complain if I find any issues. ;)

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

No branches or pull requests

2 participants