Mavryk_benchmarks_proto_alpha.Interpreter_benchmarks
val ns : Mavryk_benchmark.Namespace.cons
val fv : string -> Mavryk_benchmark.Free_variable.t
module Timelock_samplers = Mavryk_crypto.Timelock
type ex_stack_and_kinstr =
| Ex_stack_and_kinstr : {
stack : 'a * 'b;
stack_type : ('a, 'b) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty;
kinstr : ('a, 'b, 'c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr;
} -> ex_stack_and_kinstr
type ex_stack_and_continuation =
| Ex_stack_and_cont : {
stack : 'a * 'b;
stack_type : ('a, 'b) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty;
cont : ('a, 'b, 'c, 'd)
Mavryk_protocol_alpha.Protocol.Script_typed_ir.continuation;
} -> ex_stack_and_continuation
type ex_value =
| Ex_value : {
value : 'a;
ty : ('a, _) Mavryk_protocol_alpha.Protocol.Script_typed_ir.ty;
} -> ex_value
val info_and_name :
benchmark_type:benchmark_type ->
intercept:bool ->
?salt:string ->
string ->
string * Mavryk_benchmark.Namespace.t
module Default_boilerplate : sig ... end
module Default_config : sig ... end
val make_default_samplers :
?algo:[ `Algo of Mavryk_crypto.Signature.V_latest.algo | `Default ] ->
Mavryk_benchmark_alpha__Michelson_samplers.parameters ->
(module Mavryk_benchmark.Crypto_samplers.Finite_key_pool_S)
* (module Mavryk_benchmark_alpha.Michelson_samplers.S)
val register_model_for_code_generation :
'a Mavryk_benchmark.Model.model ->
unit
val register_time_alloc_codegen_model :
Interpreter_workload.instr_or_cont_name ->
unit
val prepare_workload :
?amplification:int ->
Mavryk_raw_protocol_alpha.Alpha_context.context ->
Mavryk_raw_protocol_alpha.Script_typed_ir.step_constants ->
('a, 'b) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
('a, 'b, 'c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
('a * 'b) ->
Interpreter_workload.ir_sized_step list
val time_benchmark_from_kinstr_and_stack :
?amplification:int ->
Mavryk_protocol_alpha.Protocol.Alpha_context.context ->
Mavryk_protocol_alpha.Protocol.Script_interpreter.step_constants ->
ex_stack_and_kinstr ->
Interpreter_workload.ir_sized_step list Mavryk_benchmark.Generator.benchmark
val alloc_benchmark_from_kinstr_and_stack :
Mavryk_protocol_alpha.Protocol.Alpha_context.context ->
Mavryk_protocol_alpha.Protocol.Script_interpreter.step_constants ->
ex_stack_and_kinstr ->
Interpreter_workload.ir_sized_step list Mavryk_benchmark.Generator.benchmark
val benchmark_from_kinstr_and_stack :
?amplification:int ->
benchmark_type ->
Mavryk_protocol_alpha.Protocol.Alpha_context.context ->
Mavryk_protocol_alpha.Protocol.Script_interpreter.step_constants ->
ex_stack_and_kinstr ->
Interpreter_workload.ir_sized_step list Mavryk_benchmark.Generator.benchmark
val time_and_alloc : (benchmark_type -> unit) -> unit
val make_benchmark :
?amplification:int ->
?intercept:bool ->
?salt:string ->
?more_tags:string list ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
benchmark_type:benchmark_type ->
kinstr_and_stack_sampler:
(Default_config.config ->
Stdlib.Random.State.t ->
unit ->
ex_stack_and_kinstr) ->
unit ->
Mavryk_benchmark.Benchmark.t
val make_simple_benchmark :
'bef_top 'bef 'res_top 'res. ?amplification:int ->
?intercept:bool ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
benchmark_type:benchmark_type ->
stack_type:
('bef_top, 'bef) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
kinstr:
('bef_top, 'bef, 'res_top, 'res)
Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
unit ->
Mavryk_benchmark.Benchmark.t
val benchmark :
?benchmark_type:benchmark_type ->
?amplification:int ->
?intercept:bool ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
kinstr_and_stack_sampler:
(Default_config.config ->
Stdlib.Random.State.t ->
unit ->
ex_stack_and_kinstr) ->
unit ->
unit
val time_alloc_benchmark :
?amplification:int ->
?intercept:bool ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
kinstr_and_stack_sampler:
(Default_config.config ->
Stdlib.Random.State.t ->
unit ->
ex_stack_and_kinstr) ->
unit ->
unit
val benchmark_with_stack_sampler :
?benchmark_type:benchmark_type ->
?amplification:int ->
?intercept:bool ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
stack_type:('a, 'b) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
name:Interpreter_workload.instruction_name ->
kinstr:('c, 'd, 'e, 'f) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
stack_sampler:
(Default_config.config -> Stdlib.Random.State.t -> unit -> 'g * 'h) ->
unit ->
unit
val benchmark_with_fixed_stack :
?benchmark_type:benchmark_type ->
?amplification:int ->
?intercept:bool ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
stack_type:('a, 'b) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
stack:('a * 'b) ->
kinstr:('a, 'b, 'c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
unit ->
unit
val time_alloc_benchmark_with_fixed_stack :
?amplification:int ->
?intercept:bool ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
stack_type:('a, 'b) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
stack:('c * 'd) ->
kinstr:('a, 'b, 'e, 'f) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
unit ->
unit
val simple_benchmark_with_stack_sampler :
?benchmark_type:benchmark_type ->
?amplification:int ->
?intercept_stack:('a * 'b) ->
?salt:string ->
?more_tags:string list ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
stack_type:('c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
kinstr:('c, 'd, 'e, 'f) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
stack_sampler:
(Default_config.config -> Stdlib.Random.State.t -> unit -> 'c * 'd) ->
unit ->
unit
val simple_time_alloc_benchmark_with_stack_sampler :
?amplification:int ->
?intercept_stack:('a * 'b) ->
?alloc_intercept:bool ->
?salt:string ->
?more_tags:string list ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
stack_type:('c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
kinstr:('c, 'd, 'e, 'f) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
stack_sampler:
(Default_config.config -> Stdlib.Random.State.t -> unit -> 'a * 'b) ->
unit ->
unit
val simple_benchmark :
?benchmark_type:benchmark_type ->
?amplification:int ->
?intercept_stack:('a * 'b) ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
stack_type:('c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
kinstr:('c, 'd, 'e, 'f) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
unit ->
unit
val simple_time_alloc_benchmark :
?amplification:int ->
?intercept_stack:('a * 'b) ->
?more_tags:string list ->
?salt:string ->
?check:(unit -> unit) ->
name:Interpreter_workload.instruction_name ->
stack_type:('c, 'd) Mavryk_protocol_alpha.Protocol.Script_typed_ir.stack_ty ->
kinstr:('c, 'd, 'e, 'f) Mavryk_protocol_alpha.Protocol.Script_typed_ir.kinstr ->
unit ->
unit
val time_benchmark_from_continuation :
?amplification:int ->
Mavryk_protocol_alpha.Protocol.Alpha_context.context ->
Mavryk_protocol_alpha.Protocol.Script_interpreter.step_constants ->
ex_stack_and_continuation ->
Interpreter_workload.ir_sized_step list Mavryk_benchmark.Generator.benchmark
val alloc_benchmark_from_continuation :
Mavryk_protocol_alpha.Protocol.Alpha_context.context ->
Mavryk_protocol_alpha.Protocol.Script_interpreter.step_constants ->
ex_stack_and_continuation ->
Interpreter_workload.ir_sized_step list Mavryk_benchmark.Generator.benchmark
val benchmark_from_continuation :
?amplification:int ->
benchmark_type ->
Mavryk_protocol_alpha.Protocol.Alpha_context.context ->
Mavryk_protocol_alpha.Protocol.Script_interpreter.step_constants ->
ex_stack_and_continuation ->
Interpreter_workload.ir_sized_step list Mavryk_benchmark.Generator.benchmark
val make_continuation_benchmark :
?amplification:int ->
?intercept:bool ->
?salt:string ->
?more_tags:string list ->
?check:(unit -> unit) ->
name:Interpreter_workload.continuation_name ->
benchmark_type:benchmark_type ->
cont_and_stack_sampler:
(Default_config.config ->
Stdlib.Random.State.t ->
unit ->
ex_stack_and_continuation) ->
unit ->
Mavryk_benchmark.Benchmark.t
val continuation_benchmark :
?benchmark_type:benchmark_type ->
?amplification:int ->
?intercept:bool ->
?salt:string ->
?more_tags:string list ->
?check:(unit -> unit) ->
name:Interpreter_workload.continuation_name ->
cont_and_stack_sampler:
(Default_config.config ->
Stdlib.Random.State.t ->
unit ->
ex_stack_and_continuation) ->
unit ->
unit
val continuation_time_alloc_benchmark :
?amplification:int ->
?intercept:bool ->
?salt:string ->
?more_tags:string list ->
?check:(unit -> unit) ->
name:Interpreter_workload.continuation_name ->
cont_and_stack_sampler:
(Default_config.config ->
Stdlib.Random.State.t ->
unit ->
ex_stack_and_continuation) ->
unit ->
unit
val nat_of_positive_int :
int ->
Mavryk_protocol_alpha.Protocol.Script_int.n
Mavryk_protocol_alpha.Protocol.Script_int.num
val adversarial_ints :
Stdlib.Random.State.t ->
Default_config.config ->
int ->
Mavryk_protocol_alpha.Protocol.Script_int.z
Mavryk_protocol_alpha.Protocol.Script_int.num
list
val raise_if_error :
('a,
Mavryk_error_monad.Error_monad.error
Mavryk_error_monad.Error_monad.TzTrace.trace)
Stdlib.result ->
'b
Registration_section
contains all interpreter benchmarks. The goal of a benchmark is to gather enough data to reliably estimate the parameters of the cost model associated to each instruction. In general, it can take several distinct benchmarks to properly cover all the execution paths.
In particular, for affine cost model, it is often worth estimating the intercept separately from the size-dependent coefficients.
module Registration_section : sig ... end