Make hooks work in bench_command subprocesses#197
Merged
Conversation
corona10
reviewed
Jul 29, 2024
corona10
reviewed
Aug 15, 2024
| hook.teardown(metadata) | ||
|
|
||
| # Write timing in seconds into stdout | ||
| print(dt) |
Member
There was a problem hiding this comment.
@mdboom Would you like to extract printing data logic into a single function and then add a comment about the function from the parsing metadata logic at bench_command to explain why we parse that way?
corona10
reviewed
Aug 15, 2024
| timing = float(lines[0]) | ||
| if len(lines) >= 2: | ||
| rss = int(lines[1]) | ||
| rss = int(lines[1]) |
Member
There was a problem hiding this comment.
Please explain about the parsing logic.
see: https://github.com/psf/pyperf/pull/197/files#r1718097565 :)
corona10
requested changes
Aug 15, 2024
Member
corona10
left a comment
There was a problem hiding this comment.
Overall looks good I left a nit comment.
mdboom
added a commit
to mdboom/pyperf
that referenced
this pull request
Sep 4, 2024
And document. As suggested by @corona10 psf#197 (comment)
This was referenced Sep 4, 2024
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.
This is a follow-on to #193 that makes hooks also work inside of subprocesses created by
bench_command.