bencher icon indicating copy to clipboard operation
bencher copied to clipboard

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

Open TheVeryDarkness opened this issue 1 year ago • 11 comments

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

TheVeryDarkness avatar Oct 12 '24 04:10 TheVeryDarkness

@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: https://github.com/bencherdev/bencher/blob/8a1cc54db6deaffcae017824ff5d2bf3236484ac/tasks/test_api/src/task/test/examples.rs#L156-L158

epompeii avatar Oct 12 '24 11:10 epompeii

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 avatar Oct 14 '24 03:10 TheVeryDarkness

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

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

TheVeryDarkness avatar Oct 14 '24 08:10 TheVeryDarkness

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

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

TheVeryDarkness avatar Oct 14 '24 08:10 TheVeryDarkness

@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 avatar Oct 16 '24 01:10 epompeii

@TheVeryDarkness any update on this issue?

epompeii avatar Dec 23 '24 20:12 epompeii

@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 avatar Dec 24 '24 07:12 TheVeryDarkness

@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 avatar Dec 24 '24 15:12 epompeii

@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"

epompeii avatar Dec 24 '24 16:12 epompeii