-
Notifications
You must be signed in to change notification settings - Fork 315
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 a colored output on Windows? #267
Comments
Hey, thanks for the suggestion! That seems like a reasonable feature to add, but I don't typically develop on Windows. Pull requests would be welcome, though! |
Hey @alekseysidorov, Would you please specify which Windows version you mean? I'm on Windows 10 (build 1809 - 10.0.17763) and color output works fine for me. So that's is the short snippet I added into the #[test]
fn test_windows_colors() {
let cli = CliReport::new(false, true, false);
let hello = "Hello";
println!("{}", cli.green(hello.to_string()));
println!("{}", cli.red(hello.to_string()));
} And how it looks in the plain That's how the benchmarks output of I may elaborate on that, but need more info about the system you experienced such an issue. 😄 |
Small update on that: seems like that issue with lack of colors in Windows terminals has been fixed in rust-lang/cargo#4722. So I was able to reproduce OP's issue with Rust 1.26.0, but it went away after I switched back to the |
I am using rustc version |
@alekseysidorov try to run you benchmarks with the following command: |
Would you specify which OS version you use and Criterion.rc? |
@alekseysidorov @bheisler I found potential fix, so will work on a PR. |
Sorry for delay ^_^, my OS is Windows 10 release 1809 (17763.316) |
And I used a master branch of |
Hey, thanks for the patience - I've been on vacation for a week and a half or so. This fix looks good to me. @alekseysidorov Does this solve the issue for you? |
Closing this; it seems to be fixed. |
At the moment criterion output on windows doesn't support colors, thus it is harder to understand benchmark results that on *nix.
The text was updated successfully, but these errors were encountered: