[DOC] document using `grofer export` format
MadhavJivrajani opened this issue · 1 comments
MadhavJivrajani commented
- The format in which metrics are exported by
grofer export
resembles thendjson
format.- This is done for ease of appending
json
objects to a file without having to buffer largejson
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.
- This is done for ease of appending
- 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
Samyak2 commented
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.