def run() -> None: logging.basicConfig(level=logging.INFO, format='%(message)s') logging.info(bold_green(HEADER)) logging.info(construct_evm_runtime_identifier() + "\n") if "--compile-contracts" in sys.argv: logging.info('Precompiling contracts') try: compile_contracts(get_contracts()) except OSError: logging.error( bold_red( 'Compiling contracts requires "solc" system dependency')) sys.exit(1) total_stat = DefaultStat() benchmarks = [ MineEmptyBlocksBenchmark(), ImportEmptyBlocksBenchmark(), SimpleValueTransferBenchmark(TO_EXISTING_ADDRESS_CONFIG), SimpleValueTransferBenchmark(TO_NON_EXISTING_ADDRESS_CONFIG), ERC20DeployBenchmark(), ERC20TransferBenchmark(), ERC20ApproveBenchmark(), ERC20TransferFromBenchmark(), ] for benchmark in benchmarks: total_stat = total_stat.cumulate(benchmark.run(), increment_by_counter=True) print_final_benchmark_total_line(total_stat)
def run() -> None: logging.basicConfig(level=logging.INFO, format='%(message)s') logging.info(bold_green(HEADER)) logging.info(construct_evm_runtime_identifier() + "\n") total_stat = DefaultStat() benchmarks = [ MineEmptyBlocksBenchmark(), ImportEmptyBlocksBenchmark(), SimpleValueTransferBenchmark(TO_EXISTING_ADDRESS_CONFIG), SimpleValueTransferBenchmark(TO_NON_EXISTING_ADDRESS_CONFIG), ] for benchmark in benchmarks: total_stat = total_stat.cumulate(benchmark.run(), increment_by_counter=True) print_final_benchmark_total_line(total_stat)