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

confusing message for users #239

Closed
teto opened this issue Jun 6, 2023 · 3 comments
Closed

confusing message for users #239

teto opened this issue Jun 6, 2023 · 3 comments

Comments

@teto
Copy link

teto commented Jun 6, 2023

I was notified by some of our users that for instance in the following:

[INFO]: #nixpkgs-fmt: 47 files processed in 97.47ms
[INFO]: #stylish-haskell: 572 files processed in 21.25s
[INFO]: #hlint: 572 files processed in 38.45s

traversed 5010 files
matched 2337 files to formatters
left with 1191 files after cache
of whom 14 files were re-formatted
all of this in 39s

the
all of this in 39s was buggy because not the sum of the hlint and stylish-haskell steps. Looking at the code, it looks LGTM though

    println!(
        r#"
{} files changed in {:.0?} (found {}, matched {}, cache misses {})
        "#,
        reformatted_files,
        start_time.elapsed(),
        traversed_files,
        matched_files,
        filtered_files,
    );

and these steps were just run in parallel. I wonder if the message could be reformatted in less ambigous terms, for instance "The program ran under 39sec", I dont have a good proposition sry.

@zimbatm
Copy link
Member

zimbatm commented Jun 7, 2023

ok. I don't really have a better wording in mind either.

@brianmcgee
Copy link
Member

The output has been refined in v2:

nix fmt -- -v -c 
INFO format | deadnix[1]: 10 file(s) processed in 1.919272ms
INFO format | gofumpt: 20 file(s) processed in 25.496499ms
INFO format | statix[2]: 10 file(s) processed in 196.010056ms
INFO format | alejandra[3]: 10 file(s) processed in 3.881765ms
INFO format | prettier: 59 file(s) processed in 806.175745ms
traversed 137 files
emitted 137 files for processing
formatted 89 files (0 changed) in 841ms

The runtimes per formatter are per invocation, and it's implied that it was done in parallel. I'm not sure how to make it any clearer?

@teto
Copy link
Author

teto commented Aug 19, 2024

We could sum the durations to show a virtualtime formatted 89 files (0 changed) in 841ms ( <SUM> virtualtime).
It's not very important so feel free to address this however you want or close the issue.

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

No branches or pull requests

3 participants