Finalize perf measurement on provider failure.
Merge pull request #10023 from adobe/kai/code-inspection-perfutils-fix

Finalize perf measurement on provider failure.