New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

perfops-rom

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perfops-rom - npm Package Compare versions

Comparing version 1.1.6-rc.2 to 1.1.6

141

dist/rom.js

@@ -40,3 +40,3 @@ "use strict";

var clientKey = window.rum ? window.rum.key : undefined; // eslint-disable-next-line no-unused-vars
var clientKey = window.rum ? window.rum.key : undefined;

@@ -61,7 +61,3 @@ function formatTiming(value) {

xhr.onload = function () {
if (xhr.status >= 200 && xhr.status < 300) {
return resolve(xhr);
}
xhr.onerror();
return resolve(xhr);
};

@@ -102,2 +98,5 @@

var timing = performance.getEntriesByName(url)[0];
var result = {
id: resource.id
};
var dnsLookupTime = formatTiming(timing.domainLookupEnd - timing.domainLookupStart);

@@ -109,11 +108,27 @@ var tcpTime = formatTiming(timing.connectEnd - timing.connectStart); // In Firefox if connection was cached - secure connection time is calculated

var sslTime = tcpTime > 0 ? formatTiming(timing.connectEnd - timing.secureConnectionStart) : 0;
return {
id: resource.id,
up: 1,
time: Number((timing.responseEnd - timing.requestStart).toFixed(2)),
dnsLookupTime: dnsLookupTime,
tcpTime: tcpTime,
sslTime: sslTime,
headers: xhr.getAllResponseHeaders()
};
if (xhr.status >= 200 && xhr.status < 300) {
// Add success response measurements
result = Object.assign({}, result, {
up: 1,
time: Number((timing.responseEnd - timing.requestStart).toFixed(2)),
dnsLookupTime: dnsLookupTime,
tcpTime: tcpTime,
sslTime: sslTime,
headers: xhr.getAllResponseHeaders()
});
}
if (xhr.status >= 300 && xhr.status <= 500) {
// HTTP Redirect/Error
result = Object.assign({}, result, {
up: 0,
dnsLookupTime: dnsLookupTime,
tcpTime: tcpTime,
sslTime: sslTime,
headers: xhr.getAllResponseHeaders()
});
}
return result;
}).catch(function () {

@@ -155,2 +170,10 @@ return {

}, {
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 22,

@@ -160,18 +183,14 @@ "cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",

}, {
"id": 34,
"cdnUrl": "https://www.superveda.net/500b-bench.jpg",
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-bench.jpg",
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/5002b-bench.jpg",
"p": "1"
}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"
}, {
"id": 9,

@@ -181,34 +200,26 @@ "cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",

}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": "1"
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"p": "1"
}, {
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/5002b-bench.jpg",
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"p": "1"
}, {
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 11,

@@ -218,22 +229,26 @@ "cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",

}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": "1"
}, {
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"
}, {
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"id": 17,
"cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",
"p": "1"
}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"p": "1"
}, {
"id": 3,

@@ -243,12 +258,12 @@ "cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",

}, {
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 17,
"cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",
"p": "1"
"id": 34,
"cdnUrl": "https://www.superveda.net/500b-bench.jpg",
"p": "0"
}, {
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": "1"

@@ -255,0 +270,0 @@ }]

@@ -1,1 +0,1 @@

