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

pprof support #74

Open
Qard opened this issue Apr 26, 2022 · 0 comments
Open

pprof support #74

Qard opened this issue Apr 26, 2022 · 0 comments

Comments

@Qard
Copy link

Qard commented Apr 26, 2022

Seems there's already a request in #69 for binary data in the form of already stringified JSON. I would like to also suggest a pprof-encoded array buffer. The structure of the pprof format can be seen here: https://github.com/google/pprof/blob/master/proto/profile.proto. It has a lot of similarities to the structure we already have for ProfilerTrace, just in binary format. It's also more space-efficient as it has a string table not only for file names but for every other string in the structure too. The rest of the data is 100% numeric, which makes encoding and parsing the non-string part of the body highly efficient, plus the protobuf format allows for out-of-order fields so the string table can simply be concatenated to the end of the binary data. It's a highly efficient format and already has all the features we need. 😸

The format also uses a very limited subset of protobuf so it would be very possible to use a custom encoder. I've written one in C before and I'm happy to clean that up and make it available to all who would need it.

Exporting pprof data would also give us access to an already existing library of tooling around analysis and visualization of pprof data, so that's a big win over inventing yet another custom format. 😅

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

1 participant