Created
July 5, 2019 06:49
-
-
Save richardszalay/f12027c0c3dea84c0fc0f40fe0ae8fbf to your computer and use it in GitHub Desktop.
Sitecore Pipelines admin tool :: Per Request Wall Time Summary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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