cmd/evm: Add --bench flag for benchmarking (#20330)

The --bench flag uses the testing.B to execute the EVM bytecode many times and get the average exeuction time out of it.
This commit is contained in:
Paweł Bylica
2019-12-18 09:43:18 +01:00
committed by Martin Holst Swende
parent c4b7fdd27e
commit 49cf000df7
2 changed files with 48 additions and 11 deletions

View File

@ -87,6 +87,10 @@ var (
Name: "verbosity",
Usage: "sets the verbosity level",
}
BenchFlag = cli.BoolFlag{
Name: "bench",
Usage: "benchmark the execution",
}
CreateFlag = cli.BoolFlag{
Name: "create",
Usage: "indicates the action should be create rather than call",
@ -124,6 +128,7 @@ var (
func init() {
app.Flags = []cli.Flag{
BenchFlag,
CreateFlag,
DebugFlag,
VerbosityFlag,