8000 Set up airspeed velocity benchmarks by kandersolar · Pull Request #1049 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Set up airspeed velocity benchmarks #1049

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 33 commits into from
Sep 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ecf2a9e
add airspeed velocity config and tests
wholmgren Aug 13, 2018
d53b782
add documentation
wholmgren Aug 14, 2018
cd25327
Merge branch 'master' into asv_setup
kandersolar Mar 22, 2020
c75c24d
move whatsnew line to 0.7.2
kandersolar Mar 22, 2020
53568cb
update asv.conf.json to most recent asv format
kandersolar Mar 22, 2020
37095c2
add useful tips to readme
kandersolar Mar 22, 2020
1c6cbb7
modify asv conf to install optional pvlib reqs (pytables etc)
kandersolar Mar 22, 2020
8db2f63
add more benchmarks for location and solarposition
kandersolar Mar 22, 2020
48e6366
fix solarposition docstring
kandersolar Mar 22, 2020
636bcaf
add tracking benchmark file
kandersolar Mar 22, 2020
5a93520
add irradiance benchmark file
kandersolar Mar 22, 2020
d480806
fix tracking benchmarks
kandersolar Mar 22, 2020
8b3eb3c
Merge branch 'master' into asv_setup
kandersolar Jul 22, 2020
c07003a
test python3.7 only, regardless of installed version
kandersolar Jul 22, 2020
329ba90
switch from conda to virtualenv
kandersolar Jul 22, 2020
066bd9e
restructure
kandersolar Sep 5, 2020
2e3c76e
stickler
kandersolar Sep 6, 2020
3f5b1ba
drop old whatsnew entry
kandersolar Sep 6, 2020
008f8ca
use separate classes for version checking
kandersolar Sep 6, 2020
25d7b9f
fix aoi_projection benchmark
kandersolar Sep 7, 2020
daf7e40
do version switching in setup() instead of in global scope
kandersolar Sep 7, 2020
c7bb2ec
singular space to satisfy stickler
kandersolar Sep 7, 2020
01e79a4
move asv conf to pvlib
kandersolar Sep 8, 2020
0ff98b6
move benchmarks to subdirectory
kandersolar Sep 8, 2020
d42ef6d
change to local repo instead of cloning from GH
kandersolar Sep 9, 2020
37993fa
docs
kandersolar Sep 9, 2020
605d744
update benchmark readme
kandersolar Sep 9, 2020
8c43a12
Merge branch 'master' into asv_setup
kandersolar Sep 10, 2020
73e6347
create 0.8.1 whatsnew
kandersolar Sep 10, 2020
791ee9b
conda channel ordering
kandersolar Sep 10, 2020
64adc84
link to readme
kandersolar Sep 10, 2020
1021400
fix wrong link
kandersolar Sep 10, 2020
85235a5
benchmark on minimum and latest dependency versions
kandersolar Sep 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs
  • Loading branch information
kandersolar committed Sep 9, 2020
commit 37993fa97d976f35cd7f9090d7adfa60097724a4
74 changes: 72 additions & 2 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,79 @@ Benchmarks
==========

pvlib includes a small number of performance benchmarking tests. These
tests are run using airspeed velocity (asv): https://asv.readthedocs.io/en/stable/
tests are run using
[airspeed velocity](https://asv.readthedocs.io/en/stable/) (ASV).

The benchmarks are run nightly on pvlib-python/master. Useful links:
The basic structure of the tests and how to run them is described below.
We refer readers to the ASV documentation for more details. The AstroPy
[documentation](https://github.com/astropy/astropy-benchmarks/tree/master)
may also be helpful.

The test configuration is described in [asv.conf.json](asv.conf.json).

The performance tests are located in the [benchmarks](benchmarks) directory.

First, from the same directory as `asv.conf.json`, run the tests in a
command prompt (`$`):

```
$ asv run
```

Note that, unlike pytest, the asv tests require changes to be committed
to git before they can be tested. The ``run`` command takes a positional
argument to describe the range of git commits or branches to be tested.
For example, if your feature branch is named ``feature``, a useful asv
run may be:

```
$ asv run master..feature
```

Next, publish the test results to the archive:

```
$ asv publish
```

Finally, start a http server to view the test results:

```
$ asv preview
```

You might also find it useful to compare results from the command line
instead of through the HTML report. After generating timing results by
benchmarking a series of commits as above, or running individual commits
like this:

```
asv run e42f8d24^!
```

You can then compare the timing results of two commits:

```
$ asv compare 0ff98b62 e42f8d24

All benchmarks:

before after ratio
[0ff98b62] [e42f8d24]
<asv_setup~1> <asv_setup>
+ 3.90±0.6ms 31.3±5ms 8.03 irradiance.Irradiance.time_aoi
3.12±0.4ms 2.94±0.2ms 0.94 irradiance.Irradiance.time_aoi_projection
256±9ms 267±10ms 1.05 irradiance.Irradiance.time_dirindex
```

The `ratio` column shows the ratio of `after / before` timings. For this
example, the `aoi` function was slowed down on purpose to demonstrate
the comparison.

Nightly benchmarking
--------------------

The benchmarks are run nightly for new commits to pvlib-python/master.

- Timing results: https://pvlib-benchmarker.github.io/pvlib-benchmarks/
- Information on the process: https://github.com/pvlib-benchmarker/pvlib-benchmarks
0