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.3 to 1.1.4

87

dist/rom.js

@@ -19,5 +19,4 @@ "use strict";

var RESOURCES_TTL = 5 * 60 * 1000; // Resources list TTL in the LocalStorage
// const REPEAT_DELAY = 60 * 1000; // How often the script will measure CDN performance while user staying on the same page
var REPEAT_DELAY = 60 * 1000; // How often the script will measure CDN performance while user staying on the same page
var STORE_DATA_INTERVAL = 1000; // How often we should try to send data to the rum-parser

@@ -161,6 +160,10 @@

"data": [{
"id": 17,
"cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",
"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": 30,

@@ -170,6 +173,10 @@ "cdnUrl": "https://perfops.doracdn.com/500b-bench.jpg",

}, {
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": "1"
}, {
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 2,

@@ -179,29 +186,25 @@ "cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",

}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"p": "1"
}, {
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/5002b-bench.jpg",
"p": "1"
}, {
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"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",
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": "1"
}, {
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
}, {

@@ -212,24 +215,24 @@ "id": 22,

}, {
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"p": "1"
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"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",
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": "1"
}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"p": "1"
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"

@@ -241,13 +244,9 @@ }, {

}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/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",
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"p": "1"
}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"p": "1"
}]

@@ -376,4 +375,2 @@ };

store(true);
}).then(function () {
return setTimeout(processor, REPEAT_DELAY);
});

@@ -380,0 +377,0 @@ }; // eslint-disable-next-line comma-dangle

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

"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",n="https://api.perfops.net/rum-cdn.php",s=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},p=t.logInfo,u=t.logError,l=window.rum?window.rum.key:void 0;function f(e){return Math.max(0,Number(e.toFixed(2)))}function h(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(){u(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 r(){function t(e){var t=0<arguments.length&&void 0!==e&&e;if(p("Try to store ".concat(o.length," items")),a&&0===o.length&&(p("Store data interval cleared"),clearInterval(r)),o.length<1)p("Batch is empty");else if(o.length<3&&!t)p("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 p("Skip batch of a ".concat(n," slow probes")),void o.splice(0,n);(function(e,t){return h("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:e,data:t}),method:"POST"}).catch(function(e){throw u(e),t})})(c,o.splice(0,o.length)).then(function(){return p("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:l},a=!1;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):h(n).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()+s})),e.data}).catch(function(){return{data:[{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"0"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{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:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/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:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.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:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.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 h(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(p,u).then(function(){t(a=!0)}).then(function(){return 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(){p("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return r();!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,r()})}},"complete"===document.readyState?e():window.addEventListener("load",e)}(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",n="https://api.perfops.net/rum-cdn.php",s=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},p=t.logInfo,u=t.logError,l=window.rum?window.rum.key:void 0;function f(e){return Math.max(0,Number(e.toFixed(2)))}function h(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(){u(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 r(){function e(e){var t=0<arguments.length&&void 0!==e&&e;if(p("Try to store ".concat(o.length," items")),a&&0===o.length&&(p("Store data interval cleared"),clearInterval(r)),o.length<1)p("Batch is empty");else if(o.length<3&&!t)p("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 p("Skip batch of a ".concat(n," slow probes")),void o.splice(0,n);(function(e,t){return h("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:e,data:t}),method:"POST"}).catch(function(e){throw u(e),t})})(c,o.splice(0,o.length)).then(function(){return p("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:l},a=!1;setTimeout(function(){a=!1,clearInterval(r),o=[],r=setInterval(e,1e3),function(){var t="perfops-rum-resources",e=JSON.parse(window.localStorage.getItem(t));return e&&e.expiry>Date.now()?d.resolve(e.data):h(n).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()+s})),e.data}).catch(function(){return{data:[{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:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"0"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.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:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-bench.jpg",p:"0"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:18,cdnUrl:"https://azure-perfops.azureedge.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:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.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 h(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(p,u).then(function(){e(a=!0)})},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(){p("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return r();!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,r()})}},"complete"===document.readyState?e():window.addEventListener("load",e)}(window.Promise);

@@ -19,5 +19,4 @@ "use strict";

var RESOURCES_TTL = 5 * 60 * 1000; // Resources list TTL in the LocalStorage
// const REPEAT_DELAY = 60 * 1000; // How often the script will measure CDN performance while user staying on the same page
var REPEAT_DELAY = 60 * 1000; // How often the script will measure CDN performance while user staying on the same page
var STORE_DATA_INTERVAL = 1000; // How often we should try to send data to the rum-parser

@@ -161,6 +160,10 @@

"data": [{
"id": 17,
"cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",
"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": 30,

@@ -170,6 +173,10 @@ "cdnUrl": "https://perfops.doracdn.com/500b-bench.jpg",

}, {
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": "1"
}, {
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 2,

@@ -179,29 +186,25 @@ "cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",

}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"p": "1"
}, {
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
}, {
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/5002b-bench.jpg",
"p": "1"
}, {
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"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",
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": "1"
}, {
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
"id": 29,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-bench.jpg",
"p": "0"
}, {

@@ -212,24 +215,24 @@ "id": 22,

}, {
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"p": "1"
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"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",
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": "1"
}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"p": "1"
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"

@@ -241,13 +244,9 @@ }, {

}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/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",
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"p": "1"
}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"p": "1"
}]

@@ -376,4 +375,2 @@ };

store(true);
}).then(function () {
return setTimeout(processor, REPEAT_DELAY);
});

@@ -380,0 +377,0 @@ }; // eslint-disable-next-line comma-dangle

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

"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",n="https://api.perfops.net/rum-cdn.php",s=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},p=t.logInfo,u=t.logError,l=window.rum?window.rum.key:void 0;function f(e){return Math.max(0,Number(e.toFixed(2)))}function h(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(){u(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 r(){function t(e){var t=0<arguments.length&&void 0!==e&&e;if(p("Try to store ".concat(o.length," items")),a&&0===o.length&&(p("Store data interval cleared"),clearInterval(r)),o.length<1)p("Batch is empty");else if(o.length<3&&!t)p("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 p("Skip batch of a ".concat(n," slow probes")),void o.splice(0,n);(function(e,t){return h("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:e,data:t}),method:"POST"}).catch(function(e){throw u(e),t})})(c,o.splice(0,o.length)).then(function(){return p("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:l},a=!1;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):h(n).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()+s})),e.data}).catch(function(){return{data:[{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"0"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{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:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/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:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.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:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.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 h(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(p,u).then(function(){t(a=!0)}).then(function(){return 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(){p("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return r();!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,r()})}},"complete"===document.readyState?e():window.addEventListener("load",e)}(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",n="https://api.perfops.net/rum-cdn.php",s=3e5,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},p=t.logInfo,u=t.logError,l=window.rum?window.rum.key:void 0;function f(e){return Math.max(0,Number(e.toFixed(2)))}function h(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(){u(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 r(){function e(e){var t=0<arguments.length&&void 0!==e&&e;if(p("Try to store ".concat(o.length," items")),a&&0===o.length&&(p("Store data interval cleared"),clearInterval(r)),o.length<1)p("Batch is empty");else if(o.length<3&&!t)p("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 p("Skip batch of a ".concat(n," slow probes")),void o.splice(0,n);(function(e,t){return h("".concat(i,"/rum/v1"),{data:JSON.stringify({metadata:e,data:t}),method:"POST"}).catch(function(e){throw u(e),t})})(c,o.splice(0,o.length)).then(function(){return p("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:l},a=!1;setTimeout(function(){a=!1,clearInterval(r),o=[],r=setInterval(e,1e3),function(){var t="perfops-rum-resources",e=JSON.parse(window.localStorage.getItem(t));return e&&e.expiry>Date.now()?d.resolve(e.data):h(n).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()+s})),e.data}).catch(function(){return{data:[{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:30,cdnUrl:"https://perfops.doracdn.com/500b-bench.jpg",p:"0"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/5002b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.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:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-bench.jpg",p:"0"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"0"},{id:18,cdnUrl:"https://azure-perfops.azureedge.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:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.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 h(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(p,u).then(function(){e(a=!0)})},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(){p("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof d)return r();!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,r()})}},"complete"===document.readyState?e():window.addEventListener("load",e)}(window.Promise);
{
"name": "perfops-rom",
"version": "1.1.3",
"version": "1.1.4",
"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