Huge News!Announcing our $40M Series B led by Abstract Ventures.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.20 to 1.1.21

128

dist/rom.js

@@ -157,8 +157,4 @@ "use strict";

return [{
"id": 40,
"cdnUrl": "https://swifty-cdn.perfops.io/500b-sw-bench.jpg",
"p": 0
}, {
"id": 11,
"cdnUrl": "https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"p": 1

@@ -170,30 +166,34 @@ }, {

}, {
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",
"id": 40,
"cdnUrl": "https://swifty-cdn.perfops.io/500b-sw-bench.jpg",
"p": 0
}, {
"id": 41,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg",
"p": 0
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": 1
}, {
"id": 6,
"cdnUrl": "https://key-cdn.perfops.io/500b-key-bench.jpg",
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": 1
}, {
"id": 9,
"cdnUrl": "https://cdn77-cdn.perfops.io/500b-bench.jpg",
"id": 42,
"cdnUrl": "https://perfops.5centscdn.com/500b-5cents-bench.jpg",
"p": 1
}, {
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",
"p": 1
}, {
"id": 10,
"cdnUrl": "https://akamai-cdn.perfops.io/500b-bench.jpg",
"id": 11,
"cdnUrl": "https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",
"p": 1
}, {
"id": 22,
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",
"id": 38,
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg",
"p": 0
}, {
"id": 7,
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg",
"p": 1
}, {
"id": 2,

@@ -203,34 +203,22 @@ "cdnUrl": "https://ovh-cdn.perfops.io/500b-bench.jpg",

}, {
"id": 42,
"cdnUrl": "https://perfops.5centscdn.com/500b-5cents-bench.jpg",
"p": 0
}, {
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-db-bench.jpg",
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": 1
}, {
"id": 17,
"cdnUrl": "https://edgecast-cdn.perfops.io/500b-bench.jpg",
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",
"p": 1
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": 0
}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"p": 1
}, {
"id": 41,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg",
"id": 22,
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",
"p": 0
}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",
"id": 7,
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg",
"p": 1
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": 1
}, {
"id": 14,

@@ -240,2 +228,6 @@ "cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",

}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"p": 1
}, {
"id": 13,

@@ -245,29 +237,41 @@ "cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",

}, {
"id": 15,
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": 1
}, {
"id": 39,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": 0
}, {
"id": 10,
"cdnUrl": "https://akamai-cdn.perfops.io/500b-bench.jpg",
"p": 1
}, {
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": 1
}, {
"id": 39,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"id": 43,
"cdnUrl": "https://2-58.s.cdn13.com/500b-bench.jpg",
"p": 0
}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://key-cdn.perfops.io/500b-key-bench.jpg",
"p": 1
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 17,
"cdnUrl": "https://edgecast-cdn.perfops.io/500b-bench.jpg",
"p": 1
}, {
"id": 38,
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": 0
}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"id": 9,
"cdnUrl": "https://cdn77-cdn.perfops.io/500b-bench.jpg",
"p": 1
}, {
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-db-bench.jpg",
"p": 1
}];

@@ -331,8 +335,10 @@ });

