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

Ability to report processing time for each rule-per-file #4728

Closed
mvorisek opened this issue Jan 9, 2020 · 12 comments
Closed

Ability to report processing time for each rule-per-file #4728

mvorisek opened this issue Jan 9, 2020 · 12 comments
Labels
kind/feature request status/stale status/to verify issue needs to be confirmed or analysed to continue topic/I/O

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Jan 9, 2020

This is a feature request to show slow tests like phpunit with johnkary/phpunit-speedtrap.

Usecase: to quickly identify issues like #4656

@kubawerlos
Copy link
Contributor

kubawerlos commented Jan 9, 2020

@mvorisek how would you imagine this to be done?

@mvorisek
Copy link
Contributor Author

mvorisek commented Jan 9, 2020

@kubawerlos Very simple, measure rule apply time and then report the rule name, file name and the elapsed time if the elapsed time is greater than some treshold.

Note, that this feature request is for reporting AFTER rule is executed. To discover rules that never finish or take very long time use verbose log, as there is no way (in single non-async thread) to display some message during the rule execution. For verbose logging, see #4372

What do you think?

@kubawerlos
Copy link
Contributor

Rulesets or just rules?

I was thinking once about adding something here: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v2.16.1/src/Runner/Runner.php#L150

Maybe some events before starting fixing a file and after finishing.

@mvorisek
Copy link
Contributor Author

mvorisek commented Jan 9, 2020

Rulesets or just rules?

You are right, rule not ruleset (I also updated the comment above to prevent any misunderstanding.)

Maybe some events before starting fixing a file and after finishing.

👍 Yes

@mvorisek
Copy link
Contributor Author

mvorisek commented Nov 17, 2020

It seems that verbose level (like --verbose=3 or -vvv) is completely unsupported, even if documented in:
https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.16/doc/usage.rst - because of this, I think it is a bug

--verbose=3 ends up with error:

In ArgvInput.php line 204:

  [Symfony\Component\Console\Exception\RuntimeException]
  The "--verbose" option does not accept a value.

-vvv seems to no affect the verbosity at all, -vvvvvvvvvvv does not hep too

SpacePossum added a commit that referenced this issue Nov 21, 2020
This PR was merged into the 2.16 branch.

Discussion
----------

remove not supported verbose options

#4728 (comment)

Commits
-------

749c63a remove not supported verbose options
@mvorisek
Copy link
Contributor Author

closing as performance issues are currently rarely problematic

@mvorisek
Copy link
Contributor Author

mvorisek commented Mar 1, 2024

I am reopening this issue as when introducing PHP CS Fixer to some larger project it has to be rerun localy many times and if I would be able to list slow rules, it would help - save developer time - to disable them temporary.

@mvorisek mvorisek reopened this Mar 1, 2024
@Wirone Wirone changed the title Show slow tests Ability to report processing time for each rule-per-file Mar 1, 2024
@Wirone
Copy link
Member

Wirone commented Mar 1, 2024

I've renamed the issue as it has nothing to do with tests 😉.

Copy link

github-actions bot commented Jun 2, 2024

Since this issue has not had any activity within the last 90 days, I have marked it as stale.

The purpose of this action is to enforce backlog review once in a while. This is mostly for maintainers and helps with keeping repository in good condition, because stale issues and PRs can accumulate over time and make it harder for others to find relevant information. It is also possible that some changes has been made to the repo already, and issue or PR became outdated, but wasn't closed for some reason. This action helps with periodic review and closing of such stale items in automated way.

You may let maintainers handle this or verify current relevancy by yourself, to help with re-triage. Any activity will remove stale label so it won't be automatically closed at this point.

I will close it if no further activity occurs within the next 30 days.

@mvorisek
Copy link
Contributor Author

mvorisek commented Jun 2, 2024

not stale

@github-actions github-actions bot added status/to verify issue needs to be confirmed or analysed to continue and removed status/stale labels Jun 3, 2024
Copy link

github-actions bot commented Sep 7, 2024

Since this issue has not had any activity within the last 90 days, I have marked it as stale.

The purpose of this action is to enforce backlog review once in a while. This is mostly for maintainers and helps with keeping repository in good condition, because stale issues and PRs can accumulate over time and make it harder for others to find relevant information. It is also possible that some changes has been made to the repo already, and issue or PR became outdated, but wasn't closed for some reason. This action helps with periodic review and closing of such stale items in automated way.

You may let maintainers handle this or verify current relevancy by yourself, to help with re-triage. Any activity will remove stale label so it won't be automatically closed at this point.

I will close it if no further activity occurs within the next 30 days.

Copy link

The fact this was automatically closed doesn't mean that the idea got rejected - it simply didn't get any priority for way too long to keep it open. If you're still interested in this, please let as know, we can consider re-opening it.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature request status/stale status/to verify issue needs to be confirmed or analysed to continue topic/I/O
Projects
None yet
Development

No branches or pull requests

4 participants