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 statistics information for individual checks (especially time of execution) #1144
Comments
Happy to contribute it if there is an agreement to add it :) |
the output is intentionally quiet and I don't want to change that, your proposal also makes things no longer line up maybe just add this to verbose if at all ? |
verbose is .... far too verbose. It's great to see only "passed" but then having some stats, would make it also actionable for cases that are "valid properties" of the check rather than just passed/failed status. Most of the UnitTest frameworks have such feature to display for example the timing. And it is perfectly ok to have a separate switch for that and do not have it in the output by default. I think it might be really useful for the CI case I described. |
I don't want a combinatoric explosion of options, especially ones I'm not going to use |
if it's only for CI who cares how verbose it is? |
I think it might be useful for local pre-commits as well, but the main usage scenario for this flag I foresee for CI case. We are currently using it with In this case I only found out that we have a problem because the build steps were running for a really long time and failed (but I would immediately see the problem if I had the stats). BTW. I have found that having CI build for pre-commit is great promotor of pre-commit in general - because when something fails, installing pre-commit and running that failed check is simplest way to do (and pre-commit nicely suggests that action). But CI is also good to observe if other build properties are met. |
I don't want another option, let's add it to verbose output |
This comment has been minimized.
This comment has been minimized.
please read the discussion -- I've already said no to that |
This comment has been minimized.
This comment has been minimized.
please stay on topic, thanks |
This comment has been minimized.
This comment has been minimized.
This has been released as part of v1.21.0 -- thanks again for the issue 🎉! |
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins.
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins.
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862)
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862)
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862)
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862)
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862)
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins.
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862) (cherry picked from commit 2969e50)
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. (cherry picked from commit c5e4862efcbfcbbb939f08043b953216751ee22b) GitOrigin-RevId: 2969e50b41337b4b7bf998d84c3f27385bb170e2
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in pre-commit/pre-commit#1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. GitOrigin-RevId: c5e4862efcbfcbbb939f08043b953216751ee22b
I would love to have an option to add some statistics to be displayed for each check. This could be very useful for running pre-commit in CI. I had a case recently of a check that run accidentally a bit longer than expected (it was building unnecessary docker image) and I have not realised that it is taking longer - because we had other checks after and I could only see the total execution time.
Also some other useful information that we might see is how many parallel processes were run and how many files were passed as parameters. This might be really useful especially for people who do not understand that pre-commit runs in parallel by default - this can have some undesireable side effects if you forget to set "require_serial" to True when you need. And seeing that in the output of CI might immediately show that something is wrong. For now the output is a bit of "black-box".
An option to see some additional information (
--add-statistics
) might be super-useful.Example output I imagine (maybe a bit better aligned):
The text was updated successfully, but these errors were encountered: