diff --git a/src/bin_snoop/commands.ml b/src/bin_snoop/commands.ml index de6d446c64d2388007ec424f1cfa2e4ca730606c..69041934eb5d17cb4d81e5041792882a2586e514 100644 --- a/src/bin_snoop/commands.ml +++ b/src/bin_snoop/commands.ml @@ -1413,6 +1413,10 @@ module Display_info_cmd = struct let pp_fancy_benchmark fmt (module B : Benchmark.S) = 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 "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 35f7bdac195615b40c085f88c2349f3992d20cff..ae7881b7977ef9de1150f32867743fcca0923fee 100644 --- a/src/lib_benchmark/benchmark.ml +++ b/src/lib_benchmark/benchmark.ml @@ -37,6 +37,9 @@ 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 + (** 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 7e9a11cfb93dafd5a761b260f434965cacafa147..3edfb0ce548607fa74f81c7e15e402d6a145526d 100644 --- a/src/lib_benchmark/builtin_benchmarks.ml +++ b/src/lib_benchmark/builtin_benchmarks.ml @@ -42,6 +42,8 @@ module Timer_latency_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["misc"; "builtin"] let models = [("*", Model.(make ~conv:(fun () -> ()) ~model:Model.zero))] diff --git a/src/lib_benchmark/example/blake2b.ml b/src/lib_benchmark/example/blake2b.ml index af1d77d6c884174895ff30c4d5ac194db68ef2fd..5d969c8c737ae2896e9ed6b13cd9d9ec851b9565 100644 --- a/src/lib_benchmark/example/blake2b.ml +++ b/src/lib_benchmark/example/blake2b.ml @@ -50,6 +50,8 @@ module Blake2b_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["example"] (* We will measure hashing time on random bytes with length diff --git a/src/lib_benchmark/test/test_probe.ml b/src/lib_benchmark/test/test_probe.ml index 80b4bb6650e0a9b268be6589001603548c910deb..7216bbda3ac912dc3aed46229c7a250cdb080cf1 100644 --- a/src/lib_benchmark/test/test_probe.ml +++ b/src/lib_benchmark/test/test_probe.ml @@ -59,6 +59,8 @@ module Probing_bench = struct let module_filename = __FILE__ + let generated_code_destination = None + (* The encoding is used by `tezos-snoop` to load the config from json files. *) let config_encoding = diff --git a/src/lib_shell_benchmarks/bloomer_benchmarks.ml b/src/lib_shell_benchmarks/bloomer_benchmarks.ml index 7d84c1f2069ee5f734b06b9dc49e72c766d37304..29fc3f065352e76c6dd9cc827d222177c292c3b8 100644 --- a/src/lib_shell_benchmarks/bloomer_benchmarks.ml +++ b/src/lib_shell_benchmarks/bloomer_benchmarks.ml @@ -44,6 +44,8 @@ let make_bench ~name ~info ~model ~generator ~make_bench : let module_filename = __FILE__ + let generated_code_destination = None + let config_encoding = Data_encoding.unit type workload = unit diff --git a/src/lib_shell_benchmarks/encoding_benchmarks.ml b/src/lib_shell_benchmarks/encoding_benchmarks.ml index 8666f696c3419c5c58e0997944ffb3c5fb5026ab..d3c091c2733d748ba975ebd63a11c794db3be090 100644 --- a/src/lib_shell_benchmarks/encoding_benchmarks.ml +++ b/src/lib_shell_benchmarks/encoding_benchmarks.ml @@ -27,6 +27,8 @@ open Benchmarks_shell open Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None end) (* ------------------------------------------------------------------------- *) diff --git a/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml b/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml index a0f74edd7ce4ff24ad8ae8fce4dcf72a3902b259..7cda1644e7c59ed284ef759f338f71660a604620 100644 --- a/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml +++ b/src/lib_shell_benchmarks/encoding_benchmarks_helpers.ml @@ -59,8 +59,10 @@ module Shared_linear = struct Sparse_vec.String.of_list [("bytes", float_of_int bytes)] end -module Make (Filename : sig +module Make (Info : sig val file : string + + val generated_code_destination : string option end) = struct (* Generic function to cook benchmarks for fixed-size encodings *) @@ -84,7 +86,9 @@ struct let info = Format.asprintf "Benchmarking %a" Namespace.pp name - let module_filename = Filename.file + let module_filename = Info.file + + let generated_code_destination = Info.generated_code_destination let tags = ["encoding"] @@ -113,7 +117,9 @@ struct let info = Format.asprintf "Benchmarking %a" Namespace.pp name - let module_filename = Filename.file + let module_filename = Info.file + + let generated_code_destination = Info.generated_code_destination let tags = ["encoding"] @@ -143,7 +149,9 @@ struct let info = Format.asprintf "Benchmarking %a" Namespace.pp name - let module_filename = Filename.file + let module_filename = Info.file + + let generated_code_destination = Info.generated_code_destination let tags = ["encoding"] @@ -161,7 +169,9 @@ struct let info = Format.asprintf "Benchmarking %a (intercept case)" Namespace.pp name - let module_filename = Filename.file + let module_filename = Info.file + + let generated_code_destination = Info.generated_code_destination let tags = ["encoding"] diff --git a/src/lib_shell_benchmarks/io_benchmarks.ml b/src/lib_shell_benchmarks/io_benchmarks.ml index d6af812df54253de3a6379c76b3e98db4f0c5c24..ba79f7301191fc9a4f2f8f8dd61c0fee266e870a 100644 --- a/src/lib_shell_benchmarks/io_benchmarks.ml +++ b/src/lib_shell_benchmarks/io_benchmarks.ml @@ -268,6 +268,8 @@ module Context_size_dependent_read_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + include Context_size_dependent_shared let make_bench rng_state cfg () = @@ -355,6 +357,8 @@ module Context_size_dependent_write_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["io"] let write_storage context key bytes = @@ -575,6 +579,8 @@ module Irmin_pack_read_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["io"] type workload = @@ -742,6 +748,8 @@ module Irmin_pack_write_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["io"] type workload = @@ -904,6 +912,8 @@ module Read_random_key_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["io"] type workload = Read_random_key of {depth : int; storage_bytes : int} @@ -1049,6 +1059,8 @@ module Write_random_keys_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["io"] type workload = diff --git a/src/lib_shell_benchmarks/micheline_benchmarks.ml b/src/lib_shell_benchmarks/micheline_benchmarks.ml index facc69a42af315bd830b15dab2afa661ef96a0f3..ba00a68958683a6566cfce3554c326f2ee299b9b 100644 --- a/src/lib_shell_benchmarks/micheline_benchmarks.ml +++ b/src/lib_shell_benchmarks/micheline_benchmarks.ml @@ -135,6 +135,8 @@ module Micheline_strip_locations : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["micheline"] type config = unit diff --git a/src/lib_shell_benchmarks/misc_benchmarks.ml b/src/lib_shell_benchmarks/misc_benchmarks.ml index 92db44d0ee13d2cdd4650f4af695c2a5f1f64758..6c6a15f78f4ebad0503a94f0726b670ca62ef8ad 100644 --- a/src/lib_shell_benchmarks/misc_benchmarks.ml +++ b/src/lib_shell_benchmarks/misc_benchmarks.ml @@ -48,6 +48,8 @@ module Lwt_main_run_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["misc"] let models = [("*", lwt_model)] diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/cache_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/cache_benchmarks.ml index 91c580f09c19beb5fddec052109ea3d810db35e6..ea9081f343023b42efbea91fd463b4b9324c20c7 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/cache_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/cache_benchmarks.ml @@ -133,6 +133,8 @@ module Cache_update_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + (** 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_015_PtLimaPt/lib_benchmarks_proto/carbonated_map_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/carbonated_map_benchmarks.ml index 8caf846bb0eccad4519c00f2d9fce065631bc7a9..08be32417e2e3f6514ab124d676915c4bdb47bb0 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/carbonated_map_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/carbonated_map_benchmarks.ml @@ -83,6 +83,8 @@ module Fold_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let fold_model = Model.make ~conv:(fun {size} -> (size, ())) @@ -173,6 +175,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [ ( "carbonated_map", @@ -215,6 +219,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + (** Given the cost of comparing keys, the model is used for deducing [intercept] and [traverse_overhead] from: @@ -320,6 +326,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [ ( "carbonated_map", diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/encodings_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/encodings_benchmarks.ml index fd8dcb25963b8685644e51c598fe17eeaaa5ba21..9fdca9f02851b31ac1d853a60036877f675326e6 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/encodings_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/encodings_benchmarks.ml @@ -137,6 +137,8 @@ module Encoding_micheline : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let micheline_serialization_trace (micheline_node : Alpha_context.Script.node) = match @@ -207,6 +209,8 @@ module Decoding_micheline : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let micheline_deserialization_trace (micheline_str : string) = match Data_encoding.Binary.of_string @@ -274,6 +278,8 @@ let () = Registration_helpers.register (module Decoding_micheline) module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None end) module Timestamp = struct diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/global_constants_storage_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/global_constants_storage_benchmarks.ml index 9410f13e0a6d310cb4f89c32caaaa44a7743915b..85f18beb0675f4c35caaf16cd0cace2a8bbe2b64 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/global_constants_storage_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/global_constants_storage_benchmarks.ml @@ -296,6 +296,8 @@ module Set_add : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -352,6 +354,8 @@ module Set_elements : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -411,6 +415,8 @@ module Script_expr_hash_of_b58check_opt : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -483,6 +489,8 @@ struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -569,6 +577,8 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -647,6 +657,8 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/interpreter_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/interpreter_benchmarks.ml index 1931e0462959532d21dfd1ebe445c2ad33098a6a..bd7bb93ad3114bbaf2961ce08dab2b7d5d842c62 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/interpreter_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/interpreter_benchmarks.ml @@ -258,6 +258,8 @@ let make_benchmark : let module_filename = __FILE__ + let generated_code_destination = None + let models = (* [intercept = true] implies there's a benchmark with [intercept = false]. No need to register the model twice. *) @@ -545,6 +547,8 @@ let make_continuation_benchmark : let module_filename = __FILE__ + let generated_code_destination = None + let tags = tags @ more_tags let models = @@ -657,6 +661,8 @@ module Registration_section = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = [Tags.interpreter] type config = {max_iterations : int} @@ -2549,6 +2555,8 @@ module Registration_section = struct let module_filename = __FILE__ + let generated_code_destination = None + include Default_config include Default_boilerplate diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/sapling_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/sapling_benchmarks.ml index 767e5861b88a6a5b74b533b9dfbdb60922adb905..f8584c8f2eaf00ebb94884f6b74467fb94e46f2c 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/sapling_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/sapling_benchmarks.ml @@ -38,6 +38,8 @@ module Apply_diff_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sapling"] let diff_from_tx (tx : Alpha_context.Sapling.transaction) = diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/sc_rollup_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/sc_rollup_benchmarks.ml index c769e534932f5dcea05825e73f20546b2ec68094..9551cedecb93ffdf919c2fa7e2abef7c338261db 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/sc_rollup_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/sc_rollup_benchmarks.ml @@ -43,6 +43,8 @@ module Sc_rollup_update_num_and_size_of_messages_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["scoru"] type config = { @@ -147,6 +149,8 @@ module Sc_rollup_add_external_messages_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["scoru"] type config = {max_length : int; max_level : int} diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_repr_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_repr_benchmarks.ml index a68744913e2df12b35cbea0aeaa3e32b9cafd906..8774fcd392211b80669fa19659be74b3f8830559 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_repr_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_repr_benchmarks.ml @@ -80,6 +80,8 @@ module Micheline_nodes_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let size_based_model = Model.make ~conv:(function {micheline_nodes} -> (micheline_nodes, ())) @@ -121,6 +123,8 @@ module Script_repr_strip_annotations : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let strip_annotations_model = Model.( make diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml index 5199ed85e7654a770983e2137d90b61e555037fd..58a9095280e11559303f95195d89923acc465409 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/script_typed_ir_size_benchmarks.ml @@ -81,6 +81,8 @@ end = struct let module_filename = __FILE__ + let generated_code_destination = None + let value_size_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = (* FIXME: cleanup and factorize this code between translator benches and these ones. *) @@ -156,6 +158,8 @@ module Type_size_benchmark : Tezos_benchmark.Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [(model_name, size_based_model name)] let type_size_benchmark (Script_typed_ir.Ex_ty ty) = @@ -202,6 +206,8 @@ end = struct let module_filename = __FILE__ + let generated_code_destination = None + let kinstr_size_benchmark rng_state (expr : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = (* FIXME: cleanup and factorize this code between translator benches and these ones. *) @@ -283,6 +289,8 @@ module Node_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let size_based_model = Model.make ~conv:(function {micheline_nodes} -> (micheline_nodes, ())) diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/storage_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/storage_benchmarks.ml index 64a07a303a7838761f5ab37a9500cede7249e318..b91bf5ee94d6cc81fb54064cd3aac672cfdd0831 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/storage_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/storage_benchmarks.ml @@ -145,6 +145,8 @@ module List_key_values_benchmark_boilerplate = struct let module_filename = __FILE__ + let generated_code_destination = None + let config_encoding = let open Data_encoding in conv diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/ticket_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/ticket_benchmarks.ml index 27fc7edd42b1abf87b86367573f4acef05be0835..2918169fd815ca6ff68a583bd61959c8d9782ebc 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/ticket_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/ticket_benchmarks.ml @@ -83,6 +83,8 @@ module Compare_ticket_hash_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let compare_model = Model.make ~conv:(fun () -> ()) @@ -141,6 +143,8 @@ module Compare_key_contract_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let compare_model = Model.make ~conv:(fun () -> ()) @@ -206,6 +210,8 @@ module Has_tickets_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench_helper rng_state config () = let open Result_syntax in let* ctxt, _ = Lwt_main.run (Execution_context.make ~rng_state) in @@ -268,6 +274,8 @@ module Collect_tickets_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench_helper rng_state config () = let open Script_typed_ir in let open Result_syntax in diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/translator_benchmarks.ml index 55de65841f1f932dd0f268902aea36110db5c256..a248a29b4b8cfcd6c5e9fa080aa1971fad31aeaa 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/translator_benchmarks.ml @@ -195,6 +195,8 @@ module Typechecking_data : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let typechecking_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = Lwt_main.run @@ -271,6 +273,8 @@ module Unparsing_data : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let unparsing_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Protocol.Script_repr.expr) = Lwt_main.run @@ -354,6 +358,8 @@ module Typechecking_code : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let typechecking_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = Lwt_main.run @@ -434,6 +440,8 @@ module Unparsing_code : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let unparsing_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = Lwt_main.run @@ -518,6 +526,8 @@ let check_printable_benchmark = let open Tezos_shell_benchmarks.Encoding_benchmarks_helpers in let open Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None end) in linear_shared ~name:"CHECK_PRINTABLE" @@ -569,6 +579,8 @@ module Ty_eq : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = [Tags.translator] let intercept_var = Free_variable.of_string (Format.asprintf "%s_const" name) @@ -726,6 +738,8 @@ module Parse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in @@ -782,6 +796,8 @@ module Unparse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in diff --git a/src/proto_015_PtLimaPt/lib_benchmarks_proto/tx_rollup_benchmarks.ml b/src/proto_015_PtLimaPt/lib_benchmarks_proto/tx_rollup_benchmarks.ml index 464106d9497d6a50d5b824594bb73456385550e7..bfe844a8e335e7c2b9e12ad54fe656940a646178 100644 --- a/src/proto_015_PtLimaPt/lib_benchmarks_proto/tx_rollup_benchmarks.ml +++ b/src/proto_015_PtLimaPt/lib_benchmarks_proto/tx_rollup_benchmarks.ml @@ -34,6 +34,8 @@ module Inbox_add_message : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["tx_rollup"; "merkle"; "inbox"; "add_message"] type config = {max_messages : int} @@ -124,6 +126,8 @@ module Commitment_full_compact_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["tx_rollup"; "merkle"; "commitment"; "compact"] type config = {max_messages : int} @@ -558,6 +562,8 @@ module Verify_proof_compute_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["tx_rollup"; "merkle"; "verify"; "proof"] type config = {max_withdrawals : int} 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 cda89ebf7ca58627c1ba4099f58058ddb166fc90..be05760b2fc2daae01f03ec09263e8bdf53dd893 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/cache_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/cache_benchmarks.ml @@ -135,6 +135,8 @@ module Cache_update_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + (** 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_016_PtMumbai/lib_benchmarks_proto/carbonated_map_benchmarks.ml b/src/proto_016_PtMumbai/lib_benchmarks_proto/carbonated_map_benchmarks.ml index 3e6c36d66624339c78fa7ea05e16944b18e13608..5ccfedba21076d8279c0d104d9212aecec26a05d 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,6 +88,8 @@ module Fold_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let fold_model = Model.make ~conv:(fun {size} -> (size, ())) @@ -174,6 +176,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [ ( "carbonated_map", @@ -212,6 +216,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + (** Given the cost of comparing keys, the model is used for deducing [intercept] and [traverse_overhead] from: @@ -314,6 +320,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [ ( "carbonated_map", 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 5e19e2df56a24b2dd14e2ebfdfb2432483bb2716..7e4960651df4fb36625dc50ed813a88da1ad5af8 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/encodings_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/encodings_benchmarks.ml @@ -131,6 +131,8 @@ module Encoding_micheline : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let micheline_serialization_trace (micheline_node : Alpha_context.Script.node) = match @@ -199,6 +201,8 @@ module Decoding_micheline : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let micheline_deserialization_trace (micheline_str : string) = match Data_encoding.Binary.of_string @@ -264,6 +268,8 @@ let () = Registration_helpers.register (module Decoding_micheline) module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None 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 b32a7eefce5134be0f9bcb4d50a29337758326e4..39318450640ae96d8865ef3ddeb6d09e05bf824f 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,6 +298,8 @@ module Set_add : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -353,6 +355,8 @@ module Set_elements : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -410,6 +414,8 @@ module Script_expr_hash_of_b58check_opt : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -484,6 +490,8 @@ struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -569,6 +577,8 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -645,6 +655,8 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit 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 a3c850235db0e9c61cdbd512dfbe7b5dd5480937..4476d4a5c68072b5b7e06036b375c47d714b9409 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/interpreter_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/interpreter_benchmarks.ml @@ -263,6 +263,8 @@ let make_benchmark : let module_filename = __FILE__ + let generated_code_destination = None + let models = (* [intercept = true] implies there's a benchmark with [intercept = false]. No need to register the model twice. *) @@ -546,6 +548,8 @@ let make_continuation_benchmark : let module_filename = __FILE__ + let generated_code_destination = None + let tags = tags @ more_tags let models = Interpreter_model.make_model ?amplification (Cont_name name) @@ -653,6 +657,8 @@ module Registration_section = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = [Tags.interpreter] type config = {max_iterations : int} @@ -2704,6 +2710,8 @@ module Registration_section = struct let module_filename = __FILE__ + let generated_code_destination = None + 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 63955d43b65d6305b7e8c6e640e649851888f739..0cdb5406d52d064c25391da3304468493eb0c284 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/sapling_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/sapling_benchmarks.ml @@ -40,6 +40,8 @@ module Apply_diff_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sapling"] let diff_from_tx (tx : Alpha_context.Sapling.transaction) = 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 790ffda4a01b523030bb54151b7c9c2d513f2f7d..7d153ba36fabfb13f126bd027e3094f203dfb16c 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,6 +290,8 @@ module Sc_rollup_verify_output_proof_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sc_rollup"] type config = { @@ -507,6 +509,8 @@ module Sc_rollup_deserialize_output_proof_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sc_rollup"] type config = { 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 3823502d4ee242ab683ea2fea9646984b5e81d24..7399064deba453528969f862101f9097833f697f 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,6 +82,8 @@ module Micheline_nodes_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let size_based_model = Model.make ~conv:(function {micheline_nodes} -> (micheline_nodes, ())) @@ -128,6 +130,8 @@ module Script_repr_strip_annotations : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let strip_annotations_model = Model.( make 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 f21095fe7411be1973c899b71844de0abf1f3f4f..2f98ce0eeabb55b412dbc765558cf22cf287605e 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,6 +79,8 @@ end = struct let module_filename = __FILE__ + let generated_code_destination = None + let value_size_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = (* FIXME: cleanup and factorize this code between translator benches and these ones. *) @@ -152,6 +154,8 @@ module Type_size_benchmark : Tezos_benchmark.Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [(model_name, size_based_model (Namespace.basename name))] let type_size_benchmark (Script_typed_ir.Ex_ty ty) = @@ -196,6 +200,8 @@ end = struct let module_filename = __FILE__ + let generated_code_destination = None + let kinstr_size_benchmark rng_state (expr : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = (* FIXME: cleanup and factorize this code between translator benches and these ones. *) @@ -275,6 +281,8 @@ module Node_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let size_based_model = Model.make ~conv:(function {micheline_nodes} -> (micheline_nodes, ())) 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 3be54fc0b0145f5c5316108ec924af34ebb99823..af4ac9ce70f093e59ad721a0d37c4c59dc19bdd4 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,6 +47,8 @@ module Next : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["skip_list"] type config = {max_items : int} @@ -101,6 +103,8 @@ module Hash_cell = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["skip_list"] include 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 0f85b7714aad700e78e568357e80f3d0d7f3aaa7..8b0531848ce24b6b2f27f197c97720036a8b0b2a 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/storage_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/storage_benchmarks.ml @@ -147,6 +147,8 @@ module List_key_values_benchmark_boilerplate = struct let module_filename = __FILE__ + let generated_code_destination = None + let config_encoding = let open Data_encoding in conv 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 521038eec8c936a87111c0559cd11e70ffc696e0..908f6eff1289aab4f42b0257be71a923e665ac03 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/ticket_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/ticket_benchmarks.ml @@ -83,6 +83,8 @@ module Compare_ticket_hash_benchmark : Benchmark.S = struct let info = "Compare cost for Ticket_hash" + let generated_code_destination = None + let module_filename = __FILE__ let compare_model = @@ -143,6 +145,8 @@ module Compare_key_contract_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let compare_model = Model.make ~conv:(fun () -> ()) @@ -208,6 +212,8 @@ module Has_tickets_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench_helper rng_state config () = let open Result_syntax in let* ctxt, _ = Lwt_main.run (Execution_context.make ~rng_state) in @@ -273,6 +279,8 @@ module Collect_tickets_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench_helper rng_state config () = let open Script_typed_ir in let open Result_syntax 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 1f5a79acdbb66dfcc4b313e015f7d53bbf0daf06..6ba2ab1e1afed69f31c7bb3b488c595ba55d91d8 100644 --- a/src/proto_016_PtMumbai/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_016_PtMumbai/lib_benchmarks_proto/translator_benchmarks.ml @@ -197,6 +197,8 @@ module Typechecking_data : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let typechecking_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = Lwt_main.run @@ -271,6 +273,8 @@ module Unparsing_data : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let unparsing_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Protocol.Script_repr.expr) = Lwt_main.run @@ -352,6 +356,8 @@ module Typechecking_code : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let typechecking_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = Lwt_main.run @@ -430,6 +436,8 @@ module Unparsing_code : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let unparsing_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = Lwt_main.run @@ -512,6 +520,8 @@ let check_printable_benchmark = let open Tezos_shell_benchmarks.Encoding_benchmarks_helpers in let open Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None end) in linear_shared ~name:"CHECK_PRINTABLE" @@ -563,6 +573,8 @@ module Ty_eq : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = [Tags.translator] let intercept_var = fv (Format.asprintf "%s_const" (Namespace.basename name)) @@ -721,6 +733,8 @@ module Parse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in @@ -775,6 +789,8 @@ module Unparse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in 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 04ce5cba93db19b66fe07508cfaa3c083890ce0c..db0e4f6beb0875a9897816e97f76c8420e68d64c 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,6 +36,8 @@ module Inbox_add_message : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["tx_rollup"; "merkle"; "inbox"; "add_message"] type config = {max_messages : int} @@ -120,6 +122,8 @@ module Commitment_full_compact_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["tx_rollup"; "merkle"; "commitment"; "compact"] type config = {max_messages : int} @@ -551,6 +555,8 @@ module Verify_proof_compute_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["tx_rollup"; "merkle"; "verify"; "proof"] type config = {max_withdrawals : int} diff --git a/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml index 02cd860880e73d9bcb3137bc0a93a16dba69dace..5aa82f42132ac1436fc0c6e9421e1b726f8c8bcf 100644 --- a/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/apply_benchmarks.ml @@ -64,6 +64,8 @@ module Take_fees_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["apply"] type config = unit diff --git a/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml b/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml index a541164ad48cdc23ea9dcab2c4b0b322b3728694..ffde3a4612f616dc013502c2b91b5e802ecfd120 100644 --- a/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml +++ b/src/proto_alpha/lib_benchmarks_proto/benchmarks_proto.ml @@ -73,10 +73,6 @@ module Registration = struct (destination ^ "_costs_generated.ml")) Bench.generated_code_destination - (* The value will be used later in lib_benchmark/registration.ml for - codegen file destination. *) - let () = ignore generated_code_destination - let models = [(Namespace.(cons name "model" |> to_string), Bench.model ~name)] diff --git a/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml index cda89ebf7ca58627c1ba4099f58058ddb166fc90..be05760b2fc2daae01f03ec09263e8bdf53dd893 100644 --- a/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/cache_benchmarks.ml @@ -135,6 +135,8 @@ module Cache_update_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + (** 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 6f99987cd0402844421e58b8e6d5dd1a44926ebf..f1862d9c4106d3d334487e364fa25fa4c723af35 100644 --- a/src/proto_alpha/lib_benchmarks_proto/carbonated_map_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/carbonated_map_benchmarks.ml @@ -47,6 +47,8 @@ module Config_and_workload = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["carbonated_map"] let workload_encoding = config_encoding @@ -165,6 +167,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [ ( "carbonated_map", @@ -304,6 +308,8 @@ module Make (CS : COMPARABLE_SAMPLER) = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [ ( "carbonated_map", diff --git a/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml index 34027d0f0834f431218fb06526c2565b019bb3bf..a879665d568f6f55f3805c96f6c60177ff93772e 100644 --- a/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/encodings_benchmarks.ml @@ -28,6 +28,8 @@ open Protocol module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None end) module Size = Gas_input_size @@ -137,6 +139,8 @@ module Encoding_micheline : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let micheline_serialization_trace (micheline_node : Alpha_context.Script.node) = match @@ -205,6 +209,8 @@ module Decoding_micheline : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let micheline_deserialization_trace (micheline_str : string) = match Data_encoding.Binary.of_string 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 39859a11d5a60174114cf6d3f60bb412b83a2cbd..b3f4f8ad651072e828100cb47d2f89bbceef9234 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 @@ -298,6 +298,8 @@ module Set_add : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -351,6 +353,8 @@ module Set_elements : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -406,6 +410,8 @@ module Script_expr_hash_of_b58check_opt : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -476,6 +482,8 @@ struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -558,6 +566,8 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit @@ -631,6 +641,8 @@ module Global_constants_storage_expand_models = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["global_constants"] type config = unit diff --git a/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml index 73ec037dd88b8f7abe73efb15ce5d49149c12f01..e9f600aa81fabf62b36f929fe49cc803cfc085c3 100644 --- a/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/interpreter_benchmarks.ml @@ -274,6 +274,8 @@ let make_benchmark : let module_filename = __FILE__ + let generated_code_destination = None + let benchmark kinstr_and_stack_sampler ctxt step_constants () = let stack_instr = kinstr_and_stack_sampler () in benchmark_from_kinstr_and_stack @@ -556,6 +558,8 @@ let make_continuation_benchmark : let module_filename = __FILE__ + let generated_code_destination = None + let benchmark cont_and_stack_sampler ctxt step_constants () = let stack_instr = cont_and_stack_sampler () in benchmark_from_continuation ?amplification ctxt step_constants stack_instr @@ -653,6 +657,8 @@ module Registration_section = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = [Tags.interpreter] type config = {max_iterations : int} @@ -2724,6 +2730,8 @@ module Registration_section = struct let module_filename = __FILE__ + let generated_code_destination = None + 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 63955d43b65d6305b7e8c6e640e649851888f739..0cdb5406d52d064c25391da3304468493eb0c284 100644 --- a/src/proto_alpha/lib_benchmarks_proto/sapling_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/sapling_benchmarks.ml @@ -40,6 +40,8 @@ module Apply_diff_bench : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sapling"] let diff_from_tx (tx : Alpha_context.Sapling.transaction) = 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 e5f8f7dddb0bd704dac445b9f481d09a9b1624e7..2090e007307c12fce1952ce55ae6117191c7eba4 100644 --- a/src/proto_alpha/lib_benchmarks_proto/sc_rollup_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/sc_rollup_benchmarks.ml @@ -290,6 +290,8 @@ module Sc_rollup_verify_output_proof_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sc_rollup"] type config = { @@ -507,6 +509,8 @@ module Sc_rollup_deserialize_output_proof_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = ["sc_rollup"] type config = { 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 a69895df80f081d7ad41cc26efd047686bae7665..0c57d0d9b5233c6c8fa5473ac2a74ba7bafd96ff 100644 --- a/src/proto_alpha/lib_benchmarks_proto/script_repr_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/script_repr_benchmarks.ml @@ -82,6 +82,8 @@ module Micheline_nodes_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let size_based_model = Model.make ~conv:(function {micheline_nodes} -> (micheline_nodes, ())) @@ -123,6 +125,8 @@ module Script_repr_strip_annotations : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let strip_annotations_model = Model.( make 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 bbcdc23ca0d9680103cab7ed48af8c18a88fa854..e97011b1ffd828f2cf47651666307d8ecae84048 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 @@ -79,6 +79,8 @@ end = struct let module_filename = __FILE__ + let generated_code_destination = None + let value_size_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = (* FIXME: cleanup and factorize this code between translator benches and these ones. *) @@ -152,6 +154,8 @@ module Type_size_benchmark : Tezos_benchmark.Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let models = [(model_name, size_based_model (Namespace.basename name))] let type_size_benchmark (Script_typed_ir.Ex_ty ty) = @@ -196,6 +200,8 @@ end = struct let module_filename = __FILE__ + let generated_code_destination = None + let kinstr_size_benchmark rng_state (expr : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = (* FIXME: cleanup and factorize this code between translator benches and these ones. *) @@ -275,6 +281,8 @@ module Node_size_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let size_based_model = Model.make ~conv:(function {micheline_nodes} -> (micheline_nodes, ())) diff --git a/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml index 467777dff54663777b3e76f20e54de1924dc2e6e..b1fb282687fef4cf5e17f43f70e32d839b4e6d58 100644 --- a/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/storage_benchmarks.ml @@ -183,6 +183,8 @@ module List_key_values_benchmark = struct let module_filename = __FILE__ + let generated_code_destination = None + let benchmark rng_state {max_size} () = let wrap m = m >|= Environment.wrap_tzresult in let size = @@ -223,6 +225,8 @@ module List_key_values_benchmark_intercept = struct let module_filename = __FILE__ + let generated_code_destination = None + let benchmark _rng_state _config () = let ctxt = match Lwt_main.run (default_raw_context ()) with diff --git a/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml index 471f90a4ee49b19dc01d157bb1f74a3b30562290..7fc129dacae02b712e7e5a52b13d589b5ee61a8a 100644 --- a/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/ticket_benchmarks.ml @@ -85,6 +85,8 @@ module Compare_ticket_hash_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let compare_model = Model.make ~conv:(fun () -> ()) @@ -138,6 +140,8 @@ module Compare_key_contract_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let compare_model = Model.make ~conv:(fun () -> ()) @@ -198,6 +202,8 @@ module Has_tickets_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench_helper rng_state config () = let open Result_syntax in let* ctxt, _ = Lwt_main.run (Execution_context.make ~rng_state) in @@ -253,6 +259,8 @@ module Collect_tickets_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench_helper rng_state config () = let open Script_typed_ir in let open Result_syntax in diff --git a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml index 1ac41b09d433dcbc3d5d5f53446778d0995b91d8..a1bd650460b82d80e84cb2db205c0e95844ff9c2 100644 --- a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml @@ -28,6 +28,8 @@ open Protocol module Encodings = Tezos_shell_benchmarks.Encoding_benchmarks_helpers.Make (struct let file = __FILE__ + + let generated_code_destination = None end) module Size = Gas_input_size @@ -203,6 +205,8 @@ module Typechecking_data : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let typechecking_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Script_repr.expr) = Lwt_main.run @@ -277,6 +281,8 @@ module Unparsing_data : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let unparsing_data_benchmark rng_state (node : Protocol.Script_repr.expr) (michelson_type : Protocol.Script_repr.expr) = Lwt_main.run @@ -358,6 +364,8 @@ module Typechecking_code : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let typechecking_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = Lwt_main.run @@ -436,6 +444,8 @@ module Unparsing_code : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let unparsing_code_benchmark rng_state (node : Protocol.Script_repr.expr) (stack : Script_repr.expr list) = Lwt_main.run @@ -567,6 +577,8 @@ module Ty_eq : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let tags = [Tags.translator] let intercept_var = fv (Format.asprintf "%s_const" (Namespace.basename name)) @@ -714,6 +726,8 @@ module Parse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in @@ -768,6 +782,8 @@ module Unparse_type_benchmark : Benchmark.S = struct let module_filename = __FILE__ + let generated_code_destination = None + let make_bench rng_state config () = ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in