Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@richardszalay
Created July 5, 2019 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save richardszalay/f12027c0c3dea84c0fc0f40fe0ae8fbf to your computer and use it in GitHub Desktop.
Save richardszalay/f12027c0c3dea84c0fc0f40fe0ae8fbf to your computer and use it in GitHub Desktop.
Sitecore Pipelines admin tool :: Per Request Wall Time Summary
/*
Paste this into the dev tools console on sitecore/admin/pipelines.aspx for a summary of pipeline execution time per request
*/
(function() {
function pipelinesPerRequest() {
const pipelines = Array.from(document.querySelectorAll('.groupheader')).map(el => ({
pipeline: el.querySelector("*[pln-name]").innerText,
executions: parseInt(el.querySelector('*[title="#Executions"]').innerText, 10),
wallTime: parseInt(el.querySelector('*[title="Wall Time"]').innerText.replace(/[^\d\.]/g, ''), 10)
}))
const httpRequestBegin = pipelines.find(p => p.pipeline === "httpRequestBegin")
return pipelines.filter(p => p.executions >= httpRequestBegin.executions).map(p => ({
pipeline: p.pipeline,
wallTimePerRequest: p.wallTime / httpRequestBegin.executions
}));
}
console.table(pipelinesPerRequest())
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment