Skip to content

Gas_benchmarks: add benchmark for `type_has_tickets`

Thomas Athorne requested to merge thomas.athorne@type_has_tickets_benchmark into master

Context

This MR partially attacks #2315 (closed), by adding a benchmark for the function Ticket_scanner.type_has_benchmarks which will be used to estimate a value for Ticket_costs.cost_has_tickets_of_ty.

Manually testing the MR

Running the new benchmark

Run the benchmark using, for example

./tezos-snoop benchmark TYPE_HAS_TICKETS_alpha and save to has_tickets.workload --bench-num 100 --nsamples 1000

To infer the model run this on the output from above:

poetry run ./tezos-snoop infer parameters for model 'size_has_tickets_model' on data has_tickets.workload using lasso --dump-csv has_tickets.csv --save-solution has_tickets.sol --plot

Finally, to run code generation use the following:

./tezos-snoop generate code using solution has_tickets.sol and model TYPE_HAS_TICKETS_alpha

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Thomas Athorne

Merge request reports