Skip to content

Commit

Permalink
Merge pull request #9332 from ledmonster/fix/vb_suite
Browse files Browse the repository at this point in the history
FIX: Fixed some issues around vb_suite
  • Loading branch information
jreback committed Jan 22, 2015
2 parents 5fd1fbd + 938d8e7 commit 1748bff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 3 additions & 0 deletions vb_suite/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,3 +559,6 @@ def inject_bmark_into_globals(bmark):
for func_name in no_arg_func_list:
bmark = make_large_ngroups_bmark(ngroups, func_name)
inject_bmark_into_globals(bmark)

# avoid bmark to be collected as Benchmark object
del bmark
17 changes: 8 additions & 9 deletions vb_suite/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
dt = ts.index[500]
"""
statement = "ts[dt]"

bm_getitem = Benchmark(statement, setup, ncalls=100000,
name='series_getitem_scalar')
name='time_series_getitem_scalar')

setup = common_setup + """
index = tm.makeStringIndex(1000)
s = Series(np.random.rand(1000), index=index)
idx = index[100]
"""
statement = "s.get_value(idx)"
bm_df_getitem3 = Benchmark(statement, setup,
name='series_get_value',
start_date=datetime(2011, 11, 12))
bm_get_value = Benchmark(statement, setup,
name='series_get_value',
start_date=datetime(2011, 11, 12))


setup = common_setup + """
Expand Down Expand Up @@ -227,10 +226,10 @@
series_loc_list_like = Benchmark("s.loc[[800000]]", setup)
series_loc_array = Benchmark("s.loc[np.arange(10000)]", setup)

series_iloc_scalar = Benchmark("s.loc[800000]", setup)
series_iloc_slice = Benchmark("s.loc[:800000]", setup)
series_iloc_list_like = Benchmark("s.loc[[800000]]", setup)
series_iloc_array = Benchmark("s.loc[np.arange(10000)]", setup)
series_iloc_scalar = Benchmark("s.iloc[800000]", setup)
series_iloc_slice = Benchmark("s.iloc[:800000]", setup)
series_iloc_list_like = Benchmark("s.iloc[[800000]]", setup)
series_iloc_array = Benchmark("s.iloc[np.arange(10000)]", setup)

series_ix_scalar = Benchmark("s.ix[800000]", setup)
series_ix_slice = Benchmark("s.ix[:800000]", setup)
Expand Down
4 changes: 2 additions & 2 deletions vb_suite/test_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
from pandas import DataFrame, Series

from suite import REPO_PATH
VB_DIR = os.path.dirname(os.path.abspath(__file__))
VB_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEFAULT_MIN_DURATION = 0.01
HEAD_COL="head[ms]"
BASE_COL="base[ms]"
Expand Down Expand Up @@ -505,7 +505,7 @@ def main():

print("\n")

# move away from the pandas root dit, to avoid possible import
# move away from the pandas root dir, to avoid possible import
# surprises
os.chdir(os.path.dirname(os.path.abspath(__file__)))

Expand Down

0 comments on commit 1748bff

Please sign in to comment.