A simple mechanism for measuring optimizations.