// if 2 or more providers in one batch fail, drop all results
// if (
// down > 1 ||
// (data.up && (data.time < 3 || data.time > 3000))
// ) {
// return;
// }
if (down > 1 || data.up && (data.time < 3 || data.time > 3000)) {
return;
}
if (results.push(data) >= QUEUE_LIMIT) {

@@ -339,0 +345,0 @@ down = 0;

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

"use strict";!function(a){var n,t="https://devnull.perfops.net",o="https://rum-cdn.perfops.net/providers",r=3e5,c=6e4,i=3,e=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},s=e.logInfo,u=e.logError,p=window.rum?window.rum.key:void 0;function d(n){return Math.max(0,Number(n.toFixed(2)))}function h(o,n){var e=1<arguments.length&&void 0!==n?n:{},t=e.cb,r=void 0===t?function(){}:t,c=e.data,i=e.method,s=void 0===i?"GET":i,p=e.timeout,d=void 0===p?3e3:p;return new a(function(n,e){var t=new XMLHttpRequest;t.onload=function(){return n(t)},t.onerror=t.ontimeout=function(){u(t),e(new Error("Status ".concat(t.status,". Response: ").concat(t.statusText)))},t.open(s,o),t.timeout=d,r(t),t.send(c)})}function f(n){c=n.interval?1e3*parseInt(n.interval):c,n.repeats&&(i="Infinite"===n.repeats?Math.pow(2,32):parseInt(n.repeats))}function l(){var e=0;setTimeout(function n(){(function(){var e="perfops-rum-resources",n=JSON.parse(window.localStorage.getItem(e));return n&&n.expiry>Date.now()?(n.config&&f(n.config),a.resolve(n.data)):h(o).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(e,JSON.stringify({data:n.data,config:n.config,expiry:Date.now()+r})),n.config&&f(n.config),n.data}).catch(function(){return[{id:40,cdnUrl:"https://swifty-cdn.perfops.io/500b-sw-bench.jpg",p:0},{id:11,cdnUrl:"https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",p:1},{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:0},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:1},{id:6,cdnUrl:"https://key-cdn.perfops.io/500b-key-bench.jpg",p:1},{id:9,cdnUrl:"https://cdn77-cdn.perfops.io/500b-bench.jpg",p:1},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:1},{id:10,cdnUrl:"https://akamai-cdn.perfops.io/500b-bench.jpg",p:1},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:0},{id:7,cdnUrl:"https://google-cdn.perfops.io/500b-google-bench.jpg",p:1},{id:2,cdnUrl:"https://ovh-cdn.perfops.io/500b-bench.jpg",p:1},{id:42,cdnUrl:"https://perfops.5centscdn.com/500b-5cents-bench.jpg",p:0},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:1},{id:17,cdnUrl:"https://edgecast-cdn.perfops.io/500b-bench.jpg",p:1},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:0},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:1},{id:41,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:0},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:1},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:1},{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},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:1},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:1},{id:39,cdnUrl:"https://cdnperf-rum.cdnetworks.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:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:0},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:1}]})})().then(function(n){var e={ua:navigator.userAgent,hostname:window.location.hostname,client:p},t=[],o=0,r=0;return performance.clearResourceTimings(),function(n,o){return n.reduce(function(n,t){return n.then(function(e){return o(t).then(function(n){return e.push(n),e})})},a.resolve([]))}(n,function(n){return function(n){var c="".concat(n.cdnUrl,"?t=").concat(Date.now()),e=new URL(c).hostname,i={id:n.id,domain:e,online:navigator&&void 0!==navigator.onLine?Number(navigator.onLine):-1};return h(c).then(function(n){var e=performance.getEntriesByName(c)[0],t=d(e.domainLookupEnd-e.domainLookupStart),o=d(e.connectEnd-e.connectStart),r=0<o?d(e.connectEnd-e.secureConnectionStart):0;return 200<=n.status&&n.status<300&&(i=Object.assign({},i,{up:1,status:n.status,time:Number((e.responseEnd-e.requestStart).toFixed(2)),dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(i=Object.assign({},i,{up:0,status:n.status,dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),i}).catch(function(){return Object.assign({},i,{up:0,status:0})})}(n).then(function(n){if(n.up?2e3<n.time&&o++:r++,!(1<r||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(r=0,o<2?(o=0,g(e,t.splice(0,t.length))):(o=0,t.splice(0,t.length))):void 0})}).then(function(){if(r<=1&&t.length)return g(e,t)})}).then(s,u).then(function(){(e+=1)<i&&setTimeout(n,c)})},1e3)}function g(n,e){return h("".concat(t,"/rum/v1"),{data:JSON.stringify({metadata:n,data:e}),method:"POST"}).catch(u)}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(){s("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof a)return l();!function(n,e){var t=document.createElement("script"),o=!1;t.onreadystatechange=t.onload=function(){o||e(),o=!0},t.setAttribute("src",n),document.body.appendChild(t)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,l()})}},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
"use strict";!function(a){var n,t="https://devnull.perfops.net",o="https://rum-cdn.perfops.net/providers",r=3e5,c=6e4,i=3,e=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},s=e.logInfo,u=e.logError,p=window.rum?window.rum.key:void 0;function d(n){return Math.max(0,Number(n.toFixed(2)))}function h(o,n){var e=1<arguments.length&&void 0!==n?n:{},t=e.cb,r=void 0===t?function(){}:t,c=e.data,i=e.method,s=void 0===i?"GET":i,p=e.timeout,d=void 0===p?3e3:p;return new a(function(n,e){var t=new XMLHttpRequest;t.onload=function(){return n(t)},t.onerror=t.ontimeout=function(){u(t),e(new Error("Status ".concat(t.status,". Response: ").concat(t.statusText)))},t.open(s,o),t.timeout=d,r(t),t.send(c)})}function f(n){c=n.interval?1e3*parseInt(n.interval):c,n.repeats&&(i="Infinite"===n.repeats?Math.pow(2,32):parseInt(n.repeats))}function l(){var e=0;setTimeout(function n(){(function(){var e="perfops-rum-resources",n=JSON.parse(window.localStorage.getItem(e));return n&&n.expiry>Date.now()?(n.config&&f(n.config),a.resolve(n.data)):h(o).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(e,JSON.stringify({data:n.data,config:n.config,expiry:Date.now()+r})),n.config&&f(n.config),n.data}).catch(function(){return[{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:1},{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:0},{id:40,cdnUrl:"https://swifty-cdn.perfops.io/500b-sw-bench.jpg",p:0},{id:41,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:0},{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",p:1},{id:42,cdnUrl:"https://perfops.5centscdn.com/500b-5cents-bench.jpg",p:1},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:1},{id:11,cdnUrl:"https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",p:1},{id:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:0},{id:2,cdnUrl:"https://ovh-cdn.perfops.io/500b-bench.jpg",p:1},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:1},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:1},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:1},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:0},{id:7,cdnUrl:"https://google-cdn.perfops.io/500b-google-bench.jpg",p:1},{id:14,cdnUrl:"https://perfops.r.worldssl.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},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:1},{id:39,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:0},{id:10,cdnUrl:"https://akamai-cdn.perfops.io/500b-bench.jpg",p:1},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:1},{id:43,cdnUrl:"https://2-58.s.cdn13.com/500b-bench.jpg",p:0},{id:6,cdnUrl:"https://key-cdn.perfops.io/500b-key-bench.jpg",p:1},{id:17,cdnUrl:"https://edgecast-cdn.perfops.io/500b-bench.jpg",p:1},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:0},{id:9,cdnUrl:"https://cdn77-cdn.perfops.io/500b-bench.jpg",p:1},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:1}]})})().then(function(n){var e={ua:navigator.userAgent,hostname:window.location.hostname,client:p},t=[],o=0,r=0;return performance.clearResourceTimings(),function(n,o){return n.reduce(function(n,t){return n.then(function(e){return o(t).then(function(n){return e.push(n),e})})},a.resolve([]))}(n,function(n){return function(n){var c="".concat(n.cdnUrl,"?t=").concat(Date.now()),e=new URL(c).hostname,i={id:n.id,domain:e,online:navigator&&void 0!==navigator.onLine?Number(navigator.onLine):-1};return h(c).then(function(n){var e=performance.getEntriesByName(c)[0],t=d(e.domainLookupEnd-e.domainLookupStart),o=d(e.connectEnd-e.connectStart),r=0<o?d(e.connectEnd-e.secureConnectionStart):0;return 200<=n.status&&n.status<300&&(i=Object.assign({},i,{up:1,status:n.status,time:Number((e.responseEnd-e.requestStart).toFixed(2)),dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(i=Object.assign({},i,{up:0,status:n.status,dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),i}).catch(function(){return Object.assign({},i,{up:0,status:0})})}(n).then(function(n){if(n.up?2e3<n.time&&o++:r++,2<=t.push(n))return r=0,o<2?(o=0,g(e,t.splice(0,t.length))):(o=0,t.splice(0,t.length))})}).then(function(){if(r<=1&&t.length)return g(e,t)})}).then(s,u).then(function(){(e+=1)<i&&setTimeout(n,c)})},1e3)}function g(n,e){return h("".concat(t,"/rum/v1"),{data:JSON.stringify({metadata:n,data:e}),method:"POST"}).catch(u)}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(){s("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof a)return l();!function(n,e){var t=document.createElement("script"),o=!1;t.onreadystatechange=t.onload=function(){o||e(),o=!0},t.setAttribute("src",n),document.body.appendChild(t)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,l()})}},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);

@@ -157,8 +157,4 @@ "use strict";

return [{
"id": 40,
"cdnUrl": "https://swifty-cdn.perfops.io/500b-sw-bench.jpg",
"p": 0
}, {
"id": 11,
"cdnUrl": "https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"p": 1

@@ -170,30 +166,34 @@ }, {

}, {
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",
"id": 40,
"cdnUrl": "https://swifty-cdn.perfops.io/500b-sw-bench.jpg",
"p": 0
}, {
"id": 41,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg",
"p": 0
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": 1
}, {
"id": 6,
"cdnUrl": "https://key-cdn.perfops.io/500b-key-bench.jpg",
"id": 15,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": 1
}, {
"id": 9,
"cdnUrl": "https://cdn77-cdn.perfops.io/500b-bench.jpg",
"id": 42,
"cdnUrl": "https://perfops.5centscdn.com/500b-5cents-bench.jpg",
"p": 1
}, {
"id": 1,
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",
"p": 1
}, {
"id": 10,
"cdnUrl": "https://akamai-cdn.perfops.io/500b-bench.jpg",
"id": 11,
"cdnUrl": "https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",
"p": 1
}, {
"id": 22,
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",
"id": 38,
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg",
"p": 0
}, {
"id": 7,
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg",
"p": 1
}, {
"id": 2,

@@ -203,34 +203,22 @@ "cdnUrl": "https://ovh-cdn.perfops.io/500b-bench.jpg",

}, {
"id": 42,
"cdnUrl": "https://perfops.5centscdn.com/500b-5cents-bench.jpg",
"p": 0
}, {
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-db-bench.jpg",
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": 1
}, {
"id": 17,
"cdnUrl": "https://edgecast-cdn.perfops.io/500b-bench.jpg",
"id": 35,
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",
"p": 1
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": 0
}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"p": 1
}, {
"id": 41,
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg",
"id": 22,
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",
"p": 0
}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",
"id": 7,
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg",
"p": 1
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": 1
}, {
"id": 14,

@@ -240,2 +228,6 @@ "cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",

}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"p": 1
}, {
"id": 13,

@@ -245,29 +237,41 @@ "cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",

}, {
"id": 15,
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": 1
}, {
"id": 39,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"p": 0
}, {
"id": 10,
"cdnUrl": "https://akamai-cdn.perfops.io/500b-bench.jpg",
"p": 1
}, {
"id": 3,
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": 1
}, {
"id": 39,
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",
"id": 43,
"cdnUrl": "https://2-58.s.cdn13.com/500b-bench.jpg",
"p": 0
}, {
"id": 18,
"cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://key-cdn.perfops.io/500b-key-bench.jpg",
"p": 1
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 17,
"cdnUrl": "https://edgecast-cdn.perfops.io/500b-bench.jpg",
"p": 1
}, {
"id": 38,
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": 0
}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"id": 9,
"cdnUrl": "https://cdn77-cdn.perfops.io/500b-bench.jpg",
"p": 1
}, {
"id": 30,
"cdnUrl": "https://perfops.doracdn.com/500b-db-bench.jpg",
"p": 1
}];

@@ -331,8 +335,10 @@ });

// if 2 or more providers in one batch fail, drop all results
// if (
// down > 1 ||
// (data.up && (data.time < 3 || data.time > 3000))
// ) {
// return;
// }
if (down > 1 || data.up && (data.time < 3 || data.time > 3000)) {
return;
}
if (results.push(data) >= QUEUE_LIMIT) {

@@ -339,0 +345,0 @@ down = 0;

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

"use strict";!function(a){var n,t="https://devnull.perfops.net",o="https://rum-cdn.perfops.net/providers",r=3e5,c=6e4,i=3,e=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},s=e.logInfo,u=e.logError,p=window.rum?window.rum.key:void 0;function d(n){return Math.max(0,Number(n.toFixed(2)))}function h(o,n){var e=1<arguments.length&&void 0!==n?n:{},t=e.cb,r=void 0===t?function(){}:t,c=e.data,i=e.method,s=void 0===i?"GET":i,p=e.timeout,d=void 0===p?3e3:p;return new a(function(n,e){var t=new XMLHttpRequest;t.onload=function(){return n(t)},t.onerror=t.ontimeout=function(){u(t),e(new Error("Status ".concat(t.status,". Response: ").concat(t.statusText)))},t.open(s,o),t.timeout=d,r(t),t.send(c)})}function f(n){c=n.interval?1e3*parseInt(n.interval):c,n.repeats&&(i="Infinite"===n.repeats?Math.pow(2,32):parseInt(n.repeats))}function l(){var e=0;setTimeout(function n(){(function(){var e="perfops-rum-resources",n=JSON.parse(window.localStorage.getItem(e));return n&&n.expiry>Date.now()?(n.config&&f(n.config),a.resolve(n.data)):h(o).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(e,JSON.stringify({data:n.data,config:n.config,expiry:Date.now()+r})),n.config&&f(n.config),n.data}).catch(function(){return[{id:40,cdnUrl:"https://swifty-cdn.perfops.io/500b-sw-bench.jpg",p:0},{id:11,cdnUrl:"https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",p:1},{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:0},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:1},{id:6,cdnUrl:"https://key-cdn.perfops.io/500b-key-bench.jpg",p:1},{id:9,cdnUrl:"https://cdn77-cdn.perfops.io/500b-bench.jpg",p:1},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:1},{id:10,cdnUrl:"https://akamai-cdn.perfops.io/500b-bench.jpg",p:1},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:0},{id:7,cdnUrl:"https://google-cdn.perfops.io/500b-google-bench.jpg",p:1},{id:2,cdnUrl:"https://ovh-cdn.perfops.io/500b-bench.jpg",p:1},{id:42,cdnUrl:"https://perfops.5centscdn.com/500b-5cents-bench.jpg",p:0},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:1},{id:17,cdnUrl:"https://edgecast-cdn.perfops.io/500b-bench.jpg",p:1},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:0},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:1},{id:41,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:0},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:1},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:1},{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},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:1},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:1},{id:39,cdnUrl:"https://cdnperf-rum.cdnetworks.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:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:0},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:1}]})})().then(function(n){var e={ua:navigator.userAgent,hostname:window.location.hostname,client:p},t=[],o=0,r=0;return performance.clearResourceTimings(),function(n,o){return n.reduce(function(n,t){return n.then(function(e){return o(t).then(function(n){return e.push(n),e})})},a.resolve([]))}(n,function(n){return function(n){var c="".concat(n.cdnUrl,"?t=").concat(Date.now()),e=new URL(c).hostname,i={id:n.id,domain:e,online:navigator&&void 0!==navigator.onLine?Number(navigator.onLine):-1};return h(c).then(function(n){var e=performance.getEntriesByName(c)[0],t=d(e.domainLookupEnd-e.domainLookupStart),o=d(e.connectEnd-e.connectStart),r=0<o?d(e.connectEnd-e.secureConnectionStart):0;return 200<=n.status&&n.status<300&&(i=Object.assign({},i,{up:1,status:n.status,time:Number((e.responseEnd-e.requestStart).toFixed(2)),dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(i=Object.assign({},i,{up:0,status:n.status,dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),i}).catch(function(){return Object.assign({},i,{up:0,status:0})})}(n).then(function(n){if(n.up?2e3<n.time&&o++:r++,!(1<r||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(r=0,o<2?(o=0,g(e,t.splice(0,t.length))):(o=0,t.splice(0,t.length))):void 0})}).then(function(){if(r<=1&&t.length)return g(e,t)})}).then(s,u).then(function(){(e+=1)<i&&setTimeout(n,c)})},3e3)}function g(n,e){return h("".concat(t,"/rum/v1"),{data:JSON.stringify({metadata:n,data:e}),method:"POST"}).catch(u)}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(){s("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof a)return l();!function(n,e){var t=document.createElement("script"),o=!1;t.onreadystatechange=t.onload=function(){o||e(),o=!0},t.setAttribute("src",n),document.body.appendChild(t)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,l()})}},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
"use strict";!function(a){var n,t="https://devnull.perfops.net",o="https://rum-cdn.perfops.net/providers",r=3e5,c=6e4,i=3,e=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},s=e.logInfo,u=e.logError,p=window.rum?window.rum.key:void 0;function d(n){return Math.max(0,Number(n.toFixed(2)))}function h(o,n){var e=1<arguments.length&&void 0!==n?n:{},t=e.cb,r=void 0===t?function(){}:t,c=e.data,i=e.method,s=void 0===i?"GET":i,p=e.timeout,d=void 0===p?3e3:p;return new a(function(n,e){var t=new XMLHttpRequest;t.onload=function(){return n(t)},t.onerror=t.ontimeout=function(){u(t),e(new Error("Status ".concat(t.status,". Response: ").concat(t.statusText)))},t.open(s,o),t.timeout=d,r(t),t.send(c)})}function f(n){c=n.interval?1e3*parseInt(n.interval):c,n.repeats&&(i="Infinite"===n.repeats?Math.pow(2,32):parseInt(n.repeats))}function l(){var e=0;setTimeout(function n(){(function(){var e="perfops-rum-resources",n=JSON.parse(window.localStorage.getItem(e));return n&&n.expiry>Date.now()?(n.config&&f(n.config),a.resolve(n.data)):h(o).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(e,JSON.stringify({data:n.data,config:n.config,expiry:Date.now()+r})),n.config&&f(n.config),n.data}).catch(function(){return[{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:1},{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:0},{id:40,cdnUrl:"https://swifty-cdn.perfops.io/500b-sw-bench.jpg",p:0},{id:41,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:0},{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",p:1},{id:42,cdnUrl:"https://perfops.5centscdn.com/500b-5cents-bench.jpg",p:1},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:1},{id:11,cdnUrl:"https://bunny-cdn.perfops.io/500b-bunny-bench.jpg",p:1},{id:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:0},{id:2,cdnUrl:"https://ovh-cdn.perfops.io/500b-bench.jpg",p:1},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:1},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:1},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:1},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:0},{id:7,cdnUrl:"https://google-cdn.perfops.io/500b-google-bench.jpg",p:1},{id:14,cdnUrl:"https://perfops.r.worldssl.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},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:1},{id:39,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:0},{id:10,cdnUrl:"https://akamai-cdn.perfops.io/500b-bench.jpg",p:1},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:1},{id:43,cdnUrl:"https://2-58.s.cdn13.com/500b-bench.jpg",p:0},{id:6,cdnUrl:"https://key-cdn.perfops.io/500b-key-bench.jpg",p:1},{id:17,cdnUrl:"https://edgecast-cdn.perfops.io/500b-bench.jpg",p:1},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:0},{id:9,cdnUrl:"https://cdn77-cdn.perfops.io/500b-bench.jpg",p:1},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:1}]})})().then(function(n){var e={ua:navigator.userAgent,hostname:window.location.hostname,client:p},t=[],o=0,r=0;return performance.clearResourceTimings(),function(n,o){return n.reduce(function(n,t){return n.then(function(e){return o(t).then(function(n){return e.push(n),e})})},a.resolve([]))}(n,function(n){return function(n){var c="".concat(n.cdnUrl,"?t=").concat(Date.now()),e=new URL(c).hostname,i={id:n.id,domain:e,online:navigator&&void 0!==navigator.onLine?Number(navigator.onLine):-1};return h(c).then(function(n){var e=performance.getEntriesByName(c)[0],t=d(e.domainLookupEnd-e.domainLookupStart),o=d(e.connectEnd-e.connectStart),r=0<o?d(e.connectEnd-e.secureConnectionStart):0;return 200<=n.status&&n.status<300&&(i=Object.assign({},i,{up:1,status:n.status,time:Number((e.responseEnd-e.requestStart).toFixed(2)),dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(i=Object.assign({},i,{up:0,status:n.status,dnsLookupTime:t,tcpTime:o,sslTime:r,headers:n.getAllResponseHeaders()})),i}).catch(function(){return Object.assign({},i,{up:0,status:0})})}(n).then(function(n){if(n.up?2e3<n.time&&o++:r++,2<=t.push(n))return r=0,o<2?(o=0,g(e,t.splice(0,t.length))):(o=0,t.splice(0,t.length))})}).then(function(){if(r<=1&&t.length)return g(e,t)})}).then(s,u).then(function(){(e+=1)<i&&setTimeout(n,c)})},3e3)}function g(n,e){return h("".concat(t,"/rum/v1"),{data:JSON.stringify({metadata:n,data:e}),method:"POST"}).catch(u)}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(){s("clear performance resource buffer"),performance.clearResourceTimings()},"function"==typeof a)return l();!function(n,e){var t=document.createElement("script"),o=!1;t.onreadystatechange=t.onload=function(){o||e(),o=!0},t.setAttribute("src",n),document.body.appendChild(t)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,l()})}},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
{
"name": "perfops-rom",
"version": "1.1.20",
"version": "1.1.21",
"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