3

I am trying to figure out the best ways of benchmarking Solidity contracts. As with normal benchmarking, I presume one would basically want to measure computational effort and storage overhead:

  • gas cost can be used as an easy indicator of computational complexity. Mist & Mix both estimate this before sending a transaction, though this usually differs slightly to the real cost when run (correct?). So you would want to measure both- estimation presumably can be done by importing one of the core platform libraries; real can be tracked via the contract globals.
  • storage overhead would depend on a few things: the compiled bytecode size and size of the contract's storage memory space. The former is again estimated by the tools, the latter I am not so sure how to quantify without reading through the details on how the EVM allocates memory and writing some low-level tool to parse the AST or source and compute the details.

Look forward to seeing if anyone has any pointers on this (:

pospi
  • 131
  • 3
  • 2
    Check out the traceTransaction API - see http://ethereum.stackexchange.com/questions/4282/how-to-check-the-vm-trace-using-geth/4289#4289. – BokkyPooBah Jun 13 '16 at 09:20
  • 1
    beautiful! Lots of useful methods in there. If you repost as an answer I can mark it accepted (; – pospi Jun 14 '16 at 00:27
  • Linked the both questions since it seems it was what you were looking for. If not, edit your question and request a reopening. – q9f Jun 14 '16 at 14:03

0 Answers0