Instrumented version of computeFlow.