Jwang add resource measurements

Oh come on, don't write code like this. Inline pre-increments have ridiculous semantics.