Skip to content

Commit

Permalink
add simple ASV benchmarking setup
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed May 1, 2018
1 parent 98d825c commit 393bd8d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
20 changes: 20 additions & 0 deletions asv.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"project": "conda-build",
"project_url": "http://github.com/conda/conda-build",
"repo": ".",
"branches": ["master"],
"dvcs": "git",
"environment_type": "conda",
"show_commit_url": "http://github.com/conda/conda-build/commit/",
"pythons": ["3.6"],
"matrix": {
"conda": [],
"conda-verify": [],
"pytest": [],
"pytest-mock": [],
},
"env_dir": ".asv/env",
"results_dir": ".asv/results",
"html_dir": ".asv/html",
}
1 change: 1 addition & 0 deletions benchmarks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 26 additions & 0 deletions benchmarks/time_render.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import os

from conda_build import api

# god-awful hack to get data from the test recipes
import sys
_thisdir = os.path.dirname(__file__)
sys.path.append(os.path.dirname(_thisdir))

from tests.utils import metadata_dir
variant_dir = os.path.join(metadata_dir, '..', 'variants')


def time_simple_render():
api.render(os.path.join(metadata_dir, 'python_run'), finalize=False,
bypass_env_check=True)


def time_top_level_variant_render():
api.render(os.path.join(variant_dir, '02_python_version'), finalize=False,
bypass_env_check=True)


def time_single_top_level_multi_output():
api.render(os.path.join(variant_dir, 'test_python_as_subpackage_loop'),
finalize=False, bypass_env_check=True)

0 comments on commit 393bd8d

Please sign in to comment.