Code Monkey home page Code Monkey logo

astropy-benchmarks's Introduction

Astropy performance benchmarks

About

These benchmarks track the performance of various features in astropy over time.

To view them, visit this site.

The benchmarks are run using airspeed velocity.

Contributing a benchmark

To add a benchmark, fork this repository and take a look inside the benchmarks folder - each module in astropy that already has benchmarks has a corresponding file or directory with files for different parts of the module. Either add your benchmark to one of the existing files or create a new file as needed.

A benchmark is a Python function whose name starts with time_. A function should test as little as possible and therefore be as short/simple as possible. Any required imports should be done outside the function. Here is an example of a benchmark to test unit conversion:

from astropy import units as u

def time_my_benchmark():
    (u.m / u.s).to(u.km / u.h)

Once you have added a benchmark, you can make sure it runs by installing asv with:

pip install asv

and running the following in the astropy-benchmarks folder:

asv dev

This will run all the benchmarks in fast mode (running each function once) using the installed version of Astropy. This is just to make sure that the benchmarks run properly, and the timings should not be considered accurate.

To run a single benchmark, you can do e.g.:

asv dev --bench time_my_benchmark

Once you are happy with your benchmarks, open a pull request to the astropy-benchmarks repository.

You do not need to add any result files for the benchmarks - we have machines that automatically do this every night.

Notes to maintainers

The master branch in this repository should not contain any results or built website. Results should be added to the results branch, and commits to the results branch trigger a build to the gh-pages branch.

image

astropy-benchmarks's People

Contributors

aconley avatar astrofrog avatar barentsen avatar bsipocz avatar cdeil avatar jamienoss avatar larrybradley avatar mdboom avatar mdmueller avatar mhvk avatar nden avatar pllim avatar taldcroft avatar wmwv avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.