Skip to content

[benchmark] Baseline test #20074

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

Merged
merged 2 commits into from
Oct 31, 2018

Conversation

palimondo
Copy link
Contributor

@palimondo palimondo commented Oct 26, 2018

This PR adds new a -check-added option to the run_smoke_bench.py that finds the added benchmarks and runs an equivalent of Benchmark_Driver check on them. It can be run together with -verbose option to output more details during the benchmark analysis.

It outputs the BenchmarkDoctor's report with Warnings and Errors, if the new benchmarks violate the best practices. BenchmarkDoctor currently always returns exit code 0. In the future, we might change this to depend on the presence of ERRORs in the report, if deemed useful, so that violations of good baseline could not be committed to the tree.

It depends on BenchmarkDriver and compare_perf_tests.py being in the same directory.

Script for integrating BenchmarkDoctor’s check of newly added benchmarks into CI workflow.
@palimondo
Copy link
Contributor Author

@eeckstein Please review 🙏

Can you integrate this into @swift-ci?

@eeckstein
Copy link
Contributor

Can you include that in run_smoke_bench?
Then it would run automatically for each benchmark run.
I don't know how long it takes to check new benchmarks, but if it only checks new benchmarks, then the overhead time is not so important.
Integrating it into a regular CI test is not really doable because it requires two benchmark builds.

@palimondo
Copy link
Contributor Author

I could? But than it would be invoked for each of the optimization levels, right? It should run only once, as it validates only the -O mode. I though it would be invoked from @swift-ci benchmark after the run_smoke_bench.py... Am I misunderstanding how run_smoke_bench.py get's invoked by CI?

@palimondo
Copy link
Contributor Author

palimondo commented Oct 29, 2018

Or do you mean I should add it as another option to the run_smoke_bench? That could work… but it would still require some kind of modification to the CI, to invoke it. Is that what you meant?
(And yes, it only checks the added benchmarks. It takes about 10s per benchmark.)

@eeckstein
Copy link
Contributor

Yes, just add an option and we can change the ci script to pass that option

@palimondo
Copy link
Contributor Author

palimondo commented Oct 30, 2018

@eeckstein I've integrated the check_added_bench.py into run_smoke_bench.py as -check-added option and edited this PR's description to match. Please review.

@eeckstein
Copy link
Contributor

How do you derive the list of added benchmarks? Is it getting the list by invoking Benchmark_O --list?

@palimondo
Copy link
Contributor Author

Yes. BenchmarkDriver.__init__ calls _get_tests, which does Benchmark_O --list and applies the filters (regex), if any are present.

@eeckstein
Copy link
Contributor

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Build comment file:

No performance and code size changes

How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false alarms. Unexpected regressions which are marked with '(?)' are probably noise. If you see regressions which you cannot explain you can try to run the benchmarks again. If regressions still show up, please consult with the performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@eeckstein
Copy link
Contributor

@swift-ci smoke test

3 similar comments
@eeckstein
Copy link
Contributor

@swift-ci smoke test

@eeckstein
Copy link
Contributor

@swift-ci smoke test

@eeckstein
Copy link
Contributor

@swift-ci smoke test

@eeckstein eeckstein merged commit 1d326d7 into swiftlang:master Oct 31, 2018
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

Successfully merging this pull request may close these issues.

3 participants