benchmarking script#607
Merged
Merged
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fenicsx #607 +/- ##
===========================================
+ Coverage 95.88% 95.89% +0.01%
===========================================
Files 10 10
Lines 267 268 +1
===========================================
+ Hits 256 257 +1
Misses 11 11
☔ View full report in Codecov by Sentry. |
Collaborator
|
I think this would be more useful if you had the action fail if the benchmark was higher than a certain value |
RemDelaporteMathurin
requested changes
Oct 17, 2023
Collaborator
RemDelaporteMathurin
left a comment
There was a problem hiding this comment.
- move the benchmark script to test
- change threshold
RemDelaporteMathurin
requested changes
Oct 18, 2023
Collaborator
RemDelaporteMathurin
left a comment
There was a problem hiding this comment.
One small refactoring change and then good to merge!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Performance benchmarking is a useful way to keep track of how updates to the code affect performance.
A benchmark script is proposed comparing the performance of a simulation of gas permeation in pure fenicsx and in festim. It can be run using;
python3 test/benchmark.pyIf the performance of festim is more than 20% worse than the fenics script on average, the test will fail rasing an error:
ValueError: festim is {diff:.1f}% slower than fenics, current acceptble threshold of 20%More sophisticated methods of continuous testing can be implemented in the future: https://github.com/ionelmc/pytest-benchmark.
Types of changes
What types of changes does your code introduce to FESTIM?
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...