Skip to content

Commit 1748bff

Browse files
committed
Merge pull request #9332 from ledmonster/fix/vb_suite
FIX: Fixed some issues around vb_suite
2 parents 5fd1fbd + 938d8e7 commit 1748bff

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

vb_suite/groupby.py

+3
Original file line numberDiff line numberDiff line change
@@ -559,3 +559,6 @@ def inject_bmark_into_globals(bmark):
559559
for func_name in no_arg_func_list:
560560
bmark = make_large_ngroups_bmark(ngroups, func_name)
561561
inject_bmark_into_globals(bmark)
562+
563+
# avoid bmark to be collected as Benchmark object
564+
del bmark

vb_suite/indexing.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
dt = ts.index[500]
1616
"""
1717
statement = "ts[dt]"
18-
1918
bm_getitem = Benchmark(statement, setup, ncalls=100000,
20-
name='series_getitem_scalar')
19+
name='time_series_getitem_scalar')
2120

2221
setup = common_setup + """
2322
index = tm.makeStringIndex(1000)
2423
s = Series(np.random.rand(1000), index=index)
2524
idx = index[100]
2625
"""
2726
statement = "s.get_value(idx)"
28-
bm_df_getitem3 = Benchmark(statement, setup,
29-
name='series_get_value',
30-
start_date=datetime(2011, 11, 12))
27+
bm_get_value = Benchmark(statement, setup,
28+
name='series_get_value',
29+
start_date=datetime(2011, 11, 12))
3130

3231

3332
setup = common_setup + """
@@ -227,10 +226,10 @@
227226
series_loc_list_like = Benchmark("s.loc[[800000]]", setup)
228227
series_loc_array = Benchmark("s.loc[np.arange(10000)]", setup)
229228

230-
series_iloc_scalar = Benchmark("s.loc[800000]", setup)
231-
series_iloc_slice = Benchmark("s.loc[:800000]", setup)
232-
series_iloc_list_like = Benchmark("s.loc[[800000]]", setup)
233-
series_iloc_array = Benchmark("s.loc[np.arange(10000)]", setup)
229+
series_iloc_scalar = Benchmark("s.iloc[800000]", setup)
230+
series_iloc_slice = Benchmark("s.iloc[:800000]", setup)
231+
series_iloc_list_like = Benchmark("s.iloc[[800000]]", setup)
232+
series_iloc_array = Benchmark("s.iloc[np.arange(10000)]", setup)
234233

235234
series_ix_scalar = Benchmark("s.ix[800000]", setup)
236235
series_ix_slice = Benchmark("s.ix[:800000]", setup)

vb_suite/test_perf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
from pandas import DataFrame, Series
5757

5858
from suite import REPO_PATH
59-
VB_DIR = os.path.dirname(os.path.abspath(__file__))
59+
VB_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
6060
DEFAULT_MIN_DURATION = 0.01
6161
HEAD_COL="head[ms]"
6262
BASE_COL="base[ms]"
@@ -505,7 +505,7 @@ def main():
505505

506506
print("\n")
507507

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

0 commit comments

Comments
 (0)