Comparing version 2.3.0 to 2.3.1
# CHANGELOG - PageXray | ||
version 2.3.1 2018-05-15 | ||
------------------------ | ||
### Fixed | ||
* If one of the WebPageTest runs failed, PageXray was broken. | ||
version 2.3.0 2018-05-12 | ||
@@ -4,0 +9,0 @@ ------------------------ |
@@ -8,32 +8,37 @@ 'use strict'; | ||
const pageXrayPage = pages[i]; | ||
pageXrayPage.visualMetrics = {}; | ||
if (harPage._lastVisualChange) { | ||
pageXrayPage.visualMetrics.LastVisualChange = harPage._lastVisualChange; | ||
} | ||
if (harPage._SpeedIndex) { | ||
pageXrayPage.visualMetrics.SpeedIndex = harPage._SpeedIndex; | ||
} | ||
if (harPage.pageTimings._startRender) { | ||
pageXrayPage.visualMetrics.FirstVisualChange = | ||
harPage.pageTimings._startRender; | ||
} | ||
if (harPage._visualComplete85) { | ||
pageXrayPage.visualMetrics.VisualComplete85 = harPage._visualComplete85; | ||
} | ||
// sometimes we WebPageTest doesn't send data for that page, if the run failed | ||
if (pageXrayPage) { | ||
pageXrayPage.visualMetrics = {}; | ||
if (harPage._lastVisualChange) { | ||
pageXrayPage.visualMetrics.LastVisualChange = | ||
harPage._lastVisualChange; | ||
} | ||
if (harPage._SpeedIndex) { | ||
pageXrayPage.visualMetrics.SpeedIndex = harPage._SpeedIndex; | ||
} | ||
if (harPage.pageTimings._startRender) { | ||
pageXrayPage.visualMetrics.FirstVisualChange = | ||
harPage.pageTimings._startRender; | ||
} | ||
if (harPage._visualComplete85) { | ||
pageXrayPage.visualMetrics.VisualComplete85 = | ||
harPage._visualComplete85; | ||
} | ||
pageXrayPage.meta.title = harPage.title; | ||
pageXrayPage.meta.title = harPage.title; | ||
// take the CPU data that starts with _cpu and remove | ||
// the _cpu part | ||
const cpu = Object.keys(harPage) | ||
.filter(metricName => { | ||
return metricName.indexOf('_cpu') === 0; | ||
}) | ||
.reduce((cpuData, name) => { | ||
cpuData[name.split('.')[1]] = harPage[name]; | ||
return cpuData; | ||
}, {}); | ||
if (Object.keys(cpu).length > 0) { | ||
pageXrayPage.cpu = {}; | ||
pageXrayPage.cpu.events = cpu; | ||
// take the CPU data that starts with _cpu and remove | ||
// the _cpu part | ||
const cpu = Object.keys(harPage) | ||
.filter(metricName => { | ||
return metricName.indexOf('_cpu') === 0; | ||
}) | ||
.reduce((cpuData, name) => { | ||
cpuData[name.split('.')[1]] = harPage[name]; | ||
return cpuData; | ||
}, {}); | ||
if (Object.keys(cpu).length > 0) { | ||
pageXrayPage.cpu = {}; | ||
pageXrayPage.cpu.events = cpu; | ||
} | ||
} | ||
@@ -40,0 +45,0 @@ } |
{ | ||
"name": "pagexray", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Xray your HAR file and know all about the page", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36402
689