⎇ c83608da41161141b31ab5bf6961352e7870c505
benches/generated/mod.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
Add support for align-items: space-evenly (#218)
1use criterion::{criterion_group, criterion_main, Criterion};
2mod absolute_layout_align_items_and_justify_content_center;
3mod absolute_layout_align_items_and_justify_content_center_and_bottom_position;
4mod absolute_layout_align_items_and_justify_content_center_and_left_position;
5mod absolute_layout_align_items_and_justify_content_center_and_right_position;
6mod absolute_layout_align_items_and_justify_content_center_and_top_position;
7mod absolute_layout_align_items_and_justify_content_flex_end;
8mod absolute_layout_align_items_center;
9mod absolute_layout_align_items_center_on_child_only;
10mod absolute_layout_child_order;
11mod absolute_layout_in_wrap_reverse_column_container;
12mod absolute_layout_in_wrap_reverse_column_container_flex_end;
13mod absolute_layout_in_wrap_reverse_row_container;
14mod absolute_layout_in_wrap_reverse_row_container_flex_end;
15mod absolute_layout_justify_content_center;
16mod absolute_layout_no_size;
17mod absolute_layout_percentage_bottom_based_on_parent_height;
18mod absolute_layout_start_top_end_bottom;
19mod absolute_layout_width_height_end_bottom;
20mod absolute_layout_width_height_start_top;
21mod absolute_layout_width_height_start_top_end_bottom;
22mod absolute_layout_within_border;
23mod align_baseline;
24mod align_baseline_child_multiline;
25mod align_baseline_nested_child;
26mod align_center_should_size_based_on_content;
27mod align_content_space_around_single_line;
28mod align_content_space_around_wrapped;
29mod align_content_space_between_single_line;
30mod align_content_space_between_wrapped;
31mod align_content_space_evenly_single_line;
32mod align_content_space_evenly_wrapped;
33mod align_flex_start_with_shrinking_children;
34mod align_flex_start_with_shrinking_children_with_stretch;
35mod align_flex_start_with_stretching_children;
36mod align_items_center;
37mod align_items_center_child_with_margin_bigger_than_parent;
38mod align_items_center_child_without_margin_bigger_than_parent;
39mod align_items_center_with_child_margin;
40mod align_items_center_with_child_top;
41mod align_items_flex_end;
42mod align_items_flex_end_child_with_margin_bigger_than_parent;
43mod align_items_flex_end_child_without_margin_bigger_than_parent;
44mod align_items_flex_start;
45mod align_items_min_max;
46mod align_items_stretch;
47mod align_self_baseline;
48mod align_self_center;
49mod align_self_flex_end;
50mod align_self_flex_end_override_flex_start;
51mod align_self_flex_start;
52mod align_strech_should_size_based_on_parent;
53mod border_center_child;
54mod border_flex_child;
55mod border_no_child;
56mod border_stretch_child;
57mod child_min_max_width_flexing;
58mod container_with_unsized_child;
59mod display_none;
60mod display_none_fixed_size;
61mod display_none_with_child;
62mod display_none_with_margin;
63mod display_none_with_position;
64mod flex_basis_and_main_dimen_set_when_flexing;
65mod flex_basis_flex_grow_column;
66mod flex_basis_flex_grow_row;
67mod flex_basis_flex_shrink_column;
68mod flex_basis_flex_shrink_row;
69mod flex_basis_larger_than_content_column;
70mod flex_basis_larger_than_content_row;
71mod flex_basis_overrides_main_size;
72mod flex_basis_slightly_smaller_then_content_with_flex_grow_large_size;
73mod flex_basis_smaller_than_content_column;
74mod flex_basis_smaller_than_content_row;
75mod flex_basis_smaller_than_main_dimen_column;
76mod flex_basis_smaller_than_main_dimen_row;
77mod flex_basis_smaller_then_content_with_flex_grow_large_size;
78mod flex_basis_smaller_then_content_with_flex_grow_small_size;
79mod flex_basis_smaller_then_content_with_flex_grow_unconstraint_size;
80mod flex_basis_smaller_then_content_with_flex_grow_very_large_size;
81mod flex_basis_unconstraint_column;
82mod flex_basis_unconstraint_row;
83mod flex_direction_column;
84mod flex_direction_column_no_height;
85mod flex_direction_column_reverse;
86mod flex_direction_row;
87mod flex_direction_row_no_width;
88mod flex_direction_row_reverse;
89mod flex_grow_child;
90mod flex_grow_flex_basis_percent_min_max;
91mod flex_grow_height_maximized;
92mod flex_grow_in_at_most_container;
93mod flex_grow_less_than_factor_one;
94mod flex_grow_root_minimized;
95mod flex_grow_shrink_at_most;
96mod flex_grow_to_min;
97mod flex_grow_within_constrained_max_column;
98mod flex_grow_within_constrained_max_row;
99mod flex_grow_within_constrained_max_width;
100mod flex_grow_within_constrained_min_column;
101mod flex_grow_within_constrained_min_max_column;
102mod flex_grow_within_constrained_min_row;
103mod flex_grow_within_max_width;
104mod flex_root_ignored;
105mod flex_shrink_by_outer_margin_with_max_size;
106mod flex_shrink_flex_grow_child_flex_shrink_other_child;
107mod flex_shrink_flex_grow_row;
108mod flex_shrink_to_zero;
109mod flex_wrap_align_stretch_fits_one_row;
110mod flex_wrap_children_with_min_main_overriding_flex_basis;
111mod flex_wrap_wrap_to_child_height;
112mod justify_content_column_center;
113mod justify_content_column_flex_end;
114mod justify_content_column_flex_start;
115mod justify_content_column_min_height_and_margin_bottom;
116mod justify_content_column_min_height_and_margin_top;
117mod justify_content_column_space_around;
118mod justify_content_column_space_between;
119mod justify_content_column_space_evenly;
120mod justify_content_min_max;
121mod justify_content_min_width_with_padding_child_width_greater_than_parent;
122mod justify_content_min_width_with_padding_child_width_lower_than_parent;
123mod justify_content_overflow_min_max;
124mod justify_content_row_center;
125mod justify_content_row_flex_end;
126mod justify_content_row_flex_start;
127mod justify_content_row_max_width_and_margin;
128mod justify_content_row_min_width_and_margin;
129mod justify_content_row_space_around;
130mod justify_content_row_space_between;
131mod justify_content_row_space_evenly;
132mod margin_and_flex_column;
133mod margin_and_flex_row;
134mod margin_and_stretch_column;
135mod margin_and_stretch_row;
136mod margin_auto_bottom;
137mod margin_auto_bottom_and_top;
138mod margin_auto_bottom_and_top_justify_center;
139mod margin_auto_left;
140mod margin_auto_left_and_right;
141mod margin_auto_left_and_right_column;
142mod margin_auto_left_and_right_column_and_center;
143mod margin_auto_left_and_right_strech;
144mod margin_auto_left_child_bigger_than_parent;
145mod margin_auto_left_fix_right_child_bigger_than_parent;
146mod margin_auto_left_right_child_bigger_than_parent;
147mod margin_auto_left_stretching_child;
148mod margin_auto_mutiple_children_column;
149mod margin_auto_mutiple_children_row;
150mod margin_auto_right;
151mod margin_auto_top;
152mod margin_auto_top_and_bottom_strech;
153mod margin_auto_top_stretching_child;
154mod margin_bottom;
155mod margin_fix_left_auto_right_child_bigger_than_parent;
156mod margin_left;
157mod margin_right;
158mod margin_should_not_be_part_of_max_height;
159mod margin_should_not_be_part_of_max_width;
160mod margin_top;
161mod margin_with_sibling_column;
162mod margin_with_sibling_row;
163mod max_height;
164mod max_height_overrides_height;
165mod max_height_overrides_height_on_root;
166mod max_width;
167mod max_width_overrides_width;
168mod max_width_overrides_width_on_root;
169mod min_height;
170mod min_height_overrides_height;
171mod min_height_overrides_height_on_root;
172mod min_max_percent_no_width_height;
173mod min_width;
174mod min_width_overrides_width;
175mod min_width_overrides_width_on_root;
176mod nested_overflowing_child;
177mod nested_overflowing_child_in_constraint_parent;
178mod overflow_cross_axis;
179mod overflow_main_axis;
180mod padding_align_end_child;
181mod padding_center_child;
182mod padding_flex_child;
183mod padding_no_child;
184mod padding_stretch_child;
185mod parent_wrap_child_size_overflowing_parent;
186mod percent_absolute_position;
187mod percent_within_flex_grow;
188mod percentage_absolute_position;
189mod percentage_container_in_wrapping_container;
190mod percentage_flex_basis;
191mod percentage_flex_basis_cross;
192mod percentage_flex_basis_cross_max_height;
193mod percentage_flex_basis_cross_max_width;
194mod percentage_flex_basis_cross_min_height;
195mod percentage_flex_basis_cross_min_width;
196mod percentage_flex_basis_main_max_height;
197mod percentage_flex_basis_main_max_width;
198mod percentage_flex_basis_main_min_width;
199mod percentage_margin_should_calculate_based_only_on_width;
200mod percentage_multiple_nested_with_padding_margin_and_percentage_values;
201mod percentage_padding_should_calculate_based_only_on_width;
202mod percentage_position_bottom_right;
203mod percentage_position_left_top;
204mod percentage_size_based_on_parent_inner_size;
205mod percentage_size_of_flex_basis;
206mod percentage_width_height;
207mod percentage_width_height_undefined_parent_size;
208mod relative_position_should_not_nudge_siblings;
209mod rounding_flex_basis_flex_grow_row_prime_number_width;
210mod rounding_flex_basis_flex_grow_row_width_of_100;
211mod rounding_flex_basis_flex_shrink_row;
212mod rounding_flex_basis_overrides_main_size;
213mod rounding_fractial_input_1;
214mod rounding_fractial_input_2;
215mod rounding_fractial_input_3;
216mod rounding_fractial_input_4;
217mod rounding_total_fractial;
218mod rounding_total_fractial_nested;
219mod size_defined_by_child;
220mod size_defined_by_child_with_border;
221mod size_defined_by_child_with_padding;
222mod size_defined_by_grand_child;
223mod width_smaller_then_content_with_flex_grow_large_size;
224mod width_smaller_then_content_with_flex_grow_small_size;
225mod width_smaller_then_content_with_flex_grow_unconstraint_size;
226mod width_smaller_then_content_with_flex_grow_very_large_size;
227mod wrap_column;
228mod wrap_nodes_with_content_sizing_margin_cross;
229mod wrap_nodes_with_content_sizing_overflowing_margin;
230mod wrap_reverse_column;
231mod wrap_reverse_column_fixed_size;
232mod wrap_reverse_row;
233mod wrap_reverse_row_align_content_center;
234mod wrap_reverse_row_align_content_flex_start;
235mod wrap_reverse_row_align_content_space_around;
236mod wrap_reverse_row_align_content_stretch;
237mod wrap_reverse_row_single_line_different_size;
238mod wrap_row;
239mod wrap_row_align_items_center;
240mod wrap_row_align_items_flex_end;
241mod wrapped_column_max_height;
242mod wrapped_column_max_height_flex;
243mod wrapped_row_within_align_items_center;
244mod wrapped_row_within_align_items_flex_end;
245mod wrapped_row_within_align_items_flex_start;
246fn benchmark(c: &mut Criterion) {
247 c.bench_function("generated benchmarks", |b| {
248 b.iter(|| {
249 absolute_layout_align_items_and_justify_content_center::compute();
250 absolute_layout_align_items_and_justify_content_center_and_bottom_position::compute();
251 absolute_layout_align_items_and_justify_content_center_and_left_position::compute();
252 absolute_layout_align_items_and_justify_content_center_and_right_position::compute();
253 absolute_layout_align_items_and_justify_content_center_and_top_position::compute();
254 absolute_layout_align_items_and_justify_content_flex_end::compute();
255 absolute_layout_align_items_center::compute();
256 absolute_layout_align_items_center_on_child_only::compute();
257 absolute_layout_child_order::compute();
258 absolute_layout_in_wrap_reverse_column_container::compute();
259 absolute_layout_in_wrap_reverse_column_container_flex_end::compute();
260 absolute_layout_in_wrap_reverse_row_container::compute();
261 absolute_layout_in_wrap_reverse_row_container_flex_end::compute();
262 absolute_layout_justify_content_center::compute();
263 absolute_layout_no_size::compute();
264 absolute_layout_percentage_bottom_based_on_parent_height::compute();
265 absolute_layout_start_top_end_bottom::compute();
266 absolute_layout_width_height_end_bottom::compute();
267 absolute_layout_width_height_start_top::compute();
268 absolute_layout_width_height_start_top_end_bottom::compute();
269 absolute_layout_within_border::compute();
270 align_baseline::compute();
271 align_baseline_child_multiline::compute();
272 align_baseline_nested_child::compute();
273 align_center_should_size_based_on_content::compute();
274 align_content_space_around_single_line::compute();
275 align_content_space_around_wrapped::compute();
276 align_content_space_between_single_line::compute();
277 align_content_space_between_wrapped::compute();
278 align_content_space_evenly_single_line::compute();
279 align_content_space_evenly_wrapped::compute();
280 align_flex_start_with_shrinking_children::compute();
281 align_flex_start_with_shrinking_children_with_stretch::compute();
282 align_flex_start_with_stretching_children::compute();
283 align_items_center::compute();
284 align_items_center_child_with_margin_bigger_than_parent::compute();
285 align_items_center_child_without_margin_bigger_than_parent::compute();
286 align_items_center_with_child_margin::compute();
287 align_items_center_with_child_top::compute();
288 align_items_flex_end::compute();
289 align_items_flex_end_child_with_margin_bigger_than_parent::compute();
290 align_items_flex_end_child_without_margin_bigger_than_parent::compute();
291 align_items_flex_start::compute();
292 align_items_min_max::compute();
293 align_items_stretch::compute();
294 align_self_baseline::compute();
295 align_self_center::compute();
296 align_self_flex_end::compute();
297 align_self_flex_end_override_flex_start::compute();
298 align_self_flex_start::compute();
299 align_strech_should_size_based_on_parent::compute();
300 border_center_child::compute();
301 border_flex_child::compute();
302 border_no_child::compute();
303 border_stretch_child::compute();
304 child_min_max_width_flexing::compute();
305 container_with_unsized_child::compute();
306 display_none::compute();
307 display_none_fixed_size::compute();
308 display_none_with_child::compute();
309 display_none_with_margin::compute();
310 display_none_with_position::compute();
311 flex_basis_and_main_dimen_set_when_flexing::compute();
312 flex_basis_flex_grow_column::compute();
313 flex_basis_flex_grow_row::compute();
314 flex_basis_flex_shrink_column::compute();
315 flex_basis_flex_shrink_row::compute();
316 flex_basis_larger_than_content_column::compute();
317 flex_basis_larger_than_content_row::compute();
318 flex_basis_overrides_main_size::compute();
319 flex_basis_slightly_smaller_then_content_with_flex_grow_large_size::compute();
320 flex_basis_smaller_than_content_column::compute();
321 flex_basis_smaller_than_content_row::compute();
322 flex_basis_smaller_than_main_dimen_column::compute();
323 flex_basis_smaller_than_main_dimen_row::compute();
324 flex_basis_smaller_then_content_with_flex_grow_large_size::compute();
325 flex_basis_smaller_then_content_with_flex_grow_small_size::compute();
326 flex_basis_smaller_then_content_with_flex_grow_unconstraint_size::compute();
327 flex_basis_smaller_then_content_with_flex_grow_very_large_size::compute();
328 flex_basis_unconstraint_column::compute();
329 flex_basis_unconstraint_row::compute();
330 flex_direction_column::compute();
331 flex_direction_column_no_height::compute();
332 flex_direction_column_reverse::compute();
333 flex_direction_row::compute();
334 flex_direction_row_no_width::compute();
335 flex_direction_row_reverse::compute();
336 flex_grow_child::compute();
337 flex_grow_flex_basis_percent_min_max::compute();
338 flex_grow_height_maximized::compute();
339 flex_grow_in_at_most_container::compute();
340 flex_grow_less_than_factor_one::compute();
341 flex_grow_root_minimized::compute();
342 flex_grow_shrink_at_most::compute();
343 flex_grow_to_min::compute();
344 flex_grow_within_constrained_max_column::compute();
345 flex_grow_within_constrained_max_row::compute();
346 flex_grow_within_constrained_max_width::compute();
347 flex_grow_within_constrained_min_column::compute();
348 flex_grow_within_constrained_min_max_column::compute();
349 flex_grow_within_constrained_min_row::compute();
350 flex_grow_within_max_width::compute();
351 flex_root_ignored::compute();
352 flex_shrink_by_outer_margin_with_max_size::compute();
353 flex_shrink_flex_grow_child_flex_shrink_other_child::compute();
354 flex_shrink_flex_grow_row::compute();
355 flex_shrink_to_zero::compute();
356 flex_wrap_align_stretch_fits_one_row::compute();
357 flex_wrap_children_with_min_main_overriding_flex_basis::compute();
358 flex_wrap_wrap_to_child_height::compute();
359 justify_content_column_center::compute();
360 justify_content_column_flex_end::compute();
361 justify_content_column_flex_start::compute();
362 justify_content_column_min_height_and_margin_bottom::compute();
363 justify_content_column_min_height_and_margin_top::compute();
364 justify_content_column_space_around::compute();
365 justify_content_column_space_between::compute();
366 justify_content_column_space_evenly::compute();
367 justify_content_min_max::compute();
368 justify_content_min_width_with_padding_child_width_greater_than_parent::compute();
369 justify_content_min_width_with_padding_child_width_lower_than_parent::compute();
370 justify_content_overflow_min_max::compute();
371 justify_content_row_center::compute();
372 justify_content_row_flex_end::compute();
373 justify_content_row_flex_start::compute();
374 justify_content_row_max_width_and_margin::compute();
375 justify_content_row_min_width_and_margin::compute();
376 justify_content_row_space_around::compute();
377 justify_content_row_space_between::compute();
378 justify_content_row_space_evenly::compute();
379 margin_and_flex_column::compute();
380 margin_and_flex_row::compute();
381 margin_and_stretch_column::compute();
382 margin_and_stretch_row::compute();
383 margin_auto_bottom::compute();
384 margin_auto_bottom_and_top::compute();
385 margin_auto_bottom_and_top_justify_center::compute();
386 margin_auto_left::compute();
387 margin_auto_left_and_right::compute();
388 margin_auto_left_and_right_column::compute();
389 margin_auto_left_and_right_column_and_center::compute();
390 margin_auto_left_and_right_strech::compute();
391 margin_auto_left_child_bigger_than_parent::compute();
392 margin_auto_left_fix_right_child_bigger_than_parent::compute();
393 margin_auto_left_right_child_bigger_than_parent::compute();
394 margin_auto_left_stretching_child::compute();
395 margin_auto_mutiple_children_column::compute();
396 margin_auto_mutiple_children_row::compute();
397 margin_auto_right::compute();
398 margin_auto_top::compute();
399 margin_auto_top_and_bottom_strech::compute();
400 margin_auto_top_stretching_child::compute();
401 margin_bottom::compute();
402 margin_fix_left_auto_right_child_bigger_than_parent::compute();
403 margin_left::compute();
404 margin_right::compute();
405 margin_should_not_be_part_of_max_height::compute();
406 margin_should_not_be_part_of_max_width::compute();
407 margin_top::compute();
408 margin_with_sibling_column::compute();
409 margin_with_sibling_row::compute();
410 max_height::compute();
411 max_height_overrides_height::compute();
412 max_height_overrides_height_on_root::compute();
413 max_width::compute();
414 max_width_overrides_width::compute();
415 max_width_overrides_width_on_root::compute();
416 min_height::compute();
417 min_height_overrides_height::compute();
418 min_height_overrides_height_on_root::compute();
419 min_max_percent_no_width_height::compute();
420 min_width::compute();
421 min_width_overrides_width::compute();
422 min_width_overrides_width_on_root::compute();
423 nested_overflowing_child::compute();
424 nested_overflowing_child_in_constraint_parent::compute();
425 overflow_cross_axis::compute();
426 overflow_main_axis::compute();
427 padding_align_end_child::compute();
428 padding_center_child::compute();
429 padding_flex_child::compute();
430 padding_no_child::compute();
431 padding_stretch_child::compute();
432 parent_wrap_child_size_overflowing_parent::compute();
433 percent_absolute_position::compute();
434 percent_within_flex_grow::compute();
435 percentage_absolute_position::compute();
436 percentage_container_in_wrapping_container::compute();
437 percentage_flex_basis::compute();
438 percentage_flex_basis_cross::compute();
439 percentage_flex_basis_cross_max_height::compute();
440 percentage_flex_basis_cross_max_width::compute();
441 percentage_flex_basis_cross_min_height::compute();
442 percentage_flex_basis_cross_min_width::compute();
443 percentage_flex_basis_main_max_height::compute();
444 percentage_flex_basis_main_max_width::compute();
445 percentage_flex_basis_main_min_width::compute();
446 percentage_margin_should_calculate_based_only_on_width::compute();
447 percentage_multiple_nested_with_padding_margin_and_percentage_values::compute();
448 percentage_padding_should_calculate_based_only_on_width::compute();
449 percentage_position_bottom_right::compute();
450 percentage_position_left_top::compute();
451 percentage_size_based_on_parent_inner_size::compute();
452 percentage_size_of_flex_basis::compute();
453 percentage_width_height::compute();
454 percentage_width_height_undefined_parent_size::compute();
455 relative_position_should_not_nudge_siblings::compute();
456 rounding_flex_basis_flex_grow_row_prime_number_width::compute();
457 rounding_flex_basis_flex_grow_row_width_of_100::compute();
458 rounding_flex_basis_flex_shrink_row::compute();
459 rounding_flex_basis_overrides_main_size::compute();
460 rounding_fractial_input_1::compute();
461 rounding_fractial_input_2::compute();
462 rounding_fractial_input_3::compute();
463 rounding_fractial_input_4::compute();
464 rounding_total_fractial::compute();
465 rounding_total_fractial_nested::compute();
466 size_defined_by_child::compute();
467 size_defined_by_child_with_border::compute();
468 size_defined_by_child_with_padding::compute();
469 size_defined_by_grand_child::compute();
470 width_smaller_then_content_with_flex_grow_large_size::compute();
471 width_smaller_then_content_with_flex_grow_small_size::compute();
472 width_smaller_then_content_with_flex_grow_unconstraint_size::compute();
473 width_smaller_then_content_with_flex_grow_very_large_size::compute();
474 wrap_column::compute();
475 wrap_nodes_with_content_sizing_margin_cross::compute();
476 wrap_nodes_with_content_sizing_overflowing_margin::compute();
477 wrap_reverse_column::compute();
478 wrap_reverse_column_fixed_size::compute();
479 wrap_reverse_row::compute();
480 wrap_reverse_row_align_content_center::compute();
481 wrap_reverse_row_align_content_flex_start::compute();
482 wrap_reverse_row_align_content_space_around::compute();
483 wrap_reverse_row_align_content_stretch::compute();
484 wrap_reverse_row_single_line_different_size::compute();
485 wrap_row::compute();
486 wrap_row_align_items_center::compute();
487 wrap_row_align_items_flex_end::compute();
488 wrapped_column_max_height::compute();
489 wrapped_column_max_height_flex::compute();
490 wrapped_row_within_align_items_center::compute();
491 wrapped_row_within_align_items_flex_end::compute();
492 wrapped_row_within_align_items_flex_start::compute();
493 })
494 });
495}
496criterion_group!(benches, benchmark);
497criterion_main!(benches);