diff --git a/src/bin_snoop/commands.ml b/src/bin_snoop/commands.ml index 8717d3b76956747f6adf73d8c4ee93c5afed8eba..190b485d10f22e298d1f347baf9d0daceabfbde9 100644 --- a/src/bin_snoop/commands.ml +++ b/src/bin_snoop/commands.ml @@ -1473,12 +1473,14 @@ module Display_info_cmd = struct let pp_models () = Format.pp_print_list pp_model_bench let pp_fancy_benchmark fmt (module B : Benchmark.S) = + let purpose = + match B.purpose with + | Generate_code x -> Format.sprintf "Generate code to %s" x + | Other_purpose x -> x + in bold_block fmt "Name" Namespace.pp B.name ; bold_block fmt "Filename" Format.pp_print_string B.module_filename ; - bold_block fmt "Generated code destination" Format.pp_print_string - @@ Option.value - ~default:"Destination not specified" - B.generated_code_destination ; + bold_block fmt "Purpose" Format.pp_print_string purpose ; bold_block fmt "Info" Format.pp_print_string B.info ; bold_block fmt "Tags" pp_tags B.tags ; bold_block fmt "Models" (pp_models ()) B.models diff --git a/src/lib_benchmark/benchmark.ml b/src/lib_benchmark/benchmark.ml index 8be47161248cffd8a11fb648c699da3246cdd453..b3181d34eb6f9e4a30f93e2d482bbf3698db049e 100644 --- a/src/lib_benchmark/benchmark.ml +++ b/src/lib_benchmark/benchmark.ml @@ -27,6 +27,13 @@ type group = Standalone | Group of string | Generic type 'config parameters = {bench_number : int; config : 'config} +type purpose = Other_purpose of string | Generate_code of string + +let pp_purpose ppf t = + match t with + | Other_purpose s -> Format.fprintf ppf "Other purpose: %s" s + | Generate_code s -> Format.fprintf ppf "Generate code: %s" s + (* The module type of benchmarks *) module type S = sig val name : Namespace.t @@ -35,7 +42,11 @@ module type S = sig val module_filename : string - val generated_code_destination : string option + (** Described the purpose of the benchmark. + * [Generate_code of destination]: generates code at the given [destination] file. + * [Other_purpose of purpose]: any other purpose. The goal is to explain why the function is benchmarked since it does not produce a cost function. + *) + val purpose : purpose val tags : string list @@ -62,10 +73,6 @@ let pp ppf (module Bench : S) = let open Bench in let open Format in let f fmt = fprintf ppf fmt in - let pp_option f ppf = function - | None -> pp_print_string ppf "None" - | Some x -> fprintf ppf "Some@ (@[%a@])" f x - in let pp_config fmt config = Data_encoding.Json.pp fmt @@ Data_encoding.Json.construct config_encoding config @@ -74,10 +81,7 @@ let pp ppf (module Bench : S) = f "name: %a@;" Namespace.pp name ; f "info: %s@;" info ; f "module_filename: %s@;" module_filename ; - f - "generated_code_destination: %a@;" - (pp_option pp_print_string) - generated_code_destination ; + f "purpose: %a@;" pp_purpose purpose ; f "tags: [%a]@;" (pp_print_list ~pp_sep:(fun ppf () -> fprintf ppf "; ") pp_print_string) diff --git a/src/lib_benchmark/benchmark.mli b/src/lib_benchmark/benchmark.mli index e75f488ab7ba70dccfb1cc21a5cedc229fd5c514..f325fa2e31af0d8101911b2ec2e6c01b7942ab0b 100644 --- a/src/lib_benchmark/benchmark.mli +++ b/src/lib_benchmark/benchmark.mli @@ -37,6 +37,12 @@ * [Generic]: for generic parameters only. *) type group = Standalone | Group of string | Generic +(** Described the purpose of the benchmark. + * [Generate_code of destination]: generates code at the given [destination] file. + * [Other_purpose of purpose]: any other purpose. The goal is to explain why the function is benchmarked since it does not produce a cost function. + *) +type purpose = Other_purpose of string | Generate_code of string + (** Benchmark parameters. *) type 'config parameters = {bench_number : int; config : 'config} @@ -51,8 +57,8 @@ module type S = sig (** File where the benchmark module is defined *) val module_filename : string - (** Destination of generated code *) - val generated_code_destination : string option + (** Purpose of the benchmark *) + val purpose : purpose (** Tags of the benchmark *) val tags : string list diff --git a/src/lib_benchmark/builtin_benchmarks.ml b/src/lib_benchmark/builtin_benchmarks.ml index 3edfb0ce548607fa74f81c7e15e402d6a145526d..0205d91acbc12257bd6ebfe31c9cad528420e374 100644 --- a/src/lib_benchmark/builtin_benchmarks.ml +++ b/src/lib_benchmark/builtin_benchmarks.ml @@ -42,7 +42,11 @@ module Timer_latency_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Measuring the time spent to query the system for the current time. \ + Indeed, it needs to be deducted from the total benchmark time of a \ + function." let tags = ["misc"; "builtin"] diff --git a/src/lib_benchmark/example/blake2b.ml b/src/lib_benchmark/example/blake2b.ml index 5d969c8c737ae2896e9ed6b13cd9d9ec851b9565..476fc5e70fc0e887d3b972f5544d0e2b29a9779f 100644 --- a/src/lib_benchmark/example/blake2b.ml +++ b/src/lib_benchmark/example/blake2b.ml @@ -50,7 +50,7 @@ module Blake2b_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose info let tags = ["example"] diff --git a/src/lib_benchmark/test/test_probe.ml b/src/lib_benchmark/test/test_probe.ml index 6d4ab56ba67418a90ff8399cebc8ccc0f6c44c1b..a9be812dad967f2bff5453e50095515e440b933a 100644 --- a/src/lib_benchmark/test/test_probe.ml +++ b/src/lib_benchmark/test/test_probe.ml @@ -59,7 +59,10 @@ module Probing_bench = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Checks that benchmarks with a probe succeed. Actual measure results are \ + discarded, so there is no need for a complexity model." (* The encoding is used by `tezos-snoop` to load the config from json files. *) diff --git a/src/lib_shell_benchmarks/benchmarks_shell.ml b/src/lib_shell_benchmarks/benchmarks_shell.ml index 0ad2cb918c8ec0c9cc8652e3206f64cccb2957f7..9acfb169276bc7ece2ef06ba51e6d5084d31e02d 100644 --- a/src/lib_shell_benchmarks/benchmarks_shell.ml +++ b/src/lib_shell_benchmarks/benchmarks_shell.ml @@ -27,6 +27,10 @@ module Benchmark_base = Benchmark module Benchmark = struct type group = Benchmark.group = Standalone | Group of string | Generic + type purpose = Benchmark_base.purpose = + | Other_purpose of string + | Generate_code of string + module type S = sig val name : Namespace.t @@ -34,7 +38,7 @@ module Benchmark = struct val module_filename : string - val generated_code_destination : string option + val purpose : Benchmark.purpose val group : group diff --git a/src/lib_shell_benchmarks/benchmarks_shell.mli b/src/lib_shell_benchmarks/benchmarks_shell.mli index fd527dc8c8d3f1d213f6f58061cb6a2fc1ab07bd..ce9d36636b5714afaa885a12c9cb4b1032b4e3dd 100644 --- a/src/lib_shell_benchmarks/benchmarks_shell.mli +++ b/src/lib_shell_benchmarks/benchmarks_shell.mli @@ -28,6 +28,10 @@ module Benchmark_base = Benchmark module Benchmark : sig type group = Benchmark.group = Standalone | Group of string | Generic + type purpose = Benchmark_base.purpose = + | Other_purpose of string + | Generate_code of string + (** The module type of benchmarks, a simplification of {!Benchmark.S} used by [registration_simple] below. *) module type S = sig @@ -40,10 +44,8 @@ module Benchmark : sig (** Filename of the benchmark module *) val module_filename : string - (** Generated code file location. - It is optional in case some benchmarks don't output code, but are used - for verification purposes. *) - val generated_code_destination : string option + (** Purpose of the benchmark. *) + val purpose : Benchmark.purpose (** Inference group of the benchmark *) val group : group diff --git a/src/lib_shell_benchmarks/bloomer_benchmarks.ml b/src/lib_shell_benchmarks/bloomer_benchmarks.ml index 97cdcf8eff6c9d2000fdea1a045fcdefb9d9224f..b5906271cfa89847dabfa943abf406224c01c565 100644 --- a/src/lib_shell_benchmarks/bloomer_benchmarks.ml +++ b/src/lib_shell_benchmarks/bloomer_benchmarks.ml @@ -44,7 +44,9 @@ let make_bench ~name ~info ~model ~generator ~make_bench : Benchmark.t = let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Measuring the cost of bloom filter. Not used in the protocol." let config_encoding = Data_encoding.unit diff --git a/src/lib_shell_benchmarks/encoding_benchmarks.ml b/src/lib_shell_benchmarks/encoding_benchmarks.ml index 68f0804ababe00c37600e1050cbfbf0c584ebd80..4579be232e327b6c51dd39359e1b7ae454edb090 100644 --- a/src/lib_shell_benchmarks/encoding_benchmarks.ml +++ b/src/lib_shell_benchmarks/encoding_benchmarks.ml @@ -28,7 +28,9 @@ open Benchmarks_shell open Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" end) (* ------------------------------------------------------------------------- *) diff --git a/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml b/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml index 7cda1644e7c59ed284ef759f338f71660a604620..d000e3cf9c239b654d1a3c21ae60315601a60da2 100644 --- a/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml +++ b/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml @@ -62,7 +62,7 @@ end module Make (Info : sig val file : string - val generated_code_destination : string option + val purpose : Benchmark.purpose end) = struct (* Generic function to cook benchmarks for fixed-size encodings *) @@ -88,7 +88,7 @@ struct let module_filename = Info.file - let generated_code_destination = Info.generated_code_destination + let purpose = Info.purpose let tags = ["encoding"] @@ -119,7 +119,7 @@ struct let module_filename = Info.file - let generated_code_destination = Info.generated_code_destination + let purpose = Info.purpose let tags = ["encoding"] @@ -151,7 +151,7 @@ struct let module_filename = Info.file - let generated_code_destination = Info.generated_code_destination + let purpose = Info.purpose let tags = ["encoding"] @@ -171,7 +171,7 @@ struct let module_filename = Info.file - let generated_code_destination = Info.generated_code_destination + let purpose = Info.purpose let tags = ["encoding"] diff --git a/src/lib_shell_benchmarks/io_benchmarks.ml b/src/lib_shell_benchmarks/io_benchmarks.ml index e95584247a0db6f0aa6949b92b554e36e649593c..aaf788be99dc78778448185ac61b38b1ca98bb3e 100644 --- a/src/lib_shell_benchmarks/io_benchmarks.ml +++ b/src/lib_shell_benchmarks/io_benchmarks.ml @@ -28,6 +28,9 @@ module Context = Tezos_protocol_environment.Context module Shell_monad = Tezos_error_monad.Error_monad module Key_map = Io_helpers.Key_map +let purpose = + Benchmark.Other_purpose "Measuring the time to access context file system" + let ns = Namespace.make Shell_namespace.ns "io" let fv s = Free_variable.of_namespace (ns s) @@ -266,7 +269,7 @@ module Context_size_dependent_read_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = purpose include Context_size_dependent_shared @@ -354,7 +357,7 @@ module Context_size_dependent_write_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = purpose let tags = ["io"] @@ -575,7 +578,7 @@ module Irmin_pack_read_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = purpose let tags = ["io"] @@ -743,7 +746,7 @@ module Irmin_pack_write_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = purpose let tags = ["io"] @@ -906,7 +909,7 @@ module Read_random_key_bench : Benchmark_base.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = purpose let tags = ["io"] @@ -1053,7 +1056,7 @@ module Write_random_keys_bench : Benchmark_base.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = purpose let tags = ["io"] diff --git a/src/lib_shell_benchmarks/micheline_benchmarks.ml b/src/lib_shell_benchmarks/micheline_benchmarks.ml index 61b875105f27455dd4b453fa22d9ee6f4c36786b..7d37b394112adc0bcd0ded7f7f8837fd36700582 100644 --- a/src/lib_shell_benchmarks/micheline_benchmarks.ml +++ b/src/lib_shell_benchmarks/micheline_benchmarks.ml @@ -135,7 +135,9 @@ module Micheline_strip_locations : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/script_repr_costs_generated.ml" let tags = ["micheline"] diff --git a/src/lib_shell_benchmarks/misc_benchmarks.ml b/src/lib_shell_benchmarks/misc_benchmarks.ml index 50a57d06d2c8775e33d1f4b7320370ae306613d4..5a73256f4833a3e9471400268a3467636131c1ba 100644 --- a/src/lib_shell_benchmarks/misc_benchmarks.ml +++ b/src/lib_shell_benchmarks/misc_benchmarks.ml @@ -49,7 +49,12 @@ module Lwt_main_run_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Measuring the time spent to trigger a Lwt process. Indeed, several \ + benchmarks rely on Lwt to run the benchmarked function. The cost of \ + calling Lwt_main.run needs to be deducted from the total benchmark time \ + of the function." let tags = ["misc"] diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/cache_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/cache_benchmarks.ml index be05760b2fc2daae01f03ec09263e8bdf53dd893..1e164970724731204c1dd0da0d88318df4e49e2b 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/cache_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/cache_benchmarks.ml @@ -135,7 +135,7 @@ module Cache_update_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" (** It is expected that cache keys are non-adversarial, ie do not share a long common prefix. This is the case for [Script_cache], diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/carbonated_map_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/carbonated_map_benchmarks.ml index 5ccfedba21076d8279c0d104d9212aecec26a05d..2ecad7c92d5535506e591ef2ced1f02cef9d0dbb 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/carbonated_map_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/carbonated_map_benchmarks.ml @@ -88,7 +88,7 @@ module Fold_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let fold_model = Model.make @@ -176,7 +176,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = [ @@ -216,7 +216,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" (** Given the cost of comparing keys, the model is used for deducing [intercept] @@ -320,7 +320,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = [ diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/encodings_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/encodings_benchmarks.ml index 1792d7d1a08d4ffcc07751355341bee8c7511379..67d3d20ebf2c1a6dd88c59601a9a971cce4fcc33 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/encodings_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/encodings_benchmarks.ml @@ -131,7 +131,7 @@ module Encoding_micheline : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let micheline_serialization_trace (micheline_node : Alpha_context.Script.node) = @@ -201,7 +201,7 @@ module Decoding_micheline : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let micheline_deserialization_trace (micheline_str : string) = match @@ -269,7 +269,7 @@ module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" end) module Timestamp = struct diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/global_constants_storage_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/global_constants_storage_benchmarks.ml index 39318450640ae96d8865ef3ddeb6d09e05bf824f..f37ad0d345cbd992ba7b51ccee61a9420dba67a2 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/global_constants_storage_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/global_constants_storage_benchmarks.ml @@ -298,7 +298,7 @@ module Set_add : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -355,7 +355,7 @@ module Set_elements : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -414,7 +414,7 @@ module Script_expr_hash_of_b58check_opt : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -490,7 +490,7 @@ struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -577,7 +577,7 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -655,7 +655,7 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/interpreter_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/interpreter_benchmarks.ml index 487f2dbaf1f625107858a20342bca0d3ddc40509..0da441dc09e89203463c656157c864a8288ce5aa 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/interpreter_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/interpreter_benchmarks.ml @@ -262,7 +262,7 @@ let make_benchmark : let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = (* [intercept = true] implies there's a benchmark with [intercept = false]. @@ -547,7 +547,7 @@ let make_continuation_benchmark : let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = tags @ more_tags @@ -656,7 +656,7 @@ module Registration_section = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = [Tags.interpreter] @@ -2709,7 +2709,7 @@ module Registration_section = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" include Default_config include Default_boilerplate diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/sapling_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/sapling_benchmarks.ml index 0cdb5406d52d064c25391da3304468493eb0c284..b6fd15661ef654475bf4ab4b20f6abf1624e43ef 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/sapling_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/sapling_benchmarks.ml @@ -40,7 +40,7 @@ module Apply_diff_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["sapling"] diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/sc_rollup_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/sc_rollup_benchmarks.ml index 7d153ba36fabfb13f126bd027e3094f203dfb16c..aa312cd1dec61f2b3bc174f33e95ce3520989510 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/sc_rollup_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/sc_rollup_benchmarks.ml @@ -290,7 +290,7 @@ module Sc_rollup_verify_output_proof_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["sc_rollup"] @@ -509,7 +509,7 @@ module Sc_rollup_deserialize_output_proof_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["sc_rollup"] diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/script_repr_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/script_repr_benchmarks.ml index 7399064deba453528969f862101f9097833f697f..5f3daa0bb73c1dccbd4c6ecd6668c8a87b399115 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/script_repr_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/script_repr_benchmarks.ml @@ -82,7 +82,7 @@ module Micheline_nodes_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let size_based_model = Model.make @@ -130,7 +130,7 @@ module Script_repr_strip_annotations : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let strip_annotations_model = Model.( diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml index 2f98ce0eeabb55b412dbc765558cf22cf287605e..d8098e19b419a1a084eb79c9e5f139eac25d8b7c 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml @@ -79,7 +79,7 @@ end = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let value_size_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = @@ -154,7 +154,7 @@ module Type_size_benchmark : Tezos_benchmark.Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = [(model_name, size_based_model (Namespace.basename name))] @@ -200,7 +200,7 @@ end = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let kinstr_size_benchmark rng_state (expr : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -281,7 +281,7 @@ module Node_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let size_based_model = Model.make diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/skip_list_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/skip_list_benchmarks.ml index af4ac9ce70f093e59ad721a0d37c4c59dc19bdd4..914a5be8cbdc3cec4facbfa3dbd2ff067a5d49a0 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/skip_list_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/skip_list_benchmarks.ml @@ -47,7 +47,7 @@ module Next : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["skip_list"] @@ -103,7 +103,7 @@ module Hash_cell = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["skip_list"] diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/storage_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/storage_benchmarks.ml index 8b0531848ce24b6b2f27f197c97720036a8b0b2a..f2f0ca91317f2fa97e433a38918ea2c40cdae9b2 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/storage_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/storage_benchmarks.ml @@ -147,7 +147,7 @@ module List_key_values_benchmark_boilerplate = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let config_encoding = let open Data_encoding in diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/ticket_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/ticket_benchmarks.ml index 908f6eff1289aab4f42b0257be71a923e665ac03..bafa93da8893d576a0fa31ab2bee9d3a11c6e746 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/ticket_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/ticket_benchmarks.ml @@ -83,7 +83,7 @@ module Compare_ticket_hash_benchmark : Benchmark.S = struct let info = "Compare cost for Ticket_hash" - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let module_filename = __FILE__ @@ -145,7 +145,7 @@ module Compare_key_contract_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let compare_model = Model.make @@ -212,7 +212,7 @@ module Has_tickets_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench_helper rng_state config () = let open Result_syntax in @@ -279,7 +279,7 @@ module Collect_tickets_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench_helper rng_state config () = let open Script_typed_ir in diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/translator_benchmarks.ml index 6ba2ab1e1afed69f31c7bb3b488c595ba55d91d8..661d4c8f9be63b55f7a859e0ec4429ce8ae208e5 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/translator_benchmarks.ml @@ -197,7 +197,7 @@ module Typechecking_data : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let typechecking_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = @@ -273,7 +273,7 @@ module Unparsing_data : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let unparsing_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Protocol.Script_repr.expr) = @@ -356,7 +356,7 @@ module Typechecking_code : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let typechecking_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -436,7 +436,7 @@ module Unparsing_code : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let unparsing_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -521,7 +521,7 @@ let check_printable_benchmark = let open Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" end) in linear_shared ~name:"CHECK_PRINTABLE" @@ -573,7 +573,7 @@ module Ty_eq : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = [Tags.translator] @@ -733,7 +733,7 @@ module Parse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> @@ -789,7 +789,7 @@ module Unparse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> diff --git a/src/proto_016_PtMumbai/lib_benchmarks_proto/tx_rollup_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/tx_rollup_benchmarks.ml index db0e4f6beb0875a9897816e97f76c8420e68d64c..f4c3460f67fc2fda0a76de9f3097b7fd6f82bb87 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/tx_rollup_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/tx_rollup_benchmarks.ml @@ -36,7 +36,7 @@ module Inbox_add_message : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["tx_rollup"; "merkle"; "inbox"; "add_message"] @@ -122,7 +122,7 @@ module Commitment_full_compact_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["tx_rollup"; "merkle"; "commitment"; "compact"] @@ -555,7 +555,7 @@ module Verify_proof_compute_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["tx_rollup"; "merkle"; "verify"; "proof"] diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/apply_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/apply_benchmarks.ml index 5aa82f42132ac1436fc0c6e9421e1b726f8c8bcf..9885103220d161ff91981de95666599d759d6ddb 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/apply_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/apply_benchmarks.ml @@ -64,7 +64,7 @@ module Take_fees_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["apply"] diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/benchmarks_proto.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/benchmarks_proto.ml index ffde3a4612f616dc013502c2b91b5e802ecfd120..5832bbf2675bf3f34fffbdf3d19f67bf604dc836 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/benchmarks_proto.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/benchmarks_proto.ml @@ -65,13 +65,8 @@ module Registration = struct let module B : Benchmark_base.S = struct include Bench - let generated_code_destination = - Option.map - (fun destination -> - Filename.concat - "src/proto_alpha/lib_protocol" - (destination ^ "_costs_generated.ml")) - Bench.generated_code_destination + let purpose = + Benchmark_base.Other_purpose "No longer used to generate code" let models = [(Namespace.(cons name "model" |> to_string), Bench.model ~name)] diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/cache_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/cache_benchmarks.ml index be05760b2fc2daae01f03ec09263e8bdf53dd893..1e164970724731204c1dd0da0d88318df4e49e2b 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/cache_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/cache_benchmarks.ml @@ -135,7 +135,7 @@ module Cache_update_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" (** It is expected that cache keys are non-adversarial, ie do not share a long common prefix. This is the case for [Script_cache], diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/carbonated_map_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/carbonated_map_benchmarks.ml index f1862d9c4106d3d334487e364fa25fa4c723af35..8e4e78fced6679f8804792dfbe7082d553d26c8e 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/carbonated_map_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/carbonated_map_benchmarks.ml @@ -47,7 +47,7 @@ module Config_and_workload = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["carbonated_map"] @@ -167,7 +167,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = [ @@ -308,7 +308,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = [ diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/encodings_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/encodings_benchmarks.ml index a879665d568f6f55f3805c96f6c60177ff93772e..228b36df60086d2293d0db8edbf54d76f8279f43 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/encodings_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/encodings_benchmarks.ml @@ -29,7 +29,7 @@ module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" end) module Size = Gas_input_size @@ -139,7 +139,7 @@ module Encoding_micheline : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let micheline_serialization_trace (micheline_node : Alpha_context.Script.node) = @@ -209,7 +209,7 @@ module Decoding_micheline : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let micheline_deserialization_trace (micheline_str : string) = match diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/global_constants_storage_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/global_constants_storage_benchmarks.ml index b3f4f8ad651072e828100cb47d2f89bbceef9234..1761cb6f929b5ada81709f323edb90e01a27a13d 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/global_constants_storage_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/global_constants_storage_benchmarks.ml @@ -298,7 +298,7 @@ module Set_add : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -353,7 +353,7 @@ module Set_elements : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -410,7 +410,7 @@ module Script_expr_hash_of_b58check_opt : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -482,7 +482,7 @@ struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -566,7 +566,7 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] @@ -641,7 +641,7 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["global_constants"] diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/interpreter_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/interpreter_benchmarks.ml index dcbd5a798a229a24fc12a7a9cfb40953d742c44b..6e8c69ee6e18d816bdfca688c8ea4024720fc639 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/interpreter_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/interpreter_benchmarks.ml @@ -274,7 +274,7 @@ let make_benchmark : let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let benchmark kinstr_and_stack_sampler ctxt step_constants () = let stack_instr = kinstr_and_stack_sampler () in @@ -558,7 +558,7 @@ let make_continuation_benchmark : let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let benchmark cont_and_stack_sampler ctxt step_constants () = let stack_instr = cont_and_stack_sampler () in @@ -657,7 +657,7 @@ module Registration_section = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = [Tags.interpreter] @@ -2730,7 +2730,7 @@ module Registration_section = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" include Default_config include Default_boilerplate diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/sapling_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/sapling_benchmarks.ml index 0cdb5406d52d064c25391da3304468493eb0c284..b6fd15661ef654475bf4ab4b20f6abf1624e43ef 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/sapling_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/sapling_benchmarks.ml @@ -40,7 +40,7 @@ module Apply_diff_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["sapling"] diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/sc_rollup_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/sc_rollup_benchmarks.ml index 2090e007307c12fce1952ce55ae6117191c7eba4..ea6e27dfb0196cdadfbd59a9699ae8b265e7ed2a 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/sc_rollup_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/sc_rollup_benchmarks.ml @@ -290,7 +290,7 @@ module Sc_rollup_verify_output_proof_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["sc_rollup"] @@ -509,7 +509,7 @@ module Sc_rollup_deserialize_output_proof_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = ["sc_rollup"] diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/script_repr_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/script_repr_benchmarks.ml index 0c57d0d9b5233c6c8fa5473ac2a74ba7bafd96ff..f82f40eb22f03bf2349c68f6b94b476f1249c07b 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/script_repr_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/script_repr_benchmarks.ml @@ -82,7 +82,7 @@ module Micheline_nodes_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let size_based_model = Model.make @@ -125,7 +125,7 @@ module Script_repr_strip_annotations : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let strip_annotations_model = Model.( diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml index e97011b1ffd828f2cf47651666307d8ecae84048..d0acf7e144468779ffe4dc78012167dffe6de308 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml @@ -79,7 +79,7 @@ end = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let value_size_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = @@ -154,7 +154,7 @@ module Type_size_benchmark : Tezos_benchmark.Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let models = [(model_name, size_based_model (Namespace.basename name))] @@ -200,7 +200,7 @@ end = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let kinstr_size_benchmark rng_state (expr : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -281,7 +281,7 @@ module Node_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let size_based_model = Model.make diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/storage_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/storage_benchmarks.ml index b1fb282687fef4cf5e17f43f70e32d839b4e6d58..9b8faa0aa75118d3b077bcf18fee424e247f4384 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/storage_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/storage_benchmarks.ml @@ -183,7 +183,7 @@ module List_key_values_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let benchmark rng_state {max_size} () = let wrap m = m >|= Environment.wrap_tzresult in @@ -225,7 +225,7 @@ module List_key_values_benchmark_intercept = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let benchmark _rng_state _config () = let ctxt = diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/ticket_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/ticket_benchmarks.ml index 7fc129dacae02b712e7e5a52b13d589b5ee61a8a..46a90819a046c3cc8a411706383eaafa10fed5a5 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/ticket_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/ticket_benchmarks.ml @@ -85,7 +85,7 @@ module Compare_ticket_hash_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let compare_model = Model.make @@ -140,7 +140,7 @@ module Compare_key_contract_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let compare_model = Model.make @@ -202,7 +202,7 @@ module Has_tickets_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench_helper rng_state config () = let open Result_syntax in @@ -259,7 +259,7 @@ module Collect_tickets_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench_helper rng_state config () = let open Script_typed_ir in diff --git a/src/proto_017_PtNairob/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_017_PtNairob/lib_benchmarks_proto/translator_benchmarks.ml index a1bd650460b82d80e84cb2db205c0e95844ff9c2..3592357a145db375f2602c6cda27a4e56831550e 100644 --- a/src/proto_017_PtNairob/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_017_PtNairob/lib_benchmarks_proto/translator_benchmarks.ml @@ -29,7 +29,7 @@ module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" end) module Size = Gas_input_size @@ -205,7 +205,7 @@ module Typechecking_data : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let typechecking_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = @@ -281,7 +281,7 @@ module Unparsing_data : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let unparsing_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Protocol.Script_repr.expr) = @@ -364,7 +364,7 @@ module Typechecking_code : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let typechecking_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -444,7 +444,7 @@ module Unparsing_code : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let unparsing_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -577,7 +577,7 @@ module Ty_eq : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let tags = [Tags.translator] @@ -726,7 +726,7 @@ module Parse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> @@ -782,7 +782,7 @@ module Unparse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Other_purpose "No longer used to generate code" let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> diff --git a/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml index ee1e60d9940f6a11db548234247a6b0d77223eba..aaa4af28f75b717bf3f3ccab82d5aa03e51324a8 100644 --- a/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml @@ -69,7 +69,8 @@ module Take_fees_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose "Measuring the time spent for Apply.take_fees" let group = Benchmark.Standalone diff --git a/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml b/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml index 50b2f57afeed5f5bb59a98a49bc6212e16713398..6d8f442efa113364cce9b6c49ae7fbc75531db30 100644 --- a/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml +++ b/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml @@ -29,6 +29,10 @@ module Benchmark_base = Benchmark module Benchmark = struct type group = Benchmark_base.group = Standalone | Group of string | Generic + type purpose = Benchmark_base.purpose = + | Other_purpose of string + | Generate_code of string + module type S = sig val name : Namespace.t @@ -36,8 +40,6 @@ module Benchmark = struct val module_filename : string - val generated_code_destination : string option - val group : group val tags : string list @@ -56,6 +58,8 @@ module Benchmark = struct val model : name:Namespace.t -> workload Model.t + val purpose : Benchmark_base.purpose + val create_benchmark : rng_state:Random.State.t -> config -> workload Generator.benchmark end @@ -70,13 +74,14 @@ module Registration = struct let module B : Benchmark_base.S = struct include Bench - let generated_code_destination = - Option.map - (fun destination -> - Filename.concat - "src/proto_alpha/lib_protocol" - (destination ^ "_costs_generated.ml")) - Bench.generated_code_destination + let purpose = + match Bench.purpose with + | Generate_code s -> + Benchmark.Generate_code + (Filename.concat + "src/proto_alpha/lib_protocol" + (s ^ "_costs_generated.ml")) + | Other_purpose _ as x -> x let models = [ @@ -91,7 +96,7 @@ module Registration = struct List.repeat bench_num (fun () -> Bench.create_benchmark ~rng_state config) end in - Registration_helpers.register (module B) + Registration_helpers.register (module B : Benchmark_base.S) end module Model = struct diff --git a/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.mli b/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.mli index 9d57ffb7429f64c3994b68cef908c03abc026c3e..939e8dc3f0d1754960331a17299abf6d4934ecb7 100644 --- a/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.mli +++ b/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.mli @@ -31,6 +31,13 @@ module Benchmark : sig (** The module type of benchmarks, a simplification of {!Benchmark.S} used by [Registration.register] below. *) + type purpose = Benchmark_base.purpose = + | Other_purpose of string + | Generate_code of string + + (** The module type of benchmarks, a simplification of {!Benchmark.S} used by + [registration_simple] below. *) + module type S = sig (** Name of the benchmark *) val name : Namespace.t @@ -41,14 +48,6 @@ module Benchmark : sig (** Filename of the benchmark module *) val module_filename : string - (** Generated code file location, automatically prefix by - "src/proto_alpha/lib_protocol/" - and suffixed by - "_costs_generated.ml". - It is optional in case some benchmarks don't output code, but are used - for verification purposes. *) - val generated_code_destination : string option - (** Inference group of the benchmark *) val group : group @@ -76,6 +75,13 @@ module Benchmark : sig (** Cost model *) val model : name:Namespace.t -> workload Model.t + (** benchmark purpose, automatically prefix by + "src/proto_alpha/lib_protocol/" + and suffixed by + "_costs_generated.ml" when [Generate_code of location] is used. + Otherwise, the developer can submit an explanation as to what the benchmark is for with [Other_purpose of string]. *) + val purpose : Benchmark_base.purpose + (** Creates a benchmark, ready to be run. The benchmarks are thunked to prevent evaluating the workload until needed. *) diff --git a/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml index c6251acd926fc67f00ad5a9f0a84cecd5fb4b0e8..60ec54073c0f46bd3c551e6414460664bf6b5a64 100644 --- a/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml @@ -137,10 +137,10 @@ module Cache_update_benchmark : Benchmarks_proto.Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None - let group = Benchmark.Standalone + let purpose = Benchmark.Generate_code "cache_repr" + (** It is expected that cache keys are non-adversarial, ie do not share a long common prefix. This is the case for [Script_cache], for which the keys are B58-encoded contract hashes. diff --git a/src/proto_alpha/lib_benchmarks_proto/carbonated_map_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/carbonated_map_benchmarks.ml index bcfc855f149b1696e80bf7f928c34f54e89e2dba..4fd7667fd73a1c090132bcc75aa16ac4967c07e7 100644 --- a/src/proto_alpha/lib_benchmarks_proto/carbonated_map_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/carbonated_map_benchmarks.ml @@ -51,7 +51,7 @@ module Config_and_workload = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "carbonated_map" let tags = ["carbonated_map"] @@ -167,7 +167,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "carbonated_map" let group = group @@ -296,7 +296,7 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "carbonated_map" let group = group diff --git a/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml index fde7ca76dab55d33b01dbf50c3974bf3ffdecbb8..7fd7c348119e7c96929e894d04882df04aa4a418 100644 --- a/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml @@ -29,7 +29,9 @@ module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" end) module Size = Gas_input_size @@ -139,7 +141,9 @@ module Encoding_micheline : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/script_repr_costs_generated.ml" let micheline_serialization_trace (micheline_node : Alpha_context.Script.node) = @@ -209,7 +213,9 @@ module Decoding_micheline : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/script_repr_costs_generated.ml" let micheline_deserialization_trace (micheline_str : string) = match diff --git a/src/proto_alpha/lib_benchmarks_proto/global_constants_storage_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/global_constants_storage_benchmarks.ml index 22731fcfeded48d13e86662f34a0e0c14415c445..1f7fa4660540763afeac5cc84c28a773ce6b5470 100644 --- a/src/proto_alpha/lib_benchmarks_proto/global_constants_storage_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/global_constants_storage_benchmarks.ml @@ -299,7 +299,9 @@ module Set_add : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Validate assumptions about functions using Set.add." let group = Benchmark.Standalone @@ -346,7 +348,9 @@ module Set_elements : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Validate assumptions about functions using Set.elements." let group = Benchmark.Standalone @@ -395,7 +399,10 @@ module Script_expr_hash_of_b58check_opt : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Other_purpose + "Validate assumptions about functions using \ + Script_expr_hash.of_b58check_opt." let group = Benchmark.Standalone @@ -457,7 +464,7 @@ struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "global_constants" let group = Benchmark.Standalone @@ -533,7 +540,7 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "global_constants" let group = Benchmark.Standalone @@ -600,7 +607,7 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "global_constants" let group = Benchmark.Standalone diff --git a/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml index 844c79ef9ab6e0402f9a6eccbc699b359047b538..5b252633815f0aad25b508519836b56c9c6df1e7 100644 --- a/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml @@ -314,7 +314,9 @@ let make_benchmark : let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let benchmark kinstr_and_stack_sampler ctxt step_constants () = let stack_instr = kinstr_and_stack_sampler () in @@ -598,7 +600,9 @@ let make_continuation_benchmark : let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let benchmark cont_and_stack_sampler ctxt step_constants () = let stack_instr = cont_and_stack_sampler () in @@ -697,7 +701,9 @@ module Registration_section = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let tags = [Tags.interpreter] @@ -2860,7 +2866,9 @@ module Registration_section = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" include Default_config include Default_boilerplate diff --git a/src/proto_alpha/lib_benchmarks_proto/sapling_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/sapling_benchmarks.ml index 018cc096ed59224da485cda7e42b76ce44b03b55..c3421c23b0497cfc9097e3f8e8cc0ed6cb1409b1 100644 --- a/src/proto_alpha/lib_benchmarks_proto/sapling_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/sapling_benchmarks.ml @@ -40,7 +40,9 @@ module Apply_diff_bench : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let tags = ["sapling"] diff --git a/src/proto_alpha/lib_benchmarks_proto/sc_rollup_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/sc_rollup_benchmarks.ml index f4834fa3ebaa9e8007bd12848ab8e2654764e163..61fdc2a5d5333e7144d88dbe1163471b6e31dd80 100644 --- a/src/proto_alpha/lib_benchmarks_proto/sc_rollup_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/sc_rollup_benchmarks.ml @@ -291,7 +291,7 @@ module Sc_rollup_verify_output_proof_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "sc_rollup" let group = Benchmarks_proto.Benchmark.Standalone @@ -505,7 +505,7 @@ module Sc_rollup_deserialize_output_proof_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "sc_rollup" let group = Benchmark.Standalone @@ -655,7 +655,7 @@ module Sc_rollup_install_boot_sector_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "sc_rollup" let tags = ["sc_rollup"] diff --git a/src/proto_alpha/lib_benchmarks_proto/script_repr_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/script_repr_benchmarks.ml index b6c7096438160633f3cea774725592737f8b25d3..cae47dd8dae775194f44e2ad4e657dec8fd90984 100644 --- a/src/proto_alpha/lib_benchmarks_proto/script_repr_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/script_repr_benchmarks.ml @@ -84,7 +84,7 @@ module Micheline_nodes_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "script_repr" let group = Benchmark.Group "size_translator_model" @@ -123,7 +123,7 @@ module Script_repr_strip_annotations : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "script_repr" let group = Benchmark.Group "strip_annotations_model" diff --git a/src/proto_alpha/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml index 1c9aca18bbfbb2f3e18e504649428c9d2dfe40a6..7cae791d97c53a95be4d69dca6f82161d33d76c2 100644 --- a/src/proto_alpha/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml @@ -75,9 +75,11 @@ module Value_size_benchmark : Tezos_benchmark.Benchmark.S = struct let info = "Benchmarking Script_typed_ir_size.value_size" - let module_filename = __FILE__ + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/script_typed_ir_size_costs_generated.ml" - let generated_code_destination = None + let module_filename = __FILE__ let value_size_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = @@ -152,7 +154,7 @@ module Type_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "script_typed_ir_size" let group = Benchmark.Group model_name @@ -193,7 +195,9 @@ module Kinstr_size_benchmark : Tezos_benchmark.Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/script_typed_ir_size_costs_generated.ml" let kinstr_size_benchmark rng_state (expr : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -274,7 +278,7 @@ module Node_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "script_typed_ir_size" let group = Benchmark.Group model_name diff --git a/src/proto_alpha/lib_benchmarks_proto/skip_list_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/skip_list_benchmarks.ml index c3d19f567b7c726d984e46b1b7fa625e09936127..8e16d971d2107be58ec2b246e6d009324ef2aa11 100644 --- a/src/proto_alpha/lib_benchmarks_proto/skip_list_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/skip_list_benchmarks.ml @@ -41,7 +41,7 @@ let fv s = Free_variable.of_namespace (ns s) (** Benchmark for the [Skip_list_repr.next] function. It is used for estimating the parameters for [Skip_list_cost_model.model_next]. *) module Next : Benchmark.S = struct - let generated_code_destination = Some "skip_list" + let purpose = Benchmark.Generate_code "skip_list" include Skip_list @@ -101,7 +101,7 @@ end [Skip_list_cost_model.model_hash_cell]. The model estimates hashing a skip_list cell content and all its back pointers. *) module Hash_cell : Benchmark.S = struct - let generated_code_destination = Some "skip_list" + let purpose = Benchmark.Generate_code "skip_list" let name = ns "hash_cell" diff --git a/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml index 386e254cb9f40a7c1e25db88549b9487cea0667d..392bfb500efaf45d1bffa9ac1bbeb4d4136393b4 100644 --- a/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml @@ -188,7 +188,7 @@ module List_key_values_benchmark = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "storage" let create_benchmark ~rng_state {max_size} = let wrap m = m >|= Environment.wrap_tzresult in @@ -227,7 +227,7 @@ module List_key_values_benchmark_intercept = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "storage" let create_benchmark ~rng_state:_ _config = let ctxt = diff --git a/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml index 188303905393f054ff1441af237676418d81fe31..b56aa4c456ee67c54d9e8f462e68dd131be92dc7 100644 --- a/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml @@ -87,7 +87,7 @@ module Compare_ticket_hash_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "ticket_costs" let group = Benchmark.Group "compare_tickets" @@ -139,7 +139,7 @@ module Compare_key_contract_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "ticket_costs" let group = Benchmark.Group "compare_tickets" @@ -198,7 +198,7 @@ module Has_tickets_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "ticket_costs" let group = Benchmark.Standalone @@ -245,7 +245,7 @@ module Collect_tickets_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "ticket_costs" let group = Benchmark.Standalone diff --git a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml index 353ae6ea17109e13ac171dc500753d0fd38b1e75..2a7541e417594a3ec3447e1f8c1aea6cb1b6ae64 100644 --- a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml @@ -30,7 +30,9 @@ module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" end) module Size = Gas_input_size @@ -206,7 +208,9 @@ module Typechecking_data : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let typechecking_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = @@ -282,7 +286,9 @@ module Unparsing_data : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let unparsing_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Protocol.Script_repr.expr) = @@ -365,7 +371,9 @@ module Typechecking_code : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let typechecking_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -445,7 +453,9 @@ module Unparsing_code : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = + Benchmark.Generate_code + "src/proto_alpha/lib_protocol/michelson_v1_gas_costs_generated.ml" let unparsing_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = @@ -580,7 +590,7 @@ module Ty_eq : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "michelson_v1_gas" let tags = [Tags.translator] @@ -722,7 +732,7 @@ module Parse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "michelson_v1_gas" let group = Benchmark.Group "size_translator_model" @@ -770,7 +780,7 @@ module Unparse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ - let generated_code_destination = None + let purpose = Benchmark.Generate_code "michelson_v1_gas" let group = Benchmark.Group "size_translator_model"