evm: benchmark contract execution (#436)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
yihuang
2021-08-30 03:14:58 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 0cdedfc1fd
commit a5ab608336
5 changed files with 184 additions and 84 deletions
@@ -212,4 +212,12 @@ contract StandardTokenMock is ERC20 {
allowed[_account][msg.sender] = allowed[_account][msg.sender].sub(_amount);
_burn(_account, _amount);
}
// For benchmarks
event TestLog(address sender, uint i);
function benchmarkLogs(uint n) public {
for (uint i=0; i<n; i++) {
emit TestLog(msg.sender, i);
}
}
}