Instrument Energy2D code using performance.js

Accidentally this wasn't committed last time, it should be part of the
previous commit.