-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Fixed some issues around vb_suite #9332
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was same Benchmark name as L220 one. This doesn't cause error, but confusing. |
||
|
||
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 + """ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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__))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. without this, I got following error:
|
||
DEFAULT_MIN_DURATION = 0.01 | ||
HEAD_COL="head[ms]" | ||
BASE_COL="base[ms]" | ||
|
@@ -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__))) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this fix, I got following error:
This is because
suite
module collects allBenchmark
objects ingroupby
module, while temporary variablebmark
presents outside the for loop.