From bcdca70afdf59c9976148e95cebad5cf63d75a7f Mon Sep 17 00:00:00 2001 From: Harsh Pratap Singh Date: Thu, 25 Jul 2024 15:28:53 +0530 Subject: [PATCH] dev: Gas metering (#319) Adds a gas_report for the PRs in Github Actions! If the gas increases, the PR check will fail. If the gas decreases or remains same, the PR check passes! Please check the type of change your PR introduces: - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build-related changes - [ ] Documentation content changes - [x] Other (please describe): Github Action job ## What is the current behavior? There is no tracing of gas usage in PRs! Issue Number: #292 ## What is the new behavior? When the PR is made, the gas_report is generated and compared with the pre-existing one to trace the gas usage in tests. If more gas is being used, the PR check fails, and has to be manually accepted after checking! If the gas usage remains same, or decreases, the PR passes! ## Does this introduce a breaking change? - [ ] Yes - [x] No --- .github/workflows/test.yml | 13 + gas_report.json | 654 +++++++++++++++++++++++++++++++++ scripts/generate_gas_report.sh | 43 +++ 3 files changed, 710 insertions(+) create mode 100644 gas_report.json create mode 100755 scripts/generate_gas_report.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a0fe464..81671ac1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,3 +37,16 @@ jobs: uses: software-mansion/setup-scarb@v1.3.2 - name: Step 3 - Checking formatting run: scarb fmt --check + + gas-report: + needs: test + name: gas-report + runs-on: ubuntu-latest + steps: + - name: Step 1 - Check out main branch + uses: actions/checkout@v3 + - name: Step 2 - Getting scarb + uses: software-mansion/setup-scarb@v1.3.2 + - name: Step 3 - Generate and compare gas report + run: ./scripts/generate_gas_report.sh + shell: bash diff --git a/gas_report.json b/gas_report.json new file mode 100644 index 00000000..8bfdf444 --- /dev/null +++ b/gas_report.json @@ -0,0 +1,654 @@ +{ + "alexandria_data_structures::tests::bit_array::test_stress_test": 983908350, + "alexandria_math::tests::ed25519_test::verify_signature_test_3": 410362908, + "alexandria_math::tests::ed25519_test::verify_signature_test_2": 387681668, + "alexandria_math::tests::ed25519_test::verify_signature_test_0": 387034448, + "alexandria_math::tests::ed25519_test::verify_signature_invalid": 386386948, + "alexandria_math::tests::ed25519_test::verify_signature_test_1": 379915028, + "alexandria_storage::tests::list_test::tests::test_append_get_many": 328960220, + "alexandria_data_structures::tests::bit_array::test_serde_ser_deser": 135779000, + "alexandria_bytes::tests::test_bytes::test_bytes_sha256": 77008968, + "alexandria_data_structures::tests::bit_array::test_write_word_le_u512": 55010760, + "alexandria_data_structures::tests::bit_array::test_read_word_le_u512": 49918390, + "alexandria_math::tests::sha256_test::sha256_lorem_ipsum_test": 47014076, + "alexandria_data_structures::tests::bit_array::test_write_word_be_u512": 46828860, + "alexandria_data_structures::tests::bit_array::test_read_word_be_u512": 40555700, + "alexandria_math::tests::sha512_test::test_sha512_lorem_ipsum": 34928772, + "alexandria_math::tests::sha256_test::sha256_url": 31492476, + "alexandria_encoding::tests::sol_abi::sol_bytes_test": 31413290, + "alexandria_data_structures::tests::bit_array::test_write_word_le_u256": 27520470, + "alexandria_math::tests::mod_arithmetics_test::pow_mod_test": 26160370, + "alexandria_math::tests::mod_arithmetics_test::pow_mod_2_test": 26109970, + "alexandria_math::tests::mod_arithmetics_test::pow_mod_1_test": 26109970, + "alexandria_bytes::tests::test_bytes::test_byte_array_conversions": 25836200, + "alexandria_bytes::tests::test_bytes::test_bytes_update": 23797800, + "alexandria_data_structures::tests::bit_array::test_write_word_be_u256": 23429600, + "alexandria_data_structures::tests::bit_array::test_read_word_le_u256": 22449980, + "alexandria_math::tests::karatsuba_test::multiply_by_zero": 19989510, + "alexandria_encoding::tests::sol_abi::encoded_as_test": 19437510, + "alexandria_encoding::tests::sol_abi::encode_test": 18540610, + "alexandria_encoding::tests::sol_abi::decode_test": 18233290, + "alexandria_data_structures::tests::bit_array::test_read_word_be_u256": 17178550, + "alexandria_data_structures::tests::bit_array::test_append_bit": 16946680, + "alexandria_encoding::tests::sol_abi::encode_packed_test": 15552720, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_long_list": 15388648, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_string_large_bytearray_inputs": 14400236, + "alexandria_data_structures::tests::bit_array::test_write_word_le": 13745440, + "alexandria_math::tests::sha512_test::test_size_zero": 12326794, + "alexandria_math::tests::sha512_test::test_sha512_size_one": 12324284, + "alexandria_data_structures::tests::bit_array::test_write_word_be": 11700330, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u512": 11236680, + "alexandria_math::tests::karatsuba_test::multiply_same_size_positive_number": 9982920, + "alexandria_math::tests::math_test::test_pow_power_2_all": 9942780, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_string": 9641400, + "alexandria_bytes::tests::test_bytes::test_bytes_concat": 8828950, + "alexandria_data_structures::tests::bit_array::test_read_word_le_half": 8774740, + "alexandria_data_structures::tests::bit_array::test_read_word_le": 8678210, + "alexandria_math::tests::sha256_test::sha256_empty_test": 8393336, + "alexandria_math::tests::sha256_test::sha256_random_data_test": 8331016, + "alexandria_data_structures::tests::bit_array::test_at": 7832190, + "alexandria_data_structures::tests::bit_array::test_write_word_le_half": 6956440, + "alexandria_data_structures::tests::bit_array::test_write_word_be_half": 5898950, + "alexandria_data_structures::tests::bit_array::test_read_word_be_half": 5520340, + "alexandria_data_structures::tests::bit_array::test_read_word_be": 5453130, + "alexandria_math::tests::ed25519_test::verify_signature_invalid_length": 5244692, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u256": 3759980, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_bytes31": 3678180, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_list": 3060830, + "alexandria_data_structures::tests::byte_array_ext::test_byte_array_into_array_u8": 3005940, + "alexandria_bytes::tests::test_bytes::test_bytes_read_bytes": 2994820, + "alexandria_bytes::tests::test_bytes::test_bytes_append": 2978980, + "alexandria_math::tests::fast_power_test::fast_power_mod_test": 2947540, + "alexandria_math::tests::karatsuba_test::multiply_distinct_size_positive_number": 2763330, + "alexandria_storage::tests::list_test::tests::test_append_span_existing_list": 2558830, + "alexandria_ascii::tests::test_ascii_integer::u256_to_ascii": 2547830, + "alexandria_storage::tests::list_test::tests::test_array_pass": 2537110, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128_array_packed": 2461770, + "alexandria_bytes::tests::test_bytes::test_bytes_keccak": 2419614, + "alexandria_math::tests::perfect_number_test::not_perfect_big_number_test": 2386970, + "alexandria_storage::tests::list_test::tests::test_pop_front_pass": 2381730, + "alexandria_math::tests::perfect_number_test::perfect_big_number_test": 2381610, + "alexandria_storage::tests::list_test::tests::test_set_pass": 2340760, + "alexandria_math::tests::math_test::test_rotr_min": 1978370, + "alexandria_math::tests::fast_power_test::fast_power_test": 1911400, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u128": 1890180, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_string_length_greater_than_56": 1819186, + "alexandria_storage::tests::list_test::tests::test_get_index_pass": 1816640, + "alexandria_bytes::tests::test_bytes::test_bytes_update_panic": 1809480, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_7": 1804240, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_6": 1804240, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u256_array": 1717620, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_string_length_exactly_56": 1716266, + "alexandria_searching::tests::bm_search_test::bm_search_test_1": 1704080, + "alexandria_storage::tests::list_test::tests::test_pop_append": 1685530, + "alexandria_storage::tests::list_test::tests::test_get_pass": 1682170, + "alexandria_math::tests::extended_euclidean_algorithm_test::extended_euclidean_algorithm_test": 1664940, + "alexandria_searching::tests::bm_search_test::bm_search_test_3": 1575160, + "alexandria_encoding::tests::sol_abi::selector_test": 1565890, + "alexandria_math::tests::fast_root_test::fast_nr_optimize_test_1": 1538600, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u512": 1533000, + "alexandria_encoding::tests::base64_test::base64decode_hello_world_test": 1461316, + "alexandria_data_structures::tests::byte_reader::test_read_sequence_le": 1460660, + "alexandria_data_structures::tests::byte_reader::test_read_sequence": 1460660, + "alexandria_math::tests::math_test::test_rotl_max": 1457800, + "alexandria_data_structures::tests::byte_reader::test_read_u512_le": 1426070, + "alexandria_data_structures::tests::byte_reader::test_read_u512": 1426070, + "alexandria_data_structures::tests::byte_reader::test_len": 1425410, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128_packed": 1411760, + "alexandria_storage::tests::list_test::tests::test_array_clean": 1378450, + "alexandria_math::tests::wad_ray_math_test::test_wad_div_trivial": 1375840, + "alexandria_math::tests::wad_ray_math_test::test_ray_div_trivial": 1375840, + "alexandria_math::tests::math_test::test_rotl_min": 1297740, + "alexandria_searching::tests::binary_search_closest_test::all_values": 1290730, + "alexandria_storage::tests::list_test::tests::test_array_get_value_after_clean": 1273650, + "alexandria_data_structures::tests::byte_reader::test_byte_array_reader_equals_array_of_bytes_reader": 1209030, + "alexandria_encoding::tests::base64_felt_test::base64encode_hello_world_test": 1191618, + "alexandria_searching::tests::bm_search_test::bm_search_test_2": 1111870, + "alexandria_encoding::tests::base64_felt_test::base64urlencode_with_plus_and_slash": 1089102, + "alexandria_encoding::tests::base64_felt_test::base64encode_with_plus_and_slash": 1089102, + "alexandria_encoding::tests::base64_felt_test::base64encode_simple_test": 1082052, + "alexandria_encoding::tests::base64_felt_test::base64encode_empty_test": 1080822, + "alexandria_merkle_tree::tests::storage_proof_test::balance_lsb_proof_test": 1068614, + "alexandria_merkle_tree::tests::storage_proof_test::total_balance_lsb_proof_test": 1040418, + "alexandria_math::tests::wad_ray_math_test::test_wad_mul_trivial": 1033210, + "alexandria_math::tests::wad_ray_math_test::test_ray_mul_trivial": 1033210, + "alexandria_data_structures::tests::byte_appender::test_append_u512_arr": 1025220, + "alexandria_storage::tests::list_test::tests::test_append_few": 1007590, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_string_with_payload_len_on_2_bytes": 1004560, + "alexandria_math::tests::aliquot_sum_test::three_digit_number_test": 968080, + "alexandria_math::tests::wad_ray_math_test::test_ray_mul_rounding": 937950, + "alexandria_math::tests::math_test::test_rotr_max": 914540, + "alexandria_bytes::tests::test_bytes::test_bytes_zero": 913770, + "alexandria_bytes::tests::test_bytes::test_bytes_read_bytes31": 903920, + "alexandria_data_structures::tests::byte_appender::test_append_u512_le": 903490, + "alexandria_storage::tests::list_test::tests::test_fetch_existing_list": 900760, + "alexandria_storage::tests::list_test::tests::test_is_empty": 893330, + "alexandria_math::tests::zellers_congruence_test::zellers_congruence_invalid_parameters_test": 886500, + "alexandria_math::tests::karatsuba_test::multiply_by_number_lt_ten": 874810, + "alexandria_math::tests::math_test::shl_should_not_overflow": 868516, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_1": 852590, + "alexandria_storage::tests::list_test::tests::test_new_then_fill_list": 844060, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_array": 830320, + "alexandria_sorting::tests::quick_sort_test::quicksort_test": 829340, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u256": 775940, + "alexandria_merkle_tree::tests::storage_proof_test::wrong_contract_address_proof_test": 775102, + "alexandria_math::tests::wad_ray_math_test::test_revertWhen_wad_mul_overflow": 773610, + "alexandria_math::tests::wad_ray_math_test::test_revertWhen_ray_mul_overflow": 773610, + "alexandria_searching::tests::dijkstra_test::calculate_shortest_path": 769110, + "alexandria_data_structures::tests::byte_appender::test_append_u512_le_arr": 766260, + "alexandria_data_structures::tests::byte_reader::test_clone_byte_array_reader": 762270, + "alexandria_data_structures::tests::byte_reader::test_read_u256_le": 751990, + "alexandria_data_structures::tests::byte_reader::test_read_u256": 751990, + "alexandria_searching::tests::dijkstra_test::calculate_shortest_path_random": 751730, + "alexandria_numeric::tests::interpolate_fast_test::interp_constant_left_diff": 750720, + "alexandria_storage::tests::list_test::tests::test_append_array_empty": 747280, + "alexandria_storage::tests::list_test::tests::test_array_clean_with_empty_array": 747010, + "alexandria_bytes::tests::test_bytes_store::tests::test_bytes_storage_40_bytes": 740360, + "alexandria_ascii::tests::test_ascii_integer::u128_to_ascii": 718640, + "alexandria_sorting::tests::quick_sort_test::quicksort_test_pre_sorted_decreasing": 717900, + "alexandria_searching::tests::dijkstra_test::calculate_shortest_path_node_visited": 710210, + "alexandria_math::tests::zellers_congruence_test::zellers_congruence_test": 709180, + "alexandria_bytes::tests::test_bytes::test_bytes_read_felt252_packed": 708660, + "alexandria_math::tests::i257_test::i257_test_div_rem": 707000, + "alexandria_bytes::tests::test_bytes_store::tests::test_bytes_storage_32_bytes": 696650, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u256": 690780, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test": 690020, + "alexandria_sorting::tests::quick_sort_test::quicksort_test_pre_sorted_2_same_values": 685090, + "alexandria_sorting::tests::quick_sort_test::quicksort_test_pre_sorted": 685090, + "alexandria_sorting::tests::quick_sort_test::quicksort_test_2_same_values": 677090, + "alexandria_data_structures::tests::byte_appender::test_append_i16_le_neg": 675850, + "alexandria_bytes::tests::test_bytes::test_bytes_read_address": 671520, + "alexandria_merkle_tree::tests::storage_proof_test::balance_msb_proof_test": 665518, + "alexandria_math::tests::wad_ray_math_test::test_wad_to_ray_conversion": 664010, + "alexandria_math::tests::wad_ray_math_test::test_ray_to_wad_conversion": 659700, + "alexandria_searching::tests::binary_search_closest_test::closest_value_found": 654650, + "alexandria_storage::tests::list_test::tests::test_new_initializes_empty_list": 648430, + "alexandria_data_structures::tests::byte_appender::test_append_i128_arr": 632500, + "alexandria_storage::tests::list_test::tests::test_array_empty": 627450, + "alexandria_math::tests::fast_root_test::fast_curt_test_1": 625330, + "alexandria_data_structures::tests::byte_appender::test_append_u256_arr": 622940, + "alexandria_data_structures::tests::byte_appender::test_append_u128_arr": 621740, + "alexandria_data_structures::tests::byte_appender::test_append_i128_le": 600590, + "alexandria_data_structures::tests::byte_appender::test_append_u256_le": 591230, + "alexandria_data_structures::tests::byte_appender::test_append_u128_le": 589830, + "alexandria_searching::tests::binary_search_closest_test::value_found": 583930, + "alexandria_linalg::tests::norm_test::norm_test_into": 570910, + "alexandria_linalg::tests::norm_test::norm_test_1": 570910, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u64": 559120, + "alexandria_storage::tests::list_test::tests::test_get_out_of_bounds": 555730, + "alexandria_data_structures::tests::byte_appender::test_append_i16_neg_arr": 552260, + "alexandria_math::tests::math_test::pow_test": 548670, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_bytes31": 544700, + "alexandria_data_structures::tests::byte_appender::test_append_i32_le_neg": 534570, + "alexandria_storage::tests::list_test::tests::test_get_index_out_of_bounds": 524550, + "alexandria_math::tests::mod_arithmetics_test::mult_mod_test": 520360, + "alexandria_searching::tests::binary_search_test::value_found": 512200, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test": 510430, + "alexandria_bytes::tests::test_bytes::test_bytes_read_felt252_packed_too_large": 510140, + "alexandria_bytes::tests::test_bytes::test_bytes_read_felt252_packed_out_of_bound": 510140, + "alexandria_math::tests::mod_arithmetics_test::mult_mod_2_test": 503690, + "alexandria_math::tests::mod_arithmetics_test::mult_mod_1_test": 503690, + "alexandria_data_structures::tests::byte_appender::test_append_i128_le_arr": 503020, + "alexandria_math::tests::fast_root_test::fast_sqrt_test_2": 502430, + "alexandria_math::tests::fast_root_test::fast_sqrt_test_1": 502430, + "alexandria_data_structures::tests::byte_appender::test_append_u256_le_arr": 493460, + "alexandria_data_structures::tests::byte_appender::test_append_u128_le_arr": 492260, + "alexandria_storage::tests::list_test::tests::test_deploy": 488210, + "alexandria_encoding::tests::base64_test::base64urldecode_with_plus_and_slash": 483994, + "alexandria_encoding::tests::base64_test::base64decode_with_plus_and_slash": 483994, + "alexandria_encoding::tests::base64_test::base64decode_simple_test": 482684, + "alexandria_math::tests::wad_ray_math_test::test_wad_mul_fractions": 480770, + "alexandria_math::tests::wad_ray_math_test::test_ray_mul_fractions": 480770, + "alexandria_data_structures::tests::byte_appender::test_append_i32_neg_arr": 480100, + "alexandria_data_structures::tests::byte_reader::test_read_sequence_le_arr": 478040, + "alexandria_data_structures::tests::byte_reader::test_read_sequence_arr": 478040, + "alexandria_data_structures::tests::byte_appender::test_append_i16_le": 476810, + "alexandria_data_structures::tests::byte_reader::test_read_u512_le_arr": 465660, + "alexandria_data_structures::tests::byte_reader::test_read_u512_arr": 465660, + "alexandria_data_structures::tests::byte_appender::test_append_i16_neg": 464330, + "alexandria_data_structures::tests::byte_appender::test_append_i64_le_neg": 463930, + "alexandria_data_structures::tests::byte_appender::test_append_i64_le": 463930, + "alexandria_data_structures::tests::byte_appender::test_append_i16_le_neg_arr": 462180, + "alexandria_math::tests::mod_arithmetics_test::sqr_mod_test": 457360, + "alexandria_data_structures::tests::byte_appender::test_append_u16_le": 455490, + "alexandria_math::tests::perfect_number_test::not_perfect_small_number_test": 453560, + "alexandria_data_structures::tests::byte_appender::test_append_u64_le": 453170, + "alexandria_bytes::tests::test_bytes_store::tests::test_deploy": 451920, + "alexandria_data_structures::tests::byte_reader::test_len_arr": 450920, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test_2_same_values_pre_sorted": 445190, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test_2_same_values": 445190, + "alexandria_data_structures::tests::byte_appender::test_append_i64_neg_arr": 444020, + "alexandria_data_structures::tests::byte_appender::test_append_i64_arr": 444020, + "alexandria_math::tests::bitmap_test::test_bitmap_set_bit_at_10": 443716, + "alexandria_merkle_tree::tests::merkle_tree_test::regular_call_merkle_tree_pedersen::regular_call_merkle_tree_pedersen_test": 439380, + "alexandria_merkle_tree::tests::merkle_tree_test::merkle_tree_pedersen_test": 439380, + "alexandria_math::tests::wad_ray_math_test::test_wad_mul_rounding_up": 439130, + "alexandria_math::tests::wad_ray_math_test::test_ray_mul_rounding_up": 439130, + "alexandria_data_structures::tests::byte_appender::test_append_u64_arr": 433260, + "alexandria_data_structures::tests::byte_appender::test_append_i128_le_neg": 428610, + "alexandria_math::tests::bitmap_test::test_bitmap_nearest_significant_bit_right_priority_at_index": 426732, + "alexandria_math::tests::bitmap_test::test_bitmap_nearest_significant_bit_right_priority": 426732, + "alexandria_math::tests::bitmap_test::test_bitmap_nearest_significant_bit_left_priority_at_index": 426732, + "alexandria_math::tests::bitmap_test::test_bitmap_nearest_significant_bit_left_priority": 426732, + "alexandria_data_structures::tests::byte_appender::test_append_i128_neg_arr": 425980, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128": 419170, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_short_nested_list": 416688, + "alexandria_data_structures::tests::byte_reader::test_word_u128_none": 413880, + "alexandria_data_structures::tests::byte_reader::test_word_u128_le_none": 413880, + "alexandria_data_structures::tests::byte_reader::test_word_u128_le": 413780, + "alexandria_data_structures::tests::byte_reader::test_word_u128": 413780, + "alexandria_math::tests::i257_test::i257_test_div_no_rem": 413760, + "alexandria_data_structures::tests::byte_appender::test_append_i32_le": 406170, + "alexandria_data_structures::tests::byte_appender::test_append_i32_le_neg_arr": 404500, + "alexandria_math::tests::test_keccak256::test_keccak256_full_u256": 403742, + "alexandria_bytes::tests::test_bytes::test_bytes_read_usize": 401770, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u64": 401770, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u32": 401770, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u16": 401770, + "alexandria_math::tests::is_prime_test::is_prime_test_4": 401710, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u8": 401470, + "alexandria_math::tests::mod_arithmetics_test::div_mod_test": 397220, + "alexandria_numeric::tests::interpolate_test::interp_constant_right_test": 396340, + "alexandria_data_structures::tests::byte_appender::test_append_u32_le": 395410, + "alexandria_data_structures::tests::byte_appender::test_append_u512": 394910, + "alexandria_merkle_tree::tests::merkle_tree_test::merkle_tree_poseidon_test": 389430, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test_pre_sorted": 385730, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test_2_pre_sorted_decreasing": 385730, + "alexandria_data_structures::tests::byte_appender::test_append_i16_arr": 385460, + "alexandria_numeric::tests::interpolate_fast_test::interp_constant_right_test": 384100, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_5": 382270, + "alexandria_math::tests::math_test::test_wrapping_math_wrapping": 377002, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_short_nested_list": 376500, + "alexandria_data_structures::tests::byte_appender::test_append_i64_le_neg_arr": 375660, + "alexandria_data_structures::tests::byte_appender::test_append_i64_le_arr": 375660, + "alexandria_math::tests::perfect_number_test::perfect_numbers_test": 375330, + "alexandria_data_structures::tests::byte_appender::test_append_i32_neg": 371050, + "alexandria_data_structures::tests::byte_appender::test_append_i16": 371050, + "alexandria_math::tests::ed25519_test::affine_point_op": 369690, + "alexandria_data_structures::tests::byte_appender::test_append_u64_le_arr": 364900, + "alexandria_data_structures::tests::byte_appender::test_append_u16_arr": 363940, + "alexandria_data_structures::tests::byte_appender::test_append_i128_le_neg_arr": 361240, + "alexandria_numeric::tests::interpolate_fast_test::interp_nearest_test": 358780, + "alexandria_numeric::tests::interpolate_fast_test::interp_constant_left_test": 358780, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test_pre_sorted_decreasing": 356290, + "alexandria_data_structures::tests::byte_appender::test_append_u16": 351530, + "alexandria_data_structures::tests::byte_appender::test_append_i32_arr": 349380, + "alexandria_numeric::tests::interpolate_test::interp_nearest_test": 349180, + "alexandria_numeric::tests::interpolate_test::interp_constant_left_test": 349180, + "alexandria_data_structures::tests::byte_appender::test_append_i128": 345550, + "alexandria_numeric::tests::interpolate_fast_test::interp_extrapolation_test": 343030, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_array": 340440, + "alexandria_data_structures::tests::byte_appender::test_append_i16_le_arr": 340420, + "alexandria_data_structures::tests::byte_appender::test_append_u32_arr": 338620, + "alexandria_data_structures::tests::byte_appender::test_append_u256": 335790, + "alexandria_data_structures::tests::byte_appender::test_append_u128": 335790, + "alexandria_math::tests::mod_arithmetics_test::sub_mod_test": 334890, + "alexandria_storage::tests::list_test::tests::test_pop_front_empty": 334330, + "alexandria_data_structures::tests::byte_appender::test_append_i64_neg": 324410, + "alexandria_data_structures::tests::byte_appender::test_append_i64": 324410, + "alexandria_data_structures::tests::byte_appender::test_append_i32": 324410, + "alexandria_numeric::tests::interpolate_fast_test::interp_linear_test": 323890, + "alexandria_math::tests::mod_arithmetics_test::sub_mod_2_test": 322970, + "alexandria_math::tests::mod_arithmetics_test::sub_mod_1_test": 322970, + "alexandria_math::tests::math_test::count_digits_of_base_test": 320190, + "alexandria_data_structures::tests::byte_appender::test_append_u16_le_arr": 318900, + "alexandria_data_structures::tests::byte_appender::test_append_u64": 314650, + "alexandria_data_structures::tests::byte_appender::test_append_u32": 314650, + "alexandria_math::tests::math_test::test_wrapping_math_non_wrapping": 313654, + "alexandria_encoding::tests::base64_test::base64encode_hello_world_test": 312390, + "alexandria_data_structures::tests::byte_appender::test_append_i32_le_arr": 311580, + "alexandria_searching::tests::binary_search_closest_test::length_three_span": 311130, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_short_list": 306604, + "alexandria_storage::tests::list_test::tests::test_get_empty": 306290, + "alexandria_numeric::tests::interpolate_test::interp_extrapolation_test": 303430, + "alexandria_data_structures::tests::byte_appender::test_append_i128_neg": 301090, + "alexandria_data_structures::tests::byte_appender::test_append_u32_le_arr": 300820, + "alexandria_numeric::tests::interpolate_test::interp_linear_test": 300610, + "alexandria_math::tests::i257_test::i257_test_sub": 298810, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test_2_same_values": 297650, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u32": 297360, + "alexandria_data_structures::tests::array_ext::concat::of_u128": 296590, + "alexandria_ascii::tests::test_ascii_integer::u64_to_ascii": 294290, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_string_with_payload_len_on_1_byte": 293990, + "alexandria_searching::tests::dijkstra_test::add_edge": 291960, + "alexandria_searching::tests::binary_search_closest_test::value_not_found": 291120, + "alexandria_math::tests::collatz_sequence_test::collatz_sequence_15_test": 289270, + "alexandria_math::tests::test_keccak256::test_keccak256_partial_bytes": 285232, + "alexandria_storage::tests::list_test::tests::test_fetch_empty_list": 275520, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u128": 272900, + "alexandria_storage::tests::list_test::tests::test_set_out_of_bounds": 271420, + "alexandria_data_structures::tests::array_ext::extend_from_span::of_u128": 271100, + "alexandria_data_structures::tests::byte_appender::test_append_i8_neg": 268960, + "alexandria_data_structures::tests::byte_appender::test_append_i8": 268960, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test_pre_sorted_2_same_values": 268330, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test_pre_sorted": 268330, + "alexandria_math::tests::test_keccak256::test_keccak256_empty_bytes": 265972, + "alexandria_data_structures::tests::byte_array_ext::test_span_u8_into_byte_array": 264000, + "alexandria_data_structures::tests::array_ext::concat::of_felt": 263700, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128_array_packed_too_large": 261880, + "alexandria_data_structures::tests::array_ext::reversed::of_u128": 260230, + "alexandria_searching::tests::binary_search_test::value_not_found": 258140, + "alexandria_math::tests::wad_ray_math_test::test_wad_div_fractions": 257850, + "alexandria_math::tests::wad_ray_math_test::test_ray_div_fractions": 257850, + "alexandria_data_structures::tests::byte_reader::test_reader_helper_arr": 257760, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_multi_list": 257000, + "alexandria_data_structures::tests::byte_reader::test_clone_array_of_bytes_reader": 256900, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128_packed_too_large": 252960, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128_packed_out_of_bound": 252960, + "alexandria_data_structures::tests::byte_reader::test_read_u256_le_arr": 251380, + "alexandria_data_structures::tests::byte_reader::test_read_u256_arr": 251380, + "alexandria_data_structures::tests::array_ext::unique::without_duplicates": 248580, + "alexandria_data_structures::tests::array_ext::dedup::one_match_more": 241630, + "alexandria_data_structures::tests::array_ext::reversed::of_felt": 241380, + "alexandria_ascii::tests::test_ascii_integer::u32_to_ascii": 239390, + "alexandria_data_structures::tests::array_ext::dedup::two_matches": 238560, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_test": 237850, + "alexandria_math::tests::i257_test::i257_test_mul": 236640, + "alexandria_data_structures::tests::array_ext::dedup::one_match": 235490, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test_one_element": 235310, + "alexandria_data_structures::tests::array_ext::extend_from_span::of_felt": 234660, + "alexandria_data_structures::tests::array_ext::extend_from_span::from_self": 233960, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_4": 233060, + "alexandria_data_structures::tests::array_ext::occurrences::of_u128": 232850, + "alexandria_data_structures::tests::array_ext::occurrences::of_felt": 232850, + "alexandria_math::tests::bitmap_test::test_bitmap_get_bit_at_10": 231768, + "alexandria_sorting::tests::merge_sort_test::merge_sort_test_empty": 231540, + "alexandria_data_structures::tests::array_ext::dedup::all_different": 231520, + "alexandria_data_structures::tests::byte_appender::test_append_i8_neg_arr": 231010, + "alexandria_data_structures::tests::byte_appender::test_append_i8_arr": 231010, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_test_inverse": 229600, + "alexandria_math::tests::bitmap_test::test_bitmap_nearest_left_significant_bit": 228768, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_short_list": 227900, + "alexandria_data_structures::tests::array_ext::concat::empty_array_2": 227890, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test_one_element": 227700, + "alexandria_data_structures::tests::array_ext::concat::empty_array_1": 227690, + "alexandria_data_structures::tests::byte_reader::test_word_u64_none": 227290, + "alexandria_data_structures::tests::byte_reader::test_word_u64_le_none": 227290, + "alexandria_math::tests::gcd_of_n_numbers_test::gcd_test": 227240, + "alexandria_data_structures::tests::byte_reader::test_word_u64_le": 227190, + "alexandria_data_structures::tests::byte_reader::test_word_u64": 227190, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_test_tryinto": 224900, + "alexandria_math::tests::gcd_of_n_numbers_test::gcd_test_inverse": 224490, + "alexandria_sorting::tests::bubble_sort_test::bubble_sort_test_empty": 223930, + "alexandria_encoding::tests::base64_test::base64urlencode_with_plus_and_slash": 223458, + "alexandria_encoding::tests::base64_test::base64encode_with_plus_and_slash": 223458, + "alexandria_encoding::tests::base64_test::base64encode_simple_test": 223258, + "alexandria_math::tests::mod_arithmetics_test::add_mod_p_test": 222160, + "alexandria_linalg::tests::kron_test::kron_product_test": 219180, + "alexandria_data_structures::tests::array_ext::reversed::even": 218150, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_test_4": 217600, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_test_3": 217600, + "alexandria_data_structures::tests::array_ext::extend_from_span::empty_span": 216840, + "alexandria_data_structures::tests::array_ext::unique::duplicate_back": 216610, + "alexandria_math::tests::bitmap_test::test_bitmap_nearest_right_significant_bit": 215654, + "alexandria_math::tests::gcd_of_n_numbers_test::gcd_test_3": 214550, + "alexandria_math::tests::i257_test::i257_test_add": 214310, + "alexandria_data_structures::tests::array_ext::dedup::one_elem": 212500, + "alexandria_data_structures::tests::array_ext::unique::duplicate_middle": 212070, + "alexandria_ascii::tests::test_ascii_integer::u16_to_ascii": 211940, + "alexandria_numeric::tests::trapezoidal_rule_test::trapezoidal_rule_test": 211350, + "alexandria_data_structures::tests::array_ext::dedup::no_elem": 206260, + "alexandria_math::tests::collatz_sequence_test::collatz_sequence_10_test": 205120, + "alexandria_data_structures::tests::array_ext::extend_from_span::empty_array": 205080, + "alexandria_searching::tests::binary_search_closest_test::length_two_span": 204410, + "alexandria_data_structures::tests::array_ext::unique::duplicate_front": 202990, + "alexandria_math::tests::wad_ray_math_test::test_wad_mul_rounding": 201880, + "alexandria_linalg::tests::norm_test::norm_test_2": 201340, + "alexandria_ascii::tests::test_ascii_integer::u8_to_ascii": 200960, + "alexandria_data_structures::tests::array_ext::unique::one_duplicate": 197650, + "alexandria_data_structures::tests::array_ext::append_all::source_empty": 196390, + "alexandria_data_structures::tests::array_ext::append_all::destination_empty": 196390, + "alexandria_data_structures::tests::array_ext::min_position::of_u128": 194820, + "alexandria_data_structures::tests::array_ext::max_position::max_position": 194820, + "alexandria_data_structures::tests::array_ext::append_all::of_felt": 194260, + "alexandria_numeric::tests::diff_test::diff_test": 193190, + "alexandria_math::tests::fibonacci_test::fibonacci_test": 192620, + "alexandria_math::tests::aliquot_sum_test::two_digit_prime_number_test": 192200, + "alexandria_data_structures::tests::span_ext::pop_back_n::of_felt": 190570, + "alexandria_data_structures::tests::span_ext::pop_back_n::pop_zero": 190170, + "alexandria_data_structures::tests::array_ext::remove_front_n::remove_zero": 190050, + "alexandria_data_structures::tests::array_ext::reversed::size_1": 189430, + "alexandria_data_structures::tests::span_ext::pop_front_n::pop_zero": 188960, + "alexandria_data_structures::tests::array_ext::dedup::multiple_duplicates_same": 188400, + "alexandria_data_structures::tests::span_ext::remove_back_n::remove_zero": 187790, + "alexandria_data_structures::tests::span_ext::remove_front_n::remove_zero": 187660, + "alexandria_math::tests::aliquot_sum_test::two_digit_number_test": 187440, + "alexandria_data_structures::tests::array_ext::position::of_u128": 187130, + "alexandria_data_structures::tests::span_ext::remove_back_n::of_felt": 185370, + "alexandria_math::tests::i257_test::i257_test_div_sign_zero": 184730, + "alexandria_math::tests::mod_arithmetics_test::add_mod_1_test": 180960, + "alexandria_math::tests::perfect_number_test::perfect_small_number_test": 180840, + "alexandria_data_structures::tests::array_ext::append_all::of_u128": 180020, + "alexandria_searching::tests::binary_search_test::value_found_length_one": 178860, + "alexandria_linalg::tests::norm_test::norm_test_3": 176760, + "alexandria_math::tests::gcd_of_n_numbers_test::gcd_single_test": 176480, + "alexandria_numeric::tests::cumsum_test::cumsum_test": 173780, + "alexandria_numeric::tests::cumprod_test::cumprod_test": 173580, + "alexandria_data_structures::tests::span_ext::pop_back_n::of_u128": 173270, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_3": 173030, + "alexandria_math::tests::is_power_of_two_test::is_power_of_two_test_5": 171364, + "alexandria_encoding::tests::base64_test::base64encode_empty_test": 170950, + "alexandria_data_structures::tests::span_ext::remove_back_n::of_u128": 170930, + "alexandria_math::tests::mod_arithmetics_test::add_mod_2_test": 170660, + "alexandria_linalg::tests::dot_test::dot_product_test": 170510, + "alexandria_math::tests::bitmap_test::test_bitmap_set_bit_at_1": 170416, + "alexandria_math::tests::bitmap_test::test_bitmap_set_bit_at_0": 170416, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_short_string": 169460, + "alexandria_searching::tests::levenshtein_distance_test::bm_search_test_2": 169420, + "alexandria_data_structures::tests::array_ext::position::of_felt": 169260, + "alexandria_math::tests::aliquot_sum_test::one_digit_number_test": 168400, + "alexandria_numeric::tests::integers_test::test_u32_from_bytes": 168230, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u16": 166480, + "alexandria_data_structures::tests::queue::queue_peek_front_test": 164990, + "alexandria_numeric::tests::integers_test::test_u32_to_bytes_full": 164886, + "alexandria_numeric::tests::integers_test::test_u32_to_bytes_partial": 163576, + "alexandria_data_structures::tests::array_ext::dedup::all_same": 163530, + "alexandria_data_structures::tests::array_ext::unique::all_same": 162610, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_single_test": 162350, + "alexandria_numeric::tests::integers_test::test_u32_to_bytes_leading_zeros": 162266, + "alexandria_data_structures::tests::array_ext::pop_front_n::of_felt": 162030, + "alexandria_encoding::tests::base64_test::base64decode_empty_test": 160270, + "alexandria_math::tests::aliquot_sum_test::two_test": 158880, + "alexandria_data_structures::tests::array_ext::min::of_u128": 158500, + "alexandria_data_structures::tests::array_ext::min::of_felt": 158500, + "alexandria_data_structures::tests::array_ext::max::max": 158060, + "alexandria_math::tests::fast_root_test::fast_nr_optimize_test_2": 157440, + "alexandria_data_structures::tests::array_ext::remove_front_n::of_felt": 157170, + "alexandria_math::tests::i257_test::i257_test_into": 156040, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_mutilple_string": 155682, + "alexandria_math::tests::i257_test::i257_test_partial_ord": 155380, + "alexandria_data_structures::tests::span_ext::pop_front_n::of_felt": 154430, + "alexandria_data_structures::tests::array_ext::pop_front_n::pop_zero": 154340, + "alexandria_math::tests::aliquot_sum_test::zero_test": 154120, + "alexandria_math::tests::aliquot_sum_test::one_test": 154120, + "alexandria_math::tests::collatz_sequence_test::collatz_sequence_empty_test": 151570, + "alexandria_data_structures::tests::byte_reader::test_word_u32_none": 151170, + "alexandria_data_structures::tests::byte_reader::test_word_u32_le_none": 151170, + "alexandria_data_structures::tests::byte_reader::test_word_u32_le": 151070, + "alexandria_data_structures::tests::byte_reader::test_word_u32": 151070, + "alexandria_data_structures::tests::queue::queue_dequeue_test": 150480, + "alexandria_data_structures::tests::queue::queue_enqueue_test": 150240, + "alexandria_data_structures::tests::span_ext::remove_front_n::of_felt": 149500, + "alexandria_data_structures::tests::queue::queue_new_test": 148600, + "alexandria_data_structures::tests::array_ext::pop_front_n::exact_len": 146900, + "alexandria_searching::tests::binary_search_closest_test::value_found_length_one": 145770, + "alexandria_data_structures::tests::array_ext::pop_front_n::of_u128": 144730, + "alexandria_data_structures::tests::byte_reader::test_word_u128_le_none_arr": 143670, + "alexandria_data_structures::tests::byte_reader::test_word_u128_le_arr": 143570, + "alexandria_data_structures::tests::byte_reader::test_word_u128_arr": 143570, + "alexandria_data_structures::tests::array_ext::remove_front_n::of_u128": 142730, + "alexandria_math::tests::armstrong_number_test::three_digit_armstrong_number_test": 142460, + "alexandria_data_structures::tests::array_ext::max_position::max_position_one_item": 139120, + "alexandria_data_structures::tests::array_ext::min_position::min_position_one_item": 138680, + "alexandria_data_structures::tests::array_ext::min::one_item": 137290, + "alexandria_data_structures::tests::span_ext::pop_front_n::of_u128": 137130, + "alexandria_data_structures::tests::array_ext::max::max_one_item": 136850, + "alexandria_data_structures::tests::span_ext::pop_back_n::exact_len": 136560, + "alexandria_data_structures::tests::span_ext::pop_front_n::exact_len": 136160, + "alexandria_data_structures::tests::array_ext::occurrences::empty_array": 136140, + "alexandria_data_structures::tests::array_ext::append_all::both_empty": 135810, + "alexandria_data_structures::tests::array_ext::reversed::empty": 135470, + "alexandria_data_structures::tests::span_ext::remove_front_n::of_u128": 135060, + "alexandria_data_structures::tests::byte_reader::test_word_u16_none": 113110, + "alexandria_data_structures::tests::byte_reader::test_word_u16_le_none": 113110, + "alexandria_data_structures::tests::byte_reader::test_word_u16_le": 113010, + "alexandria_data_structures::tests::byte_reader::test_word_u16": 113010, + "alexandria_data_structures::tests::bit_array::test_index": 106660, + "alexandria_data_structures::tests::bit_array::test_len": 103980, + "alexandria_math::tests::bitmap_test::test_bitmap_least_significant_bit": 101284, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u64": 101040, + "alexandria_encoding::tests::reversible_test::test_reverse_bits_u8": 101040, + "alexandria_math::tests::bitmap_test::test_bitmap_get_bit_at_0": 95118, + "alexandria_math::tests::bitmap_test::test_bitmap_get_bit_at_1": 94618, + "alexandria_data_structures::tests::byte_reader::test_reader_helper": 91630, + "alexandria_math::tests::bitmap_test::test_bitmap_most_significant_bit": 87870, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_string_length_between_2_and_55": 82156, + "alexandria_data_structures::tests::stack::nullable_stack_push_pop_push_test": 78450, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_string_single_byte_ge_0x80": 76106, + "alexandria_sorting::tests::quick_sort_test::quicksort_test_one_element": 75920, + "alexandria_math::tests::trigonometry_test::tan_positive_test_1": 74780, + "alexandria_math::tests::trigonometry_test::tan_negative_test_1": 74780, + "alexandria_data_structures::tests::array_ext::contains::of_u128": 73010, + "alexandria_data_structures::tests::array_ext::contains::of_felt": 73010, + "alexandria_math::tests::armstrong_number_test::three_digit_non_armstrong_number_test": 71780, + "alexandria_data_structures::tests::byte_reader::test_word_u64_none_arr": 71560, + "alexandria_data_structures::tests::byte_reader::test_word_u64_le_none_arr": 71560, + "alexandria_data_structures::tests::byte_reader::test_word_u64_le_arr": 71460, + "alexandria_data_structures::tests::byte_reader::test_word_u64_arr": 71460, + "alexandria_math::tests::armstrong_number_test::two_digit_numbers_are_not_armstrong_numbers_test": 68460, + "alexandria_data_structures::tests::bit_array::test_pop_front": 68370, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u32": 68320, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_string_single_byte_lt_0x80": 67986, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_default_value": 67786, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_string_with_input_too_short": 67160, + "alexandria_data_structures::tests::bit_array::test_at_none": 66470, + "alexandria_data_structures::tests::stack::nullable_stack_pop_test": 64650, + "alexandria_data_structures::tests::stack::nullable_stack_peek_test": 64650, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_list_with_input_too_short": 63770, + "alexandria_sorting::tests::quick_sort_test::quicksort_test_empty": 63520, + "alexandria_data_structures::tests::bit_array::test_pop_front_empty": 62690, + "alexandria_encoding::tests::rlp_test::test_rlp_encode_empty_input_should_fail": 61676, + "alexandria_math::tests::i257_test::i257_test_equality": 60340, + "alexandria_data_structures::tests::stack::felt252_stack_push_pop_push_test": 60030, + "alexandria_math::tests::armstrong_number_test::one_digit_armstrong_number_test": 59890, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_string_default_value": 59160, + "alexandria_data_structures::tests::vec::nullable_vec_index_trait_test": 58550, + "alexandria_data_structures::tests::vec::felt252_vec_index_trait_test": 57910, + "alexandria_data_structures::tests::vec::nullable_vec_get_test": 56990, + "alexandria_data_structures::tests::vec::felt252_vec_get_test": 56250, + "alexandria_data_structures::tests::array_ext::pop_front_n::more_then_len": 56140, + "alexandria_data_structures::tests::stack::felt252_stack_pop_test": 55240, + "alexandria_data_structures::tests::stack::felt252_stack_peek_test": 55240, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_short_string_input_too_short": 54540, + "alexandria_data_structures::tests::array_ext::remove_front_n::more_then_len": 53640, + "alexandria_data_structures::tests::array_ext::remove_front_n::exact_len": 53640, + "alexandria_data_structures::tests::stack::nullable_stack_push_test": 53530, + "alexandria_data_structures::tests::stack::felt252_stack_push_test": 52930, + "alexandria_data_structures::tests::byte_reader::test_word_u32_none_arr": 52680, + "alexandria_data_structures::tests::byte_reader::test_word_u32_le_none_arr": 52680, + "alexandria_data_structures::tests::byte_reader::test_word_u32_le_arr": 52580, + "alexandria_data_structures::tests::byte_reader::test_word_u32_arr": 52580, + "alexandria_data_structures::tests::vec::nullable_vec_set_test": 51990, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u16": 51960, + "alexandria_data_structures::tests::vec::felt252_vec_set_test": 51470, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_short_list_with_input_too_short": 50940, + "alexandria_data_structures::tests::array_ext::concat::both_empty": 49990, + "alexandria_math::tests::trigonometry_test::sin_positive_test_3": 49810, + "alexandria_math::tests::trigonometry_test::sin_positive_test_2": 49810, + "alexandria_math::tests::trigonometry_test::sin_positive_test_1": 49810, + "alexandria_math::tests::trigonometry_test::sin_negative_test_2": 49810, + "alexandria_math::tests::trigonometry_test::sin_negative_test_1": 49810, + "alexandria_math::tests::trigonometry_test::cos_positive_test_1": 49680, + "alexandria_math::tests::trigonometry_test::cos_negative_test_1": 49680, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_string_with_payload_len_too_short": 49540, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_long_list_with_len_too_short": 49540, + "alexandria_data_structures::tests::vec::nullable_vec_push_test": 49280, + "alexandria_encoding::tests::rlp_test::test_rlp_empty": 49140, + "alexandria_data_structures::tests::vec::felt252_vec_push_test": 48960, + "alexandria_data_structures::tests::vec::nullable_vec_at_test": 48930, + "alexandria_data_structures::tests::vec::felt252_vec_at_test": 48610, + "alexandria_data_structures::tests::array_ext::unique::empty": 48050, + "alexandria_math::tests::i257_test::i257_test_eq_not_eq": 47860, + "alexandria_data_structures::tests::array_ext::pop_front_n::empty_array": 46460, + "alexandria_data_structures::tests::vec::nullable_vec_len_test": 46450, + "alexandria_data_structures::tests::vec::felt252_vec_len_test": 46350, + "alexandria_data_structures::tests::span_ext::pop_back_n::more_then_len": 45800, + "alexandria_data_structures::tests::array_ext::position::empty_array": 45620, + "alexandria_data_structures::tests::array_ext::max::max_empty_array": 45620, + "alexandria_data_structures::tests::span_ext::pop_back_n::empty_array": 45540, + "alexandria_data_structures::tests::bit_array::test_index_fail": 45430, + "alexandria_data_structures::tests::span_ext::pop_front_n::more_then_len": 45400, + "alexandria_data_structures::tests::span_ext::pop_front_n::empty_array": 45140, + "alexandria_data_structures::tests::array_ext::remove_front_n::empty_array": 45120, + "alexandria_data_structures::tests::array_ext::contains::empty_array": 44850, + "alexandria_data_structures::tests::array_ext::min_position::min_position_empty_array": 44080, + "alexandria_data_structures::tests::array_ext::max_position::max_position_empty_array": 44080, + "alexandria_data_structures::tests::array_ext::min::empty": 43680, + "alexandria_data_structures::tests::array_ext::max::empty": 43680, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_long_string": 43630, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_long_list": 43630, + "alexandria_data_structures::tests::span_ext::remove_back_n::more_then_len": 43460, + "alexandria_data_structures::tests::span_ext::remove_back_n::exact_len": 43460, + "alexandria_data_structures::tests::span_ext::remove_front_n::more_then_len": 43330, + "alexandria_data_structures::tests::span_ext::remove_front_n::exact_len": 43330, + "alexandria_data_structures::tests::byte_reader::test_word_u16_none_arr": 43240, + "alexandria_data_structures::tests::byte_reader::test_word_u16_le_none_arr": 43240, + "alexandria_data_structures::tests::byte_reader::test_word_u16_le_arr": 43140, + "alexandria_data_structures::tests::byte_reader::test_word_u16_arr": 43140, + "alexandria_data_structures::tests::span_ext::remove_back_n::empty_array": 42660, + "alexandria_data_structures::tests::bit_array::test_serde_serialize": 42590, + "alexandria_data_structures::tests::span_ext::remove_front_n::empty_array": 42530, + "alexandria_numeric::tests::interpolate_fast_test::interp_revert_len_too_short": 40190, + "alexandria_numeric::tests::interpolate_fast_test::interp_revert_len_mismatch": 38120, + "alexandria_math::tests::is_prime_test::is_prime_test_3": 37970, + "alexandria_math::tests::is_prime_test::is_prime_test_2": 37970, + "alexandria_math::tests::is_prime_test::is_prime_test_1": 37770, + "alexandria_searching::tests::binary_search_closest_test::value_not_found_length_one": 37380, + "alexandria_searching::tests::binary_search_closest_test::zero_length_span": 37180, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_long_string_payload_too_long": 35560, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_long_list_payload_too_long": 34960, + "alexandria_searching::tests::binary_search_test::value_not_found_length_one": 34730, + "alexandria_searching::tests::binary_search_test::zero_length_span": 34530, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_short_string": 34200, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_short_list": 34200, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_byte": 34200, + "alexandria_encoding::tests::rlp_test::test_rlp_decode_type_long_list_len_too_short": 34160, + "alexandria_data_structures::tests::vec::nullable_vec_new_test": 32650, + "alexandria_data_structures::tests::vec::felt252_vec_new_test": 32650, + "alexandria_data_structures::tests::stack::nullable_stack_new_test": 32650, + "alexandria_data_structures::tests::stack::nullable_stack_is_empty_test": 32650, + "alexandria_data_structures::tests::stack::felt252_stack_new_test": 32650, + "alexandria_data_structures::tests::stack::felt252_stack_is_empty_test": 32650, + "alexandria_math::tests::wad_ray_math_test::test_revertWhen_wad_div_zero": 31620, + "alexandria_math::tests::wad_ray_math_test::test_revertWhen_ray_div_zero": 31620, + "alexandria_numeric::tests::interpolate_test::interp_revert_len_too_short": 30290, + "alexandria_math::tests::u512_arithmetics_test::test_u512_sub": 29100, + "alexandria_numeric::tests::interpolate_test::interp_revert_len_mismatch": 28220, + "alexandria_math::tests::lcm_of_n_numbers_test::lcm_empty_input_test": 27440, + "alexandria_numeric::tests::integers_test::test_u32_from_bytes_too_big": 26980, + "alexandria_math::tests::gcd_of_n_numbers_test::gcd_empty_input_test": 26410, + "alexandria_data_structures::tests::vec::nullable_vec_set_test_expect_error": 25680, + "alexandria_data_structures::tests::vec::felt252_vec_set_test_expect_error": 25580, + "alexandria_math::tests::is_power_of_two_test::is_power_of_two_test_3": 25504, + "alexandria_data_structures::tests::vec::nullable_vec_index_trait_out_of_bounds_test": 25330, + "alexandria_data_structures::tests::vec::nullable_vec_at_out_of_bounds_test": 25230, + "alexandria_math::tests::is_power_of_two_test::is_power_of_two_test_4": 24904, + "alexandria_math::tests::is_power_of_two_test::is_power_of_two_test_2": 24904, + "alexandria_math::tests::is_power_of_two_test::is_power_of_two_test_1": 24904, + "alexandria_math::tests::i257_test::i257_test_is_zero": 23940, + "alexandria_encoding::tests::reversible_test::test_reverse_bytes_u8": 22880, + "alexandria_data_structures::tests::queue::queue_is_empty_test": 22540, + "alexandria_math::tests::u512_arithmetics_test::test_u512_add": 19600, + "alexandria_data_structures::tests::vec::felt252_vec_index_trait_out_of_bounds_test": 16020, + "alexandria_data_structures::tests::vec::felt252_vec_at_out_of_bounds_test": 16020, + "alexandria_numeric::tests::trapezoidal_rule_test::trapezoidal_rule_test_revert_not_sorted": 15670, + "alexandria_numeric::tests::diff_test::diff_test_revert_not_sorted": 9650, + "alexandria_numeric::tests::trapezoidal_rule_test::trapezoidal_rule_test_revert_len_too_short": 9450, + "alexandria_numeric::tests::trapezoidal_rule_test::trapezoidal_rule_test_revert_len_mismatch": 9250, + "alexandria_linalg::tests::kron_test::kron_product_test_check_len": 9060, + "alexandria_bytes::tests::test_bytes::test_bytes_read_u128_array_packed_out_of_bound": 7380, + "alexandria_numeric::tests::diff_test::diff_test_revert_empty": 6140, + "alexandria_numeric::tests::cumsum_test::cumsum_test_revert_empty": 6140, + "alexandria_numeric::tests::cumprod_test::cumprod_test_revert_empty": 6140, + "alexandria_linalg::tests::dot_test::dot_product_test_check_len": 4570 +} diff --git a/scripts/generate_gas_report.sh b/scripts/generate_gas_report.sh new file mode 100755 index 00000000..b71d7a59 --- /dev/null +++ b/scripts/generate_gas_report.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +run_tests_and_collect_gas() { + scarb test | grep -E 'test .* \.\.\. ok \(gas usage est\.: [0-9]+\)' | sed -E 's/test (.*) \.\.\. ok \(gas usage est\.: ([0-9]+)\)/\1 \2/' | sort -k2 -nr +} + +generate_gas_report() { + local gas_data=$(run_tests_and_collect_gas) + + if [ -z "$gas_data" ]; then + echo "Error: No gas data found. Make sure 'scarb test' is running correctly." + exit 1 + fi + + local increased_gas=false + local increased_tests=() + + while read -r test_name gas_used; do + old_gas=$(grep "\"$test_name\":" gas_report.json 2>/dev/null | cut -d':' -f2 | tr -d ' ,}') + if [ -n "$old_gas" ] && [ "$gas_used" -gt "$old_gas" ]; then + increased_tests+=("$test_name (Old: $old_gas, New: $gas_used)") + increased_gas=true + fi + echo " \"$test_name\": $gas_used," >> new_gas_report.json + done <<< "$gas_data" + + echo "{" > gas_report.json + sed '$ s/,$//' new_gas_report.json >> gas_report.json + echo "}" >> gas_report.json + rm new_gas_report.json + + if [ "$increased_gas" = true ]; then + echo "Gas usage has increased in the following tests:" + printf '%s\n' "${increased_tests[@]}" + echo "PR check failed." + exit 1 + else + echo "Gas usage has not increased. PR check passed." + exit 0 + fi +} + +generate_gas_report \ No newline at end of file