make ExecStats non-public

pull/30442/head
Jared Wasinger 1 month ago
parent fedbdee893
commit 1f84917da0
  1. 4
      cmd/evm/runner.go
  2. 2
      cmd/evm/staterunner.go

@ -74,14 +74,14 @@ func readGenesis(genesisPath string) *core.Genesis {
return genesis
}
type ExecStats struct {
type execStats struct {
Time time.Duration `json:"time"` // The execution Time.
Allocs int64 `json:"allocs"` // The number of heap allocations during execution.
BytesAllocated int64 `json:"bytesAllocated"` // The cumulative number of bytes allocated during execution.
GasUsed uint64 `json:"gasUsed"` // the amount of gas used during execution
}
func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) (output []byte, stats ExecStats, err error) {
func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) (output []byte, stats execStats, err error) {
var gasUsed uint64
if bench {
result := testing.Benchmark(func(b *testing.B) {

@ -71,7 +71,7 @@ type StatetestResult struct {
Fork string `json:"fork"`
Error string `json:"error,omitempty"`
State *state.Dump `json:"state,omitempty"`
BenchStats *ExecStats `json:"benchStats,omitempty"`
BenchStats *execStats `json:"benchStats,omitempty"`
}
func stateTestCmd(ctx *cli.Context) error {

Loading…
Cancel
Save