| 1 |
Development |
| 2 |
=========== |
| 3 |
|
| 4 |
During development, one needs to pass a relative path: |
| 5 |
|
| 6 |
.. code:: json |
| 7 |
|
| 8 |
"matrix": { |
| 9 |
"req": { |
| 10 |
"asv_bench_memray": ["../asv_bench_memray"] |
| 11 |
}, |
| 12 |
}, |
| 13 |
|
| 14 |
Also it may be necessary to cleanup older environments and explicitly |
| 15 |
point to an instance of ``asv_runner``: |
| 16 |
|
| 17 |
.. code:: sh |
| 18 |
|
| 19 |
rm -rf .asv && ASV_RUNNER_PATH="../asv_runner" asv run --bench sum |
| 20 |
|
| 21 |
Personally I keep benchmarks for testing at an `experiments |
| 22 |
repo <https://github.com/HaoZeke/asv_experiments>`__, but any local test |
| 23 |
will do. |
| 24 |
|
| 25 |
Conventions |
| 26 |
----------- |
| 27 |
|
| 28 |
Like all externally defined benchmark plugins for ``asv``, this has a strict hierarchy: |
| 29 |
|
| 30 |
- The package name begins with ``asv_bench``. |
| 31 |
- Benchmarks are defined in a ``benchmarks`` folder under the package module. |
| 32 |
- Each exported new benchmark type has the ``export_as_benchmark = [NAMEBenchmark]`` attribute. |
| 33 |
|
| 34 |
For more conventions, follow the documentation of ``asv_runner``. |