In Sitecore, Pipelines are by far my favorite dependency injection pattern, and I have used them since Sitecore 5. One of the secret features of pipelines are the built in profiling. Oh, yes, by flipping 2 switches you can measure the performance of your pipeline processors.
STEP 1: SWITCH ON PIPELINE PROFILING
Enable the \App_Config\Include\Sitecore.PipelineProfiling.config.disabled by removing the .disabled extension.
Or add the following 2 settings to your /App_Config/sitecore.config:
<setting name="Pipelines.Profiling.Enabled" value="true" /> <setting name="Pipelines.Profiling.MeasureCpuTime" value="true" />
The Pipelines.Profiling.MeasureCpuTime is not enabled by default in the Sitecore.PipelineProfiling.config file as it introduces a performance overhead, so only use this setting on your test environment.
STEP 2: FIND THE PROFILE PAGE:
Sitecore comes with a profiling page (it has been there since Sitecore 7 i guess):
The page displays all pipelines executed since you pressed the refresh button, how many times it has been executed, and the average wall time (wall time = real-world time from processor started to it finished, as opposed to CPU time which is the time spend by the CPU executing the processor) per execution.
MORE TO READ:
- SITECORE 7: PIPELINE PROFILING by John West
- Measuring Sitecore performance with HighResTimer by briancaos
- Sitecore Pipelines by #SitecoreCommunityDocs