Skip to content

Commit

Permalink
show backend time #1595 next time refactor mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Apr 28, 2017
1 parent 39f2da7 commit 03e6cc3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/plugins/html/templates/url/summaryBox.pug
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ mixin getLinkTimings(path, name, metric, type)
td.number(data-title=type)
a(href='./' + index + '.html', title='Go to the run with the ' + type + ' ' + name) #{metric[name][type]}

mixin getLinkPageTimings(path, name, metric, type)
- isSet = false
if options.browsertime.iterations % 2 === 0 && type === 'median'
td.number(data-title=type) #{metric[name][type]}
else
each run, index in path
if (Number(run.timings.pageTimings[name]).toFixed(0) === Number(metric[name][type]).toFixed(0) && isSet === false)
- isSet = true
td.number(data-title=type)
a(href='./' + index + '.html', title='Go to the run with the ' + type + ' ' + name) #{metric[name][type]}


mixin getUserTimings(path, name, metric, type)
- isSet = false
if options.browsertime.iterations % 2 === 0 && type === 'median'
Expand Down Expand Up @@ -54,6 +66,13 @@ if btStatistics
+getLink(pageInfo.data.browsertime.pageSummary.visualMetrics, name, visualMetric, 'median')
td.number(data-title='mean') #{visualMetric.mean}
+getLink(pageInfo.data.browsertime.pageSummary.visualMetrics, name, visualMetric, 'max')
tr
td(data-title='metric') backEndTime
+getLinkPageTimings(pageInfo.data.browsertime.pageSummary.browserScripts, 'backEndTime', btStatistics.timings.pageTimings, 'min')
+getLinkPageTimings(pageInfo.data.browsertime.pageSummary.browserScripts, 'backEndTime', btStatistics.timings.pageTimings, 'median')
td.number(data-title='mean') #{btStatistics.timings.pageTimings.backEndTime.mean}
+getLinkPageTimings(pageInfo.data.browsertime.pageSummary.browserScripts, 'backEndTime', btStatistics.timings.pageTimings, 'max')

each timing in timingMetrics
if btStatistics.timings[timing]
tr
Expand Down

0 comments on commit 03e6cc3

Please sign in to comment.