mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
cmd/evm: init testing package
This commit is contained in:
parent
6342d59d56
commit
99d915d122
1 changed files with 1 additions and 0 deletions
|
|
@ -84,6 +84,7 @@ type execStats struct {
|
||||||
|
|
||||||
func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) ([]byte, execStats, error) {
|
func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) ([]byte, execStats, error) {
|
||||||
if bench {
|
if bench {
|
||||||
|
testing.Init()
|
||||||
// Do one warm-up run
|
// Do one warm-up run
|
||||||
output, gasUsed, err := execFunc()
|
output, gasUsed, err := execFunc()
|
||||||
result := testing.Benchmark(func(b *testing.B) {
|
result := testing.Benchmark(func(b *testing.B) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue