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

Bencher succeed without running any benchmarks with rust_criterion adapter on Windows. #516

Open
TheVeryDarkness opened this issue Oct 12, 2024 · 11 comments
Labels
adapter bug Something isn't working

Comments

@TheVeryDarkness
Copy link

TheVeryDarkness commented Oct 12, 2024

Hello! I'm using bencher in Github Actions for one of my repos in Rust, and I'm using adapter rust_criterion, but I found bencher works well on macos-latest and linux-latest, but succeed without running any benchmarks on Windows.

You can find results from a workflow run in https://github.com/TheVeryDarkness/iof/actions/runs/11302133786.

  • Adapter: rust_criterion
  • Platform: Windows
@epompeii
Copy link
Member

epompeii commented Oct 12, 2024

@TheVeryDarkness thank you for using Bencher, and I'm sorry you're running into trouble.

I do have a CI job that runs the example Criterion benchmarks on Windows.
This is output from my most recent push: https://github.com/bencherdev/bencher/actions/runs/11301003886/job/31434759390#step:4:2883

Taking a look at your workflow file: https://github.com/TheVeryDarkness/iof/blob/main/.github%2Fworkflows%2Fbenchmark.yml#L32
I would recommend trying to wrap cargo bench in quotes: "cargo bench"
And see if that helps.
This is effectively what the example does:

Self::RustCriterion | Self::RustIai | Self::RustIaiCallgrind | Self::RustCustom => {
"cargo bench"
},

TheVeryDarkness added a commit to TheVeryDarkness/iof that referenced this issue Oct 14, 2024
@TheVeryDarkness
Copy link
Author

Adding quotes there doesn't seem to be working :(

Workflow run: https://github.com/TheVeryDarkness/iof/actions/runs/11320056080

There was an error when running on linux-latest because I had some bugs in my benchmarks.

I suspect it has something to do with the spaces in my benchmark names.

@TheVeryDarkness
Copy link
Author

Well, it seems it's not caused by the spaces.

Workflow run: https://github.com/TheVeryDarkness/iof/actions/runs/11323643624/job/31486739251

@TheVeryDarkness
Copy link
Author

And cargo bench -- --list can list all benchmarks.

Workflow run: https://github.com/TheVeryDarkness/iof/actions/runs/11323828042/job/31487307640.

@epompeii
Copy link
Member

@TheVeryDarkness thank you for trying out using quotes. I'm not very knowledgeable on Windows development, so I figured it was worth a shot.

If you run your benchmarks on a Windows box without Bencher, what does the output look like?

@epompeii
Copy link
Member

@TheVeryDarkness any update on this issue?

@epompeii epompeii added bug Something isn't working adapter labels Dec 23, 2024
@TheVeryDarkness
Copy link
Author

TheVeryDarkness commented Dec 24, 2024

@epompeii Thanks for reminding me! Here is a run on Windows: https://github.com/TheVeryDarkness/iof/actions/runs/12478423660/job/34825991109. The benchmark itself runs well on windows, but bencher still does not run benchmarks.

By the way, CI seems to be failing on Linux and MacOS though I think I didn't change too many codes.

@TheVeryDarkness
Copy link
Author

@epompeii
Copy link
Member

@TheVeryDarkness thank you for the recent runs. I checked the logs for both runs, and I only see two POST calls to the API backend for each of them. Since the Linux and MacOS Reports are showing up, these would therefore belong to them.

Screenshot 2024-12-24 at 9 19 18 AM

This makes me think the the Windows CLI is not even sending over the POST request.

I currently can't get access to a Windows VM to debug this:

Due to ongoing technical issues, as of October 23, 2024, downloads are temporarily unavailable.

https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

Hopefully that changes soon.

@epompeii
Copy link
Member

@TheVeryDarkness if you put the Threshold boundary (0.99) in quotes, does that change anything?

https://github.com/TheVeryDarkness/iof/blob/main/.github%2Fworkflows%2Fbenchmark.yml#L39

bencher run --project iof --token '${{ secrets.BENCHER_API_TOKEN }}' --branch main --testbed '${{ matrix.os }}' --threshold-measure latency --threshold-test t_test --threshold-max-sample-size 64 --threshold-upper-boundary "0.99" --thresholds-reset --err --adapter rust_criterion --github-actions '${{ secrets.GITHUB_TOKEN }}' "cargo bench"

@TheVeryDarkness
Copy link
Author

@epompeii it seems not. The latest run: https://github.com/TheVeryDarkness/iof/actions/runs/12487806742/job/34849436729#step:8:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapter bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants