Skip to content

Commit

Permalink
fix(cmd/gno): reset runtime metrics allocator on each test run (#3394)
Browse files Browse the repository at this point in the history
Ensures that the `allocs` printed by `-print-runtime-metrics` are
per-test, like the cycles.

h/t @leohhhn

Co-authored-by: Leon Hudak <[email protected]>
  • Loading branch information
thehowl and leohhhn authored Dec 23, 2024
1 parent 88fb8cb commit 6f7c677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnovm/pkg/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func (opts *TestOptions) runTestFiles(
// RunFiles doesn't do that currently)
// - Wrap here.
m = Machine(gs, opts.Output, memPkg.Path)
m.Alloc = alloc
m.Alloc = alloc.Reset()
m.SetActivePackage(pv)

testingpv := m.Store.GetPackage("testing", false)
Expand Down

0 comments on commit 6f7c677

Please sign in to comment.