diff --git a/app/node_views/results.html b/app/node_views/results.html index 65bde25..e4ab907 100644 --- a/app/node_views/results.html +++ b/app/node_views/results.html @@ -840,16 +840,7 @@
-
{{node.data.timestamp | number: 0}}
+
{{node.data.timestamp | number: 0}}
diff --git a/phantomas_custom/core/scopeYLT/scopeYLT.js b/phantomas_custom/core/scopeYLT/scopeYLT.js index 633548f..7bead6b 100644 --- a/phantomas_custom/core/scopeYLT/scopeYLT.js +++ b/phantomas_custom/core/scopeYLT/scopeYLT.js @@ -99,6 +99,7 @@ exports.module = function(phantomas) { function pushContext(data) { if (depth === 0 || deepAnalysis) { data.timestamp = Date.now() - responseEndTime; + data.loadingStep = phantomas.currentStep || ''; currentContext.addChild(data); } } @@ -107,6 +108,7 @@ exports.module = function(phantomas) { function enterContext(data) { if (depth === 0 || deepAnalysis) { data.timestamp = Date.now() - responseEndTime; + data.loadingStep = phantomas.currentStep || ''; currentContext = currentContext.addChild(data); } depth ++; diff --git a/phantomas_custom/modules/windowPerfYLT/windowPerfYLT.js b/phantomas_custom/modules/windowPerfYLT/windowPerfYLT.js index 656614d..6fa5588 100644 --- a/phantomas_custom/modules/windowPerfYLT/windowPerfYLT.js +++ b/phantomas_custom/modules/windowPerfYLT/windowPerfYLT.js @@ -34,6 +34,8 @@ exports.module = function(phantomas) { (function(phantomas) { phantomas.spyEnabled(false, 'installing window.performance metrics'); + phantomas.currentStep = 'domCreation'; + // extend window.performance // "init" event is sometimes fired twice, pass a value set by "responseEnd" event handler (fixes #192) if (typeof window.performance === 'undefined') { @@ -59,6 +61,7 @@ exports.module = function(phantomas) { : (Date.now() - responseEndTime); + phantomas.currentStep = 'domContentLoadedEnd'; phantomas.setMetric('domContentLoadedEnd', time, true); phantomas.log('Performance timing: document reached "DOMContentLoadedEnd" state after %d ms', time); @@ -72,6 +75,7 @@ exports.module = function(phantomas) { var time = Date.now() - responseEndTime; + phantomas.currentStep = 'domContentLoaded'; phantomas.setMetric('domContentLoaded', time, true); phantomas.log('Performance timing: document reached "DOMContentLoaded" state after %d ms', time); @@ -105,6 +109,7 @@ exports.module = function(phantomas) { return; } + phantomas.currentStep = metricName; phantomas.setMetric(metricName, time, true); phantomas.log('Performance timing: document reached "%s" state after %d ms', readyState, time);