Skip to content

feat(forge): Add internal metrics capability #3607

Closed
@lucas-manuel

Description

@lucas-manuel

Component

Forge

Describe the feature you would like

When running invariant tests with an actor-based pattern, there is currently a lack of visibility for:

  1. How many times a function is called
  2. What code paths within the function are reached
  3. Other general metrics (e.g., how many LPs deposit total)

Having a cheatcode that would allow storing this information with arbitrary keys would be useful to be able to render this info in a summary table at the end of a fuzzing campaign.

@gakonst mentioned [prometheus] metrics as a good reference for this.

Examples:

vm.counter("numberOfLps", numberOfLps++);

vm.counter(string.concat("loan_", vm.toString(loanNumber), "_payments"), payments[loan]);

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Completed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions