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

Moved benchmarking project go Github Actions #2129

Merged
merged 78 commits into from
Dec 4, 2020

Conversation

papafe
Copy link
Contributor

@papafe papafe commented Nov 24, 2020

Description

Moved benchmarking project to Github Actions. The workflow takes care of building the wrappers, and cache the results to speed up subsequent runs. In case the wrappers have been modified, those are built again.
For now the benchmarks run only on Windows, and a series of graphs is shown on Github Pages.

Fixes #2119

@papafe
Copy link
Contributor Author

papafe commented Nov 24, 2020

As discussed with @nirinchev, it would also be possible to make it run on PR, but there is no way of constraining it on the PR labels. We can still do this check inside the workflow, but the workflow will run nevertheless, and we can make it fail, or in the best case cancel.

with:
tool: 'benchmarkdotnet'
# Where the output from the benchmark tool is stored
output-file-path: .\BenchmarkDotNet.Artifacts\results\PerformanceTests.QueryTests-report-full-compressed.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include the other tests as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should, I was testing on a subset and I forgot :)

@@ -49,33 +41,9 @@ public static void Main(string[] args)
.WithArtifactsPath(defaultConfig.ArtifactsPath)
.AddDiagnoser(MemoryDiagnoser.Default)
.AddJob(Job.ShortRun.WithToolchain(InProcessEmitToolchain.Instance))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: check if these parameters make sense - I used them to get quick results locally, but maybe on CI we'd want a default/long job. The toolchain is also something I used as a bit of a workaround and we may want to adjust later. The problem that I hit was that it looked like the weaver is not running for the generated assembly. I'm guessing there are ways around that, but I didn't feel investigating is justified. We can keep it for now and revisit in another PR.

@papafe
Copy link
Contributor Author

papafe commented Nov 25, 2020

@nirinchev Regarding making the graphs for the different test sets, it's not possible at the moment with that action. Only one file can be specified as the benchmark output, and if I try to run that step multiple times with different output-file-path it does not work.
So probably our best bet would be forking the action ourselves and do what we need to do. This will also allow us to just specify the output folder, and not all the single output files.

@nirinchev
Copy link
Member

Wouldn't using --join work for that? It'll produce a single file for the results, but I'm not sure if the action will like it.

@papafe papafe marked this pull request as draft November 25, 2020 10:39
@papafe
Copy link
Contributor Author

papafe commented Nov 25, 2020

Wouldn't using --join work for that? It'll produce a single file for the results, but I'm not sure if the action will like it.

You're correct, I didn't find it in the documentation for BenchmarkDotNet, so I thought it wasn't possible to merge the output files.

@papafe papafe marked this pull request as ready for review December 1, 2020 12:17
Copy link
Member

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; we should remove the jenkins job at some point, but let's keep it for now just to be able to easily compare results.

@papafe
Copy link
Contributor Author

papafe commented Dec 3, 2020

@nirinchev regarding the Jenkins job, I removed the exporter for that from the benchmark. Do you think I should put it back to keep both?

@nirinchev
Copy link
Member

nirinchev commented Dec 3, 2020

Hm, good point - I guess that it will now fail, so let's remove it.

wrappers/build.ps1 Outdated Show resolved Hide resolved
Co-authored-by: Nikola Irinchev <[email protected]>
@papafe papafe merged commit af030f6 into master Dec 4, 2020
@papafe papafe deleted the fp/benchmark-github-action-2119 branch December 4, 2020 11:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move benchmarks to Github actions
2 participants