"use strict";function _toConsumableArray(n){return _arrayWithoutHoles(n)||_iterableToArray(n)||_unsupportedIterableToArray(n)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(n,t){if(n){if("string"==typeof n)return _arrayLikeToArray(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_arrayLikeToArray(n,t):void 0}}function _iterableToArray(n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(n))return Array.from(n)}function _arrayWithoutHoles(n){if(Array.isArray(n))return _arrayLikeToArray(n)}function _arrayLikeToArray(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}!function(d){var n,i="https://devnull.perfops.net",s="https://api.perfops.net/rum-cdn.php",p=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},u=t.logInfo,l=t.logError,h=window.rum?window.rum.key:void 0;function f(n){return Math.max(0,Number(n.toFixed(2)))}function b(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,o=void 0===e?function(){}:e,c=t.data,a=t.method,i=void 0===a?"GET":a,s=t.timeout,p=void 0===s?3e3:s;return new d(function(n,t){var e=new XMLHttpRequest;e.onload=function(){if(200<=e.status&&e.status<300)return n(e);e.onerror()},e.onerror=e.ontimeout=function(){l(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(i,r),e.timeout=p,o(e),e.send(c)})}function e(){function t(n){var t=0<arguments.length&&void 0!==n&&n;if(u("Try to store ".concat(o.length," items")),a&&0===o.length&&(u("Store data interval cleared"),clearInterval(r)),o.length<1)u("Batch is empty");else if(o.length<3&&!t)u("Batch is to small. Wait for more results");else{var e=o.reduce(function(n,t){return n+(2e3<t.time?1:0)},0);if(e===o.length)return u("Skip batch of a ".concat(e," slow probes")),void o.splice(0,e);(function(n,t){return b("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).catch(function(n){throw l(n),t})})(c,o.splice(0,o.length)).then(function(){return u("Results stored")}).catch(function(n){var t;return(t=o).push.apply(t,_toConsumableArray(n))})}}var r,o=[],c={ua:navigator.userAgent,hostname:window.location.hostname,client:h},a=!1,e=0;setTimeout(function n(){a=!1,clearInterval(r),o=[],r=setInterval(t,1e3),function(){var t="perfops-rum-resources",n=JSON.parse(window.localStorage.getItem(t));return n&&n.expiry>Date.now()?d.resolve(n.data):b(s).then(function(n){return JSON.parse(n.response)}).then(function(n){if(!n||!n.data||!n.data.length)throw new Error("Empty response.data");return window.localStorage.setItem(t,JSON.stringify({data:n.data,expiry:Date.now()+p})),n.data}).catch(function(){return{data:[{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-bench.jpg",p:"0"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:34,cdnUrl:"https://www.superveda.net/500b-bench.jpg",p:"0"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-bench.jpg",p:"0"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-bench.jpg",p:"0"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"}]}})}().then(function(n){var e;return function(n,r){return n.reduce(function(n,e){return n.then(function(t){return r(e).then(function(n){return t.push(n),t})})},d.resolve([]))}((e=n,Array.from(Array(Math.ceil(e.length/3)),function(n,t){return e.slice(3*t,3*t+3)})),function(n){var t=0;return d.all(n.map(function(n){return function(c){var a="".concat(c.cdnUrl,"?t=").concat(Date.now());return b(a).then(function(n){var t=performance.getEntriesByName(a)[0],e=f(t.domainLookupEnd-t.domainLookupStart),r=f(t.connectEnd-t.connectStart),o=0<r?f(t.connectEnd-t.secureConnectionStart):0;return{id:c.id,up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:e,tcpTime:r,sslTime:o,headers:n.getAllResponseHeaders()}}).catch(function(){return{id:c.id,up:0}})}(n).then(function(n){n.up||t++,1<t||n.up&&(n.time<3||3e3<n.time)||o.push(n)})}))})}).then(u,l).then(function(){e+=1,t(a=!0)}).then(function(){e<3&&setTimeout(n,6e4)})},1e3)}n=function(){var n=["bot","headless","google","baidu","bing","msn","duckduckbot","teoma","slurp","yandex","phantomjs","pingdom","ahrefsbot"].join("|");if(new RegExp(n,"i").test(window.navigator.userAgent))console.warn("PerfOps RUM not launching due to suspicious userAgent:",window.navigator.userAgent);else if(void 0!==window.performance){if(performance.onresourcetimingbufferfull=function(){u("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return e();!function(n,t){var e,r=document.createElement("script");r.onreadystatechange=r.onload=function(){e||t(),e=!0},r.setAttribute("src",n),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){d=window.ES6Promise,e()})}},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(d){var e,i="https://devnull.perfops.net",s="https://api.perfops.net/rum-cdn.php",p=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},u=t.logInfo,l=t.logError,h=window.rum?window.rum.key:void 0;function f(e){return Math.max(0,Number(e.toFixed(2)))}function m(r,e){var t=1<arguments.length&&void 0!==e?e:{},n=t.cb,o=void 0===n?function(){}:n,c=t.data,a=t.method,i=void 0===a?"GET":a,s=t.timeout,p=void 0===s?3e3:s;return new d(function(e,t){var n=new XMLHttpRequest;n.onload=function(){return e(n)},n.onerror=n.ontimeout=function(){l(n),t(new Error("Status ".concat(n.status,". Response: ").concat(n.statusText)))},n.open(i,r),n.timeout=p,o(n),n.send(c)})}function n(){function t(e){var t=0<arguments.length&&void 0!==e&&e;if(u("Try to store ".concat(o.length," items")),a&&0===o.length&&(u("Store data interval cleared"),clearInterval(r)),o.length<1)u("Batch is empty");else if(o.length<3&&!t)u("Batch is to small. Wait for more results");else{var n=o.reduce(function(e,t){return e+(2e3<t.time?1:0)},0);if(n===o.length)return u("Skip batch of a ".concat(n," slow probes")),void o.splice(0,n);(function(e,t){return m("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:e,data:t}),method:"POST"}).catch(function(e){throw l(e),t})})(c,o.splice(0,o.length)).then(function(){return u("Results stored")}).catch(function(e){var t;return(t=o).push.apply(t,_toConsumableArray(e))})}}var r,o=[],c={ua:navigator.userAgent,hostname:window.location.hostname,client:h},a=!1,n=0;setTimeout(function e(){a=!1,clearInterval(r),o=[],r=setInterval(t,1e3),function(){var t="perfops-rum-resources",e=JSON.parse(window.localStorage.getItem(t));return e&&e.expiry>Date.now()?d.resolve(e.data):m(s).then(function(e){return JSON.parse(e.response)}).then(function(e){if(!e||!e.data||!e.data.length)throw new Error("Empty response.data");return window.localStorage.setItem(t,JSON.stringify({data:e.data,expiry:Date.now()+p})),e.data}).catch(function(){return{data:[{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-bench.jpg",p:"0"},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-bench.jpg",p:"0"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-bench.jpg",p:"0"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"1"},{id:34,cdnUrl:"https://www.superveda.net/500b-bench.jpg",p:"0"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"}]}})}().then(function(e){var n;return function(e,r){return e.reduce(function(e,n){return e.then(function(t){return r(n).then(function(e){return t.push(e),t})})},d.resolve([]))}((n=e,Array.from(Array(Math.ceil(n.length/3)),function(e,t){return n.slice(3*t,3*t+3)})),function(e){var t=0;return d.all(e.map(function(e){return function(a){var i="".concat(a.cdnUrl,"?t=").concat(Date.now());return m(i).then(function(e){var t=performance.getEntriesByName(i)[0],n={id:a.id},r=f(t.domainLookupEnd-t.domainLookupStart),o=f(t.connectEnd-t.connectStart),c=0<o?f(t.connectEnd-t.secureConnectionStart):0;return 200<=e.status&&e.status<300&&(n=Object.assign({},n,{up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:r,tcpTime:o,sslTime:c,headers:e.getAllResponseHeaders()})),300<=e.status&&e.status<=500&&(n=Object.assign({},n,{up:0,dnsLookupTime:r,tcpTime:o,sslTime:c,headers:e.getAllResponseHeaders()})),n}).catch(function(){return{id:a.id,up:0}})}(e).then(function(e){e.up||t++,1<t||e.up&&(e.time<3||3e3<e.time)||o.push(e)})}))})}).then(u,l).then(function(){n+=1,t(a=!0)}).then(function(){n<3&&setTimeout(e,6e4)})},1e3)}e=function(){var e=["bot","headless","google","baidu","bing","msn","duckduckbot","teoma","slurp","yandex","phantomjs","pingdom","ahrefsbot"].join("|");if(new RegExp(e,"i").test(window.navigator.userAgent))console.warn("PerfOps RUM not launching due to suspicious userAgent:",window.navigator.userAgent);else if(void 0!==window.performance){if(performance.onresourcetimingbufferfull=function(){u("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return n();!function(e,t){var n,r=document.createElement("script");r.onreadystatechange=r.onload=function(){n||t(),n=!0},r.setAttribute("src",e),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){d=window.ES6Promise,n()})}},"complete"===document.readyState?e():window.addEventListener("load",e)}(window.Promise);

@@ -40,3 +40,3 @@ "use strict";

var clientKey = window.rum ? window.rum.key : undefined; // eslint-disable-next-line no-unused-vars
var clientKey = window.rum ? window.rum.key : undefined;

@@ -61,7 +61,3 @@ function formatTiming(value) {

xhr.onload = function () {
if (xhr.status >= 200 && xhr.status < 300) {
return resolve(xhr);
}
xhr.onerror();
return resolve(xhr);
};

@@ -102,2 +98,5 @@

var timing = performance.getEntriesByName(url)[0];
var result = {
id: resource.id
};
var dnsLookupTime = formatTiming(timing.domainLookupEnd - timing.domainLookupStart);

@@ -109,11 +108,27 @@ var tcpTime = formatTiming(timing.connectEnd - timing.connectStart); // In Firefox if connection was cached - secure connection time is calculated

var sslTime = tcpTime > 0 ? formatTiming(timing.connectEnd - timing.secureConnectionStart) : 0;
return {
id: resource.id,
up: 1,
time: Number((timing.responseEnd - timing.requestStart).toFixed(2)),
dnsLookupTime: dnsLookupTime,
tcpTime: tcpTime,
sslTime: sslTime,
headers: xhr.getAllResponseHeaders()
};
if (xhr.status >= 200 && xhr.status < 300) {
// Add success response measurements
result = Object.assign({}, result, {
up: 1,
time: Number((timing.responseEnd - timing.requestStart).toFixed(2)),
dnsLookupTime: dnsLookupTime,
tcpTime: tcpTime,
sslTime: sslTime,
headers: xhr.getAllResponseHeaders()
});
}
if (xhr.status >= 300 && xhr.status <= 500) {
// HTTP Redirect/Error
result = Object.assign({}, result, {
up: 0,
dnsLookupTime: dnsLookupTime,
tcpTime: tcpTime,
sslTime: sslTime,
headers: xhr.getAllResponseHeaders()
});
}
return result;
}).catch(function () {

@@ -155,2 +170,10 @@ return {

}, {
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 22,

@@ -160,18 +183,14 @@ "cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",

}, {
"id": 34,
"cdnUrl": "https://www.superveda.net/500b-bench.jpg",
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-bench.jpg",
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/5002b-bench.jpg",
"p": "1"
}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"
}, {
"id": 9,

@@ -181,34 +200,26 @@ "cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",

}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": "1"
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"p": "1"
}, {
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/5002b-bench.jpg",
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"p": "1"
}, {
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 11,

@@ -218,22 +229,26 @@ "cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",

}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": "1"
}, {
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"
}, {
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"id": 17,
"cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",
"p": "1"
}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"p": "1"
}, {
"id": 3,

@@ -243,12 +258,12 @@ "cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",

}, {
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 17,
"cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",
"p": "1"
"id": 34,
"cdnUrl": "https://www.superveda.net/500b-bench.jpg",
"p": "0"
}, {
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": "1"

@@ -255,0 +270,0 @@ }]

@@ -1,1 +0,1 @@

"use strict";function _toConsumableArray(n){return _arrayWithoutHoles(n)||_iterableToArray(n)||_unsupportedIterableToArray(n)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(n,t){if(n){if("string"==typeof n)return _arrayLikeToArray(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_arrayLikeToArray(n,t):void 0}}function _iterableToArray(n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(n))return Array.from(n)}function _arrayWithoutHoles(n){if(Array.isArray(n))return _arrayLikeToArray(n)}function _arrayLikeToArray(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}!function(d){var n,i="https://devnull.perfops.net",s="https://api.perfops.net/rum-cdn.php",p=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},u=t.logInfo,l=t.logError,h=window.rum?window.rum.key:void 0;function f(n){return Math.max(0,Number(n.toFixed(2)))}function b(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,o=void 0===e?function(){}:e,c=t.data,a=t.method,i=void 0===a?"GET":a,s=t.timeout,p=void 0===s?3e3:s;return new d(function(n,t){var e=new XMLHttpRequest;e.onload=function(){if(200<=e.status&&e.status<300)return n(e);e.onerror()},e.onerror=e.ontimeout=function(){l(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(i,r),e.timeout=p,o(e),e.send(c)})}function e(){function t(n){var t=0<arguments.length&&void 0!==n&&n;if(u("Try to store ".concat(o.length," items")),a&&0===o.length&&(u("Store data interval cleared"),clearInterval(r)),o.length<1)u("Batch is empty");else if(o.length<3&&!t)u("Batch is to small. Wait for more results");else{var e=o.reduce(function(n,t){return n+(2e3<t.time?1:0)},0);if(e===o.length)return u("Skip batch of a ".concat(e," slow probes")),void o.splice(0,e);(function(n,t){return b("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).catch(function(n){throw l(n),t})})(c,o.splice(0,o.length)).then(function(){return u("Results stored")}).catch(function(n){var t;return(t=o).push.apply(t,_toConsumableArray(n))})}}var r,o=[],c={ua:navigator.userAgent,hostname:window.location.hostname,client:h},a=!1,e=0;setTimeout(function n(){a=!1,clearInterval(r),o=[],r=setInterval(t,1e3),function(){var t="perfops-rum-resources",n=JSON.parse(window.localStorage.getItem(t));return n&&n.expiry>Date.now()?d.resolve(n.data):b(s).then(function(n){return JSON.parse(n.response)}).then(function(n){if(!n||!n.data||!n.data.length)throw new Error("Empty response.data");return window.localStorage.setItem(t,JSON.stringify({data:n.data,expiry:Date.now()+p})),n.data}).catch(function(){return{data:[{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-bench.jpg",p:"0"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:34,cdnUrl:"https://www.superveda.net/500b-bench.jpg",p:"0"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-bench.jpg",p:"0"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-bench.jpg",p:"0"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"}]}})}().then(function(n){var e;return function(n,r){return n.reduce(function(n,e){return n.then(function(t){return r(e).then(function(n){return t.push(n),t})})},d.resolve([]))}((e=n,Array.from(Array(Math.ceil(e.length/3)),function(n,t){return e.slice(3*t,3*t+3)})),function(n){var t=0;return d.all(n.map(function(n){return function(c){var a="".concat(c.cdnUrl,"?t=").concat(Date.now());return b(a).then(function(n){var t=performance.getEntriesByName(a)[0],e=f(t.domainLookupEnd-t.domainLookupStart),r=f(t.connectEnd-t.connectStart),o=0<r?f(t.connectEnd-t.secureConnectionStart):0;return{id:c.id,up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:e,tcpTime:r,sslTime:o,headers:n.getAllResponseHeaders()}}).catch(function(){return{id:c.id,up:0}})}(n).then(function(n){n.up||t++,1<t||n.up&&(n.time<3||3e3<n.time)||o.push(n)})}))})}).then(u,l).then(function(){e+=1,t(a=!0)}).then(function(){e<3&&setTimeout(n,6e4)})},3e3)}n=function(){var n=["bot","headless","google","baidu","bing","msn","duckduckbot","teoma","slurp","yandex","phantomjs","pingdom","ahrefsbot"].join("|");if(new RegExp(n,"i").test(window.navigator.userAgent))console.warn("PerfOps RUM not launching due to suspicious userAgent:",window.navigator.userAgent);else if(void 0!==window.performance){if(performance.onresourcetimingbufferfull=function(){u("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return e();!function(n,t){var e,r=document.createElement("script");r.onreadystatechange=r.onload=function(){e||t(),e=!0},r.setAttribute("src",n),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){d=window.ES6Promise,e()})}},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(d){var e,i="https://devnull.perfops.net",s="https://api.perfops.net/rum-cdn.php",p=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},u=t.logInfo,l=t.logError,h=window.rum?window.rum.key:void 0;function f(e){return Math.max(0,Number(e.toFixed(2)))}function m(r,e){var t=1<arguments.length&&void 0!==e?e:{},n=t.cb,o=void 0===n?function(){}:n,c=t.data,a=t.method,i=void 0===a?"GET":a,s=t.timeout,p=void 0===s?3e3:s;return new d(function(e,t){var n=new XMLHttpRequest;n.onload=function(){return e(n)},n.onerror=n.ontimeout=function(){l(n),t(new Error("Status ".concat(n.status,". Response: ").concat(n.statusText)))},n.open(i,r),n.timeout=p,o(n),n.send(c)})}function n(){function t(e){var t=0<arguments.length&&void 0!==e&&e;if(u("Try to store ".concat(o.length," items")),a&&0===o.length&&(u("Store data interval cleared"),clearInterval(r)),o.length<1)u("Batch is empty");else if(o.length<3&&!t)u("Batch is to small. Wait for more results");else{var n=o.reduce(function(e,t){return e+(2e3<t.time?1:0)},0);if(n===o.length)return u("Skip batch of a ".concat(n," slow probes")),void o.splice(0,n);(function(e,t){return m("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:e,data:t}),method:"POST"}).catch(function(e){throw l(e),t})})(c,o.splice(0,o.length)).then(function(){return u("Results stored")}).catch(function(e){var t;return(t=o).push.apply(t,_toConsumableArray(e))})}}var r,o=[],c={ua:navigator.userAgent,hostname:window.location.hostname,client:h},a=!1,n=0;setTimeout(function e(){a=!1,clearInterval(r),o=[],r=setInterval(t,1e3),function(){var t="perfops-rum-resources",e=JSON.parse(window.localStorage.getItem(t));return e&&e.expiry>Date.now()?d.resolve(e.data):m(s).then(function(e){return JSON.parse(e.response)}).then(function(e){if(!e||!e.data||!e.data.length)throw new Error("Empty response.data");return window.localStorage.setItem(t,JSON.stringify({data:e.data,expiry:Date.now()+p})),e.data}).catch(function(){return{data:[{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-bench.jpg",p:"0"},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-bench.jpg",p:"0"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-bench.jpg",p:"0"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"1"},{id:34,cdnUrl:"https://www.superveda.net/500b-bench.jpg",p:"0"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"}]}})}().then(function(e){var n;return function(e,r){return e.reduce(function(e,n){return e.then(function(t){return r(n).then(function(e){return t.push(e),t})})},d.resolve([]))}((n=e,Array.from(Array(Math.ceil(n.length/3)),function(e,t){return n.slice(3*t,3*t+3)})),function(e){var t=0;return d.all(e.map(function(e){return function(a){var i="".concat(a.cdnUrl,"?t=").concat(Date.now());return m(i).then(function(e){var t=performance.getEntriesByName(i)[0],n={id:a.id},r=f(t.domainLookupEnd-t.domainLookupStart),o=f(t.connectEnd-t.connectStart),c=0<o?f(t.connectEnd-t.secureConnectionStart):0;return 200<=e.status&&e.status<300&&(n=Object.assign({},n,{up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:r,tcpTime:o,sslTime:c,headers:e.getAllResponseHeaders()})),300<=e.status&&e.status<=500&&(n=Object.assign({},n,{up:0,dnsLookupTime:r,tcpTime:o,sslTime:c,headers:e.getAllResponseHeaders()})),n}).catch(function(){return{id:a.id,up:0}})}(e).then(function(e){e.up||t++,1<t||e.up&&(e.time<3||3e3<e.time)||o.push(e)})}))})}).then(u,l).then(function(){n+=1,t(a=!0)}).then(function(){n<3&&setTimeout(e,6e4)})},3e3)}e=function(){var e=["bot","headless","google","baidu","bing","msn","duckduckbot","teoma","slurp","yandex","phantomjs","pingdom","ahrefsbot"].join("|");if(new RegExp(e,"i").test(window.navigator.userAgent))console.warn("PerfOps RUM not launching due to suspicious userAgent:",window.navigator.userAgent);else if(void 0!==window.performance){if(performance.onresourcetimingbufferfull=function(){u("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return n();!function(e,t){var n,r=document.createElement("script");r.onreadystatechange=r.onload=function(){n||t(),n=!0},r.setAttribute("src",e),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){d=window.ES6Promise,n()})}},"complete"===document.readyState?e():window.addEventListener("load",e)}(window.Promise);
{
"name": "perfops-rom",
"version": "1.1.6-rc.2",
"version": "1.1.6",
"jsdelivr": "./dist/rom3.min.js",

@@ -5,0 +5,0 @@ "description": "RUM code for https://perfops.net/",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc