Add option to dump profile output to CSV#2836
Merged
milan-tom merged 13 commits intooxcaml:mainfrom Jul 24, 2024
Merged
Conversation
cc0825f to
6d092db
Compare
6d092db to
8fb8fb2
Compare
xclerc
reviewed
Jul 23, 2024
f09c1a3 to
7d1dd17
Compare
xclerc
approved these changes
Jul 24, 2024
Contributor
xclerc
left a comment
There was a problem hiding this comment.
I you can just confirm / double check that
the output of -dtimings (used alone) is
not changed by this pull request, I think it
can be merged.
Contributor
Author
Manually tested comparing output on test file of |
lukemaurer
pushed a commit
to lukemaurer/flambda-backend
that referenced
this pull request
Oct 23, 2024
* Add -dump-into-csv command line flag * Implement exporting profile information to CSV * Don't always print ancestors when outputting to CSV * Sanitise profile columns before adding to CSV * Leave empty cells blank in CSV * Add headers to CSV profile output * Don't print to stdout if -dump-into-csv selected * Don't print gc info to stdout either if -dump-into-csv selected * Make match case explicit * Avoid implying formatter can only be for file * Avoid unnecessary use of optional arguments * Use "pass" rather than "stage" * Force newline in CSV output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
-dump-into-csvcommand line flag that outputs the profile information in CSV format.Design choices
The main design choice was concerning whether to store counters as a single CSV field or multiple. In the end, the choice was made to have a single
countersfield as the number of counters is variable and not all counters apply to every stage. This single field can easily be divided into the constituent individual counters by scripts using these generated CSV files.Example outputs
-dprofile -dump-into-csv-dcounters -dump-into-csv