Skip to content

[process-stats-dir] Fix a couple of issues #59605

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

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

hamishknight
Copy link
Contributor

  • Fix an error that was produced when specifying --output, as the FileType must be buffered for a non-binary output.
  • Fix an indexing error, as it seems namedtuple no longer supports vars(...)

Copy link
Contributor

@edymtt edymtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- please consider generating toolchains and/or testing the compiler performance presets to test the program (what I should have done in the first place for #58755)

@@ -674,31 +700,8 @@ def main():
help="stats-dirs to process")

args = parser.parse_args()
if len(args.remainder) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to factor this in a separate function!
This makes the intent of the below change easy to grasp.

@hamishknight
Copy link
Contributor Author

@edymtt Unfortunately the compiler performance bots currently aren't working, I have tested it locally against some CI-generated stats dirs though. By toolchain do you mean that please build toolchain will run the script? Happy to try that

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly lint-nit cleanups.
process will need the parser passed in to handle printing the help message. Alternatively, the parser.print_help() could probably be pulled back into main.

Otherwise LGTM.

Unbuffered output is unsupported for non-binary
files.
Apparently `namedtuple` can't be used with `vars`
anymore.
@hamishknight
Copy link
Contributor Author

@swift-ci please smoke test

@edymtt
Copy link
Contributor

edymtt commented Jun 21, 2022

@hamishknight got it, local tests will do for now
yes, that's the command I had in mind, as per https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#build-swift-toolchain

@hamishknight hamishknight merged commit 18caf45 into swiftlang:main Jun 22, 2022
@hamishknight hamishknight deleted the fix-process-stats branch June 22, 2022 09:21
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

Successfully merging this pull request may close these issues.

3 participants