Skip to content

Commit 7bcba9c

Browse files
erikniljreback
authored andcommitted
CLN: Removed all occurances of goal_time and enabled linting for benchmarks (#23265)
1 parent 225b9b0 commit 7bcba9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+0
-398
lines changed

asv_bench/benchmarks/algorithms.py

-10
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
class Factorize(object):
1717

18-
goal_time = 0.2
19-
2018
params = [True, False]
2119
param_names = ['sort']
2220

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

3937
class Duplicated(object):
4038

41-
goal_time = 0.2
42-
4339
params = ['first', 'last', False]
4440
param_names = ['keep']
4541

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

6258
class DuplicatedUniqueIndex(object):
6359

64-
goal_time = 0.2
65-
6660
def setup(self):
6761
N = 10**5
6862
self.idx_int_dup = pd.Int64Index(np.arange(N * 5))
@@ -75,8 +69,6 @@ def time_duplicated_unique_int(self):
7569

7670
class Match(object):
7771

78-
goal_time = 0.2
79-
8072
def setup(self):
8173
self.uniques = tm.makeStringIndex(1000).values
8274
self.all = self.uniques.repeat(10)
@@ -88,8 +80,6 @@ def time_match_string(self):
8880

8981
class Hashing(object):
9082

91-
goal_time = 0.2
92-
9383
def setup_cache(self):
9484
N = 10**5
9585

asv_bench/benchmarks/attrs_caching.py

-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
class DataFrameAttributes(object):
1010

11-
goal_time = 0.2
12-
1311
def setup(self):
1412
self.df = DataFrame(np.random.randn(10, 6))
1513
self.cur_index = self.df.index
@@ -23,8 +21,6 @@ def time_set_index(self):
2321

2422
class CacheReadonly(object):
2523

26-
goal_time = 0.2
27-
2824
def setup(self):
2925

3026
class Foo:

asv_bench/benchmarks/binary_ops.py

-10
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
class Ops(object):
1111

12-
goal_time = 0.2
13-
1412
params = [[True, False], ['default', 1]]
1513
param_names = ['use_numexpr', 'threads']
1614

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

4341
class Ops2(object):
4442

45-
goal_time = 0.2
46-
4743
def setup(self):
4844
N = 10**3
4945
self.df = DataFrame(np.random.randn(N, N))
@@ -81,8 +77,6 @@ def time_frame_float_mod(self):
8177

8278
class Timeseries(object):
8379

84-
goal_time = 0.2
85-
8680
params = [None, 'US/Eastern']
8781
param_names = ['tz']
8882

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

110104
class AddOverflowScalar(object):
111105

112-
goal_time = 0.2
113-
114106
params = [1, -1, 0]
115107
param_names = ['scalar']
116108

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

125117
class AddOverflowArray(object):
126118

127-
goal_time = 0.2
128-
129119
def setup(self):
130120
N = 10**6
131121
self.arr = np.arange(N)

asv_bench/benchmarks/categoricals.py

-17
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
class Concat(object):
1616

17-
goal_time = 0.2
18-
1917
def setup(self):
2018
N = 10**5
2119
self.s = pd.Series(list('aabbcd') * N).astype('category')
@@ -32,8 +30,6 @@ def time_union(self):
3230

3331
class Constructor(object):
3432

35-
goal_time = 0.2
36-
3733
def setup(self):
3834
N = 10**5
3935
self.categories = list('abcde')
@@ -75,8 +71,6 @@ def time_from_codes_all_int8(self):
7571

7672
class ValueCounts(object):
7773

78-
goal_time = 0.2
79-
8074
params = [True, False]
8175
param_names = ['dropna']
8276

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

9286
class Repr(object):
9387

94-
goal_time = 0.2
95-
9688
def setup(self):
9789
self.sel = pd.Series(['s1234']).astype('category')
9890

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

10395
class SetCategories(object):
10496

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

116106
class Rank(object):
117107

118-
goal_time = 0.2
119-
120108
def setup(self):
121109
N = 10**5
122110
ncats = 100
@@ -154,8 +142,6 @@ def time_rank_int_cat_ordered(self):
154142

155143
class Isin(object):
156144

157-
goal_time = 0.2
158-
159145
params = ['object', 'int64']
160146
param_names = ['dtype']
161147

@@ -195,8 +181,6 @@ def time_categorical_series_is_monotonic_decreasing(self):
195181

196182
class Contains(object):
197183

198-
goal_time = 0.2
199-
200184
def setup(self):
201185
N = 10**5
202186
self.ci = tm.makeCategoricalIndex(N)
@@ -212,7 +196,6 @@ def time_categorical_contains(self):
212196

213197
class CategoricalSlicing(object):
214198

215-
goal_time = 0.2
216199
params = ['monotonic_incr', 'monotonic_decr', 'non_monotonic']
217200
param_names = ['index']
218201

asv_bench/benchmarks/ctors.py

-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
class SeriesConstructors(object):
77

8-
goal_time = 0.2
9-
108
param_names = ["data_fmt", "with_index"]
119
params = [[lambda x: x,
1210
list,
@@ -30,8 +28,6 @@ def time_series_constructor(self, data_fmt, with_index):
3028

3129
class SeriesDtypesConstructors(object):
3230

33-
goal_time = 0.2
34-
3531
def setup(self):
3632
N = 10**4
3733
self.arr = np.random.randn(N, N)
@@ -54,8 +50,6 @@ def time_dtindex_from_index_with_series(self):
5450

5551
class MultiIndexConstructor(object):
5652

57-
goal_time = 0.2
58-
5953
def setup(self):
6054
N = 10**4
6155
self.iterables = [tm.makeStringIndex(N), range(20)]

asv_bench/benchmarks/eval.py

-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
class Eval(object):
1010

11-
goal_time = 0.2
12-
1311
params = [['numexpr', 'python'], [1, 'all']]
1412
param_names = ['engine', 'threads']
1513

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

4240
class Query(object):
4341

44-
goal_time = 0.2
45-
4642
def setup(self):
4743
N = 10**6
4844
halfway = (N // 2) - 1

asv_bench/benchmarks/frame_ctor.py

-8
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
class FromDicts(object):
1212

13-
goal_time = 0.2
14-
1513
def setup(self):
1614
N, K = 5000, 50
1715
self.index = tm.makeStringIndex(N)
@@ -45,8 +43,6 @@ def time_nested_dict_int64(self):
4543

4644
class FromSeries(object):
4745

48-
goal_time = 0.2
49-
5046
def setup(self):
5147
mi = MultiIndex.from_product([range(100), range(100)])
5248
self.s = Series(np.random.randn(10000), index=mi)
@@ -57,7 +53,6 @@ def time_mi_series(self):
5753

5854
class FromDictwithTimestamp(object):
5955

60-
goal_time = 0.2
6156
params = [Nano(1), Hour(1)]
6257
param_names = ['offset']
6358

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

7570
class FromRecords(object):
7671

77-
goal_time = 0.2
7872
params = [None, 1000]
7973
param_names = ['nrows']
8074

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

9084
class FromNDArray(object):
9185

92-
goal_time = 0.2
93-
9486
def setup(self):
9587
N = 100000
9688
self.data = np.random.randn(N)

0 commit comments

Comments
 (0)