Add metrics measuring the CPU and DB time spent in state resolution.