Skip to content

Commit

Permalink
Cache benchmark functions (#2749)
Browse files Browse the repository at this point in the history
* added setup function

Signed-off-by: Asish Kumar <[email protected]>

* refactor geometry calculate distances

Signed-off-by: Asish Kumar <[email protected]>

* Refactor montecarlo estimators in benchmark code

Signed-off-by: Asish Kumar <[email protected]>

* add cache and setup functions

Signed-off-by: Asish Kumar <[email protected]>

* add cache and setup functions

Signed-off-by: Asish Kumar <[email protected]>

* ran ruff linter

Signed-off-by: Asish Kumar <[email protected]>

* Thou hath vanquished the redundant variables and functions

Signed-off-by: Asish Kumar <[email protected]>

* fix bugs

Signed-off-by: Asish Kumar <[email protected]>

* change benchmark yml

Signed-off-by: Asish Kumar <[email protected]>

* repeat in class

Signed-off-by: Asish Kumar <[email protected]>

* rounds in benchmarks

Signed-off-by: Asish Kumar <[email protected]>

* fix

Signed-off-by: Asish Kumar <[email protected]>

* fix error in formal integral

Signed-off-by: Asish Kumar <[email protected]>

* more cache

Signed-off-by: Asish Kumar <[email protected]>

* sort by ratio

Signed-off-by: Asish Kumar <[email protected]>

* cache in setup function

Signed-off-by: Asish Kumar <[email protected]>

---------

Signed-off-by: Asish Kumar <[email protected]>
  • Loading branch information
officialasishkumar committed Aug 2, 2024
1 parent d8da61e commit 0349e7a
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 687 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ jobs:
- name: Accept all asv questions
run: asv machine --yes

- name: Run benchmarks for last 5 commits if not PR
- name: Run benchmarks for last 4 commits if not PR
if: github.event_name != 'pull_request_target'
run: |
git log -n 4 --pretty=format:"%H" >> tag_commits.txt
asv run -a repeat=1 -a rounds=1 HASHFILE:tag_commits.txt | tee asv-output.log
asv run -a rounds=1 HASHFILE:tag_commits.txt | tee asv-output.log
if grep -q failed asv-output.log; then
echo "Some benchmarks have failed!"
exit 1
Expand Down Expand Up @@ -109,17 +109,17 @@ jobs:
run: |
echo $(git rev-parse HEAD) > commit_hashes.txt
echo $(git rev-parse master) >> commit_hashes.txt
asv run -a repeat=2 -a rounds=1 HASHFILE:commit_hashes.txt | tee asv-output-PR.log
asv run -a rounds=1 HASHFILE:commit_hashes.txt | tee asv-output-PR.log
if grep -q failed asv-output-PR.log; then
echo "Some benchmarks have failed!"
exit 1
fi
- name: Compare Master and PR head
run: asv compare origin/master HEAD --config asv.conf.json | tee asv-compare-output.log
run: asv compare origin/master HEAD --factor 1.1 --split --sort ratio | tee asv-compare-output.log

- name: Compare Master and PR head but only show changed results
run: asv compare origin/master HEAD --only-changed --config asv.conf.json | tee asv-compare-changed-output.log
run: asv compare origin/master HEAD --only-changed --factor 1.1 --split --sort ratio | tee asv-compare-changed-output.log

- name: Benchmarks compare output
id: asv_pr_vs_master
Expand Down
Loading

0 comments on commit 0349e7a

Please sign in to comment.