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

Add option to print number of instructions executed by swift-format #625

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Sep 14, 2023

I’m planning to use this option to measure the performance of swift-format periodically on a fixed set of project to detect any performance regressions.

I made the --measure-instructions option hidden so that it only shows up when running swift-format lint --help-hidden.

I’m planning to use this option to measure the performance of `swift-format` periodically on a fixed set of project to detect any performance regressions.
@ahoppen ahoppen requested a review from allevato September 14, 2023 23:02
Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

Nice! Is there a way we can have these numbers reported in CI, say, once we set up swift-format to verify its own formatting?

I guess what I'd want is to have swift-ci comment back on the PR any performance changes, similar to the toolchain's benchmark runs, but I don't know how difficult that would be to set up (especially since we still don't have triggers on this repo itself).

@ahoppen
Copy link
Member Author

ahoppen commented Sep 16, 2023

Yes, that would be nice but for that we would also need to have a stable project to format as a baseline. My plan for now is to run these tests locally. I’ll let you know if I discover any performance regressions. Once I have finished the performance testing script, I can also share it with you so you can run it locally before merging PRs that might have performance impact.

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.

2 participants