Skip to content

Commit

Permalink
Cache benchmark functions (#76)
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]>

---------

Signed-off-by: Asish Kumar <[email protected]>
  • Loading branch information
officialasishkumar authored Jul 31, 2024
1 parent 9934b20 commit 9255013
Show file tree
Hide file tree
Showing 16 changed files with 254 additions and 693 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ jobs:
- 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 HASHFILE:tag_commits.txt | tee asv-output.log
git log -n 4 --pretty=format:"%H" >> tag_commits.txt
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 @@ -102,17 +102,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 | 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 | tee asv-compare-changed-output.log

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

0 comments on commit 9255013

Please sign in to comment.