File tree 1 file changed +23
-0
lines changed
datafusion/functions/benches
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,29 @@ fn criterion_benchmark(c: &mut Criterion) {
159
159
) ;
160
160
161
161
group. finish ( ) ;
162
+
163
+ // REPEAT overflow
164
+ let repeat_times = 1073741824 ;
165
+ let mut group = c. benchmark_group ( format ! ( "repeat {} times" , repeat_times) ) ;
166
+ group. sampling_mode ( SamplingMode :: Flat ) ;
167
+ group. sample_size ( 10 ) ;
168
+ group. measurement_time ( Duration :: from_secs ( 10 ) ) ;
169
+
170
+ let args = create_args :: < i32 > ( size, 2 , repeat_times, false ) ;
171
+ group. bench_function (
172
+ format ! (
173
+ "repeat_string overflow [size={}, repeat_times={}]" ,
174
+ size, repeat_times
175
+ ) ,
176
+ |b| {
177
+ b. iter ( || {
178
+ // TODO use invoke_with_args
179
+ black_box ( repeat. invoke_batch ( & args, size) )
180
+ } )
181
+ } ,
182
+ ) ;
183
+
184
+ group. finish ( ) ;
162
185
}
163
186
}
164
187
You can’t perform that action at this time.
0 commit comments