display gas cost of each test

This commit is contained in:
Jonathan Rainville 2018-06-29 10:29:07 -04:00 committed by Pascal Precht
parent b491134bb9
commit 0f18c5caf1
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ class EmbarkSpec extends Base {
console.log(fmt, receipt.className, receipt.gasUsed); console.log(fmt, receipt.className, receipt.gasUsed);
} }
function onBlockHeader(blockHeader) {
self.stats.totalGasCost += blockHeader.gasUsed;
self.stats.test.gasUsed += blockHeader.gasUsed;
}
function onBlockHeader(blockHeader) { function onBlockHeader(blockHeader) {
if(!self.listenForGas) { if(!self.listenForGas) {