For each parameter, we register the list of models (by name) in which they occur
val register : ?add_timer:bool ->Benchmark.t-> unit
Register a benchmark. Recursively registers any relevant model and parameter included in it. Add timer latency to the model if add_timer is true (default). It is expected that add_timer is set to false when registering a benchmark which uses Calculated.
Register a Benchmark.Simple_with_num. Recursively registers any relevant model and parameter included in it.
val register_model_for_code_generation :
?destination:string ->string ->'aModel.t->
unit
register_model_for_code_generation ?destination s model registers a model model with a local model name s for code generation. Use register if a model is associated with a benchmark.
destination specifies the code generation destination. If destination = "michelson_v1_gas", the code will be generated to "DIR/michelson_v1_gas_costs_generated.ml" by octez-snoop generate code for solutions SOL --split-to DIR command. The command will not generate the code under DIR if destination is not specified.
Returns the list of all the model names Same as all_models () |> List.map fst
val all_local_model_names : unit ->string list
Returns the list of all local model names as they appear in registered benchmarks
val find_benchmarks_with_tags :
mode:[< `All | `Exact| `Any ]->string list->(Namespace.t * benchmark_info) list
find_benchmarks_with_tags ~mode tag_list returns all the benchmarks which tags match the given tag_list with the given mode. `All means all tags in tag_list appear in the tags of the returned benchmarks `Exact means the returned benchmarks' tags match exactly with tag_list`Any means the returned benchmarks have at least one tag also present in tag_list
The following query functions take a string as input. This string is converted into a Namespace.t with Namespace.of_string. This conversion is then returned as output. This ensures that the returned Namespace.t values correspond to registered items.
find_benchmark_exn s returns (name,b) with name = s if the benchmark b is named name and has been registered, else raises the exception Benchmark_not_founds
find_benchmarks_in_namespace s returns all registered benchmarks which name has s as a parent namespace. For instance, if two benchmarks a/b/bench1 and a/b/bench2 are registered, then
if s = a or s = a/b, then the function returns both benchmarks
find_model_exn s returns (name,m) with name = s if the model of m is named name and has been registered, else raises the exception Local_model_not_founds
find_local_model s returns the list of benchmark names whose local model name is s, if the latter has been registered, else raises the exception Model_not_founds
find_parameter_exn s returns (name,p) if the parameter name = s has been registered, and p is the registered info on s, else raises the exception Parameter_not_founds