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

[DOC] document using grofer export format #99

Open
MadhavJivrajani opened this issue Mar 29, 2021 · 1 comment
Open

[DOC] document using grofer export format #99

MadhavJivrajani opened this issue Mar 29, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority: medium

Comments

@MadhavJivrajani
Copy link
Member

MadhavJivrajani commented Mar 29, 2021

  • The format in which metrics are exported by grofer export resembles the ndjson format.
    • This is done for ease of appending json objects to a file without having to buffer large json strings in memory.
    • It also makes it easier to read the file in efficient ways such as by maybe lazy loading using generators in python.
  • It'd be helpful to have this mentioned in greater detail in the README and also maybe have a few examples that make use of these metrics that are exported as ndjson showing how such files can be worked with.

Getting metrics

grofer export -p <valid PID> -f export.json
@MadhavJivrajani MadhavJivrajani added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority: medium labels Mar 29, 2021
@Samyak2
Copy link
Member

Samyak2 commented May 29, 2021

I would like to point out that ndjson isn't technically valid JSON since a JSON file contains just one object and not multiple. As per the ndjson spec, the file name extension should be .ndjson and not .json.

This part in the export help page should be fixed to say ndjson instead of json.

  -t, --type string       specify the output format of the profiling result (json by default) (default "json")

Adding this here since this is also an issue in the documentation.

@Gituser143 Gituser143 added the hacktoberfest Issues for Hacktoberfest 2021 label Sep 30, 2021
@Gituser143 Gituser143 removed the hacktoberfest Issues for Hacktoberfest 2021 label Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority: medium
Projects
None yet
Development

No branches or pull requests

3 participants