Skip to content
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

CLN: Removed all occurances of goal_time and enabled linting for benchmarks #23265

Merged
merged 4 commits into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions asv_bench/benchmarks/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

class Factorize(object):

goal_time = 0.2

params = [True, False]
param_names = ['sort']

Expand All @@ -38,8 +36,6 @@ def time_factorize_string(self, sort):

class Duplicated(object):

goal_time = 0.2

params = ['first', 'last', False]
param_names = ['keep']

Expand All @@ -61,8 +57,6 @@ def time_duplicated_string(self, keep):

class DuplicatedUniqueIndex(object):

goal_time = 0.2

def setup(self):
N = 10**5
self.idx_int_dup = pd.Int64Index(np.arange(N * 5))
Expand All @@ -75,8 +69,6 @@ def time_duplicated_unique_int(self):

class Match(object):

goal_time = 0.2

def setup(self):
self.uniques = tm.makeStringIndex(1000).values
self.all = self.uniques.repeat(10)
Expand All @@ -88,8 +80,6 @@ def time_match_string(self):

class Hashing(object):

goal_time = 0.2

def setup_cache(self):
N = 10**5

Expand Down
4 changes: 0 additions & 4 deletions asv_bench/benchmarks/attrs_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

class DataFrameAttributes(object):

goal_time = 0.2

def setup(self):
self.df = DataFrame(np.random.randn(10, 6))
self.cur_index = self.df.index
Expand All @@ -23,8 +21,6 @@ def time_set_index(self):

class CacheReadonly(object):

goal_time = 0.2

def setup(self):

class Foo:
Expand Down
10 changes: 0 additions & 10 deletions asv_bench/benchmarks/binary_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

class Ops(object):

goal_time = 0.2

params = [[True, False], ['default', 1]]
param_names = ['use_numexpr', 'threads']

Expand Down Expand Up @@ -42,8 +40,6 @@ def teardown(self, use_numexpr, threads):

class Ops2(object):

goal_time = 0.2

def setup(self):
N = 10**3
self.df = DataFrame(np.random.randn(N, N))
Expand Down Expand Up @@ -81,8 +77,6 @@ def time_frame_float_mod(self):

class Timeseries(object):

goal_time = 0.2

params = [None, 'US/Eastern']
param_names = ['tz']

Expand All @@ -109,8 +103,6 @@ def time_timestamp_ops_diff_with_shift(self, tz):

class AddOverflowScalar(object):

goal_time = 0.2

params = [1, -1, 0]
param_names = ['scalar']

Expand All @@ -124,8 +116,6 @@ def time_add_overflow_scalar(self, scalar):

class AddOverflowArray(object):

goal_time = 0.2

def setup(self):
N = 10**6
self.arr = np.arange(N)
Expand Down
17 changes: 0 additions & 17 deletions asv_bench/benchmarks/categoricals.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

class Concat(object):

goal_time = 0.2

def setup(self):
N = 10**5
self.s = pd.Series(list('aabbcd') * N).astype('category')
Expand All @@ -32,8 +30,6 @@ def time_union(self):

class Constructor(object):

goal_time = 0.2

def setup(self):
N = 10**5
self.categories = list('abcde')
Expand Down Expand Up @@ -75,8 +71,6 @@ def time_from_codes_all_int8(self):

class ValueCounts(object):

goal_time = 0.2

params = [True, False]
param_names = ['dropna']

Expand All @@ -91,8 +85,6 @@ def time_value_counts(self, dropna):

class Repr(object):

goal_time = 0.2

def setup(self):
self.sel = pd.Series(['s1234']).astype('category')

Expand All @@ -102,8 +94,6 @@ def time_rendering(self):

class SetCategories(object):

goal_time = 0.2

def setup(self):
n = 5 * 10**5
arr = ['s%04d' % i for i in np.random.randint(0, n // 10, size=n)]
Expand All @@ -115,8 +105,6 @@ def time_set_categories(self):

class Rank(object):

goal_time = 0.2

def setup(self):
N = 10**5
ncats = 100
Expand Down Expand Up @@ -154,8 +142,6 @@ def time_rank_int_cat_ordered(self):

class Isin(object):

goal_time = 0.2

params = ['object', 'int64']
param_names = ['dtype']

Expand Down Expand Up @@ -195,8 +181,6 @@ def time_categorical_series_is_monotonic_decreasing(self):

class Contains(object):

goal_time = 0.2

def setup(self):
N = 10**5
self.ci = tm.makeCategoricalIndex(N)
Expand All @@ -212,7 +196,6 @@ def time_categorical_contains(self):

class CategoricalSlicing(object):

goal_time = 0.2
params = ['monotonic_incr', 'monotonic_decr', 'non_monotonic']
param_names = ['index']

Expand Down
6 changes: 0 additions & 6 deletions asv_bench/benchmarks/ctors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

class SeriesConstructors(object):

goal_time = 0.2

param_names = ["data_fmt", "with_index"]
params = [[lambda x: x,
list,
Expand All @@ -30,8 +28,6 @@ def time_series_constructor(self, data_fmt, with_index):

class SeriesDtypesConstructors(object):

goal_time = 0.2

def setup(self):
N = 10**4
self.arr = np.random.randn(N, N)
Expand All @@ -54,8 +50,6 @@ def time_dtindex_from_index_with_series(self):

class MultiIndexConstructor(object):

goal_time = 0.2

def setup(self):
N = 10**4
self.iterables = [tm.makeStringIndex(N), range(20)]
Expand Down
4 changes: 0 additions & 4 deletions asv_bench/benchmarks/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

class Eval(object):

goal_time = 0.2

params = [['numexpr', 'python'], [1, 'all']]
param_names = ['engine', 'threads']

Expand Down Expand Up @@ -41,8 +39,6 @@ def teardown(self, engine, threads):

class Query(object):

goal_time = 0.2

def setup(self):
N = 10**6
halfway = (N // 2) - 1
Expand Down
8 changes: 0 additions & 8 deletions asv_bench/benchmarks/frame_ctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

class FromDicts(object):

goal_time = 0.2

def setup(self):
N, K = 5000, 50
self.index = tm.makeStringIndex(N)
Expand Down Expand Up @@ -45,8 +43,6 @@ def time_nested_dict_int64(self):

class FromSeries(object):

goal_time = 0.2

def setup(self):
mi = MultiIndex.from_product([range(100), range(100)])
self.s = Series(np.random.randn(10000), index=mi)
Expand All @@ -57,7 +53,6 @@ def time_mi_series(self):

class FromDictwithTimestamp(object):

goal_time = 0.2
params = [Nano(1), Hour(1)]
param_names = ['offset']

Expand All @@ -74,7 +69,6 @@ def time_dict_with_timestamp_offsets(self, offset):

class FromRecords(object):

goal_time = 0.2
params = [None, 1000]
param_names = ['nrows']

Expand All @@ -89,8 +83,6 @@ def time_frame_from_records_generator(self, nrows):

class FromNDArray(object):

goal_time = 0.2

def setup(self):
N = 100000
self.data = np.random.randn(N)
Expand Down
Loading