diff --git a/asv.conf.json b/asv.conf.json new file mode 100644 index 0000000..4a63297 --- /dev/null +++ b/asv.conf.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "project": "astropy", + "project_url": "http://astropy.org/", + "repo": "https://github.com/Cadair/astropy.git", + "branches": ["performance_issues_decompress_tile"], + "environment_type": "virtualenv", + "show_commit_url": "https://github.com/Cadair/astropy/commit/", + "pythons": ["3.11"], + "build_command": [ + "python -m pip install build", + "python -m build --wheel -o {build_cache_dir} {build_dir}", + ] +} diff --git a/benchmarks/__init__.py b/benchmarks/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/benchmarks/benchmarks.py b/benchmarks/benchmarks.py new file mode 100644 index 0000000..e214fec --- /dev/null +++ b/benchmarks/benchmarks.py @@ -0,0 +1,16 @@ +import os +from astropy.io import fits + +AIA_DATA = os.path.join(os.path.dirname(__file__), '..', 'data', 'aia_lev1_193a_2013_03_15t12_01_06_84z_image_lev1.fits') + + +class TimeDataAccess: + """ + An example benchmark that times the performance of various kinds + of iterating over dictionaries in Python. + """ + def setup(self): + self.hdu = fits.open(AIA_DATA)[1] + + def time_access_data_aia(self): + self.hdu.data diff --git a/run_asv.sh b/run_asv.sh new file mode 100755 index 0000000..b05ec81 --- /dev/null +++ b/run_asv.sh @@ -0,0 +1,7 @@ +#!/bin/bash -xe + +# Last commit before FITS changes +taskset -c 0 asv run -e 9409d02ff9e101d4215f83aa1f9a23d805230fd0^! + +# All commits since +taskset -c 0 asv run -e NEW