perfops-rom
Advanced tools
Comparing version 1.1.14 to 1.1.15
152
dist/rom.js
@@ -6,3 +6,4 @@ "use strict"; | ||
var _ref = function () { | ||
var _ref = // prettier-ignore | ||
function () { | ||
/* minified */ | ||
@@ -23,3 +24,3 @@ }.toString().indexOf('minified') !== -1 ? { | ||
var resolvers = []; | ||
var done = false; | ||
var done = false; // prettier-ignore | ||
@@ -57,4 +58,4 @@ function fetch(url) { | ||
function fetchJs(url, cb) { | ||
var script = document.createElement('script'), | ||
loaded; | ||
var script = document.createElement('script'); | ||
var loaded; | ||
@@ -110,3 +111,3 @@ script.onreadystatechange = script.onload = function () { | ||
function fetchResourceList() { | ||
return fetch('https://api.perfops.net/rum-cdn.php').then(function (xhr) { | ||
return fetch('https://rum-cdn.perfops.net/providers').then(function (xhr) { | ||
return JSON.parse(xhr.response); | ||
@@ -158,108 +159,107 @@ }); | ||
}).catch(function () { | ||
// eslint-disable-next-line | ||
return { | ||
"data": [{ | ||
"id": 38, | ||
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg", | ||
"p": "0" | ||
}, { | ||
"id": 14, | ||
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 15, | ||
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg", | ||
"p": "1" | ||
"id": 17, | ||
"cdnUrl": "https://edgecast-cdn.cdnperf.com/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 34, | ||
"cdnUrl": "https://www.superveda.net/500b-bench.jpg", | ||
"p": "0" | ||
}, { | ||
"id": 9, | ||
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 35, | ||
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg", | ||
"p": "1" | ||
"id": 20, | ||
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 11, | ||
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg", | ||
"p": "1" | ||
"id": 22, | ||
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 13, | ||
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/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" | ||
"id": 4, | ||
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 15, | ||
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 38, | ||
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 6, | ||
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 5, | ||
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg", | ||
"p": "1" | ||
"id": 7, | ||
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 36, | ||
"cdnUrl": "https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg", | ||
"p": "0" | ||
"id": 3, | ||
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 29, | ||
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg", | ||
"p": "0" | ||
}, { | ||
"id": 10, | ||
"cdnUrl": "https://akamai-perfops.azureedge.net/500b-aka-bench.jpg", | ||
"p": "1" | ||
}, { | ||
"id": 8, | ||
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 11, | ||
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 24, | ||
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 30, | ||
"cdnUrl": "https://perfops.doracdn.com/500b-db-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 4, | ||
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg", | ||
"p": "1" | ||
"id": 13, | ||
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 17, | ||
"cdnUrl": "https://edgecast-cdn.cdnperf.com/500b-bench.jpg", | ||
"p": "1" | ||
"id": 1, | ||
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 2, | ||
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg", | ||
"p": "0" | ||
"cdnUrl": "https://ovh-cdn.perfops.io/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 18, | ||
"cdnUrl": "https://azure-perfops1.azureedge.net/500b-azure-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": 29, | ||
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 22, | ||
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg", | ||
"p": "0" | ||
"id": 35, | ||
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 7, | ||
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg", | ||
"p": "1" | ||
"id": 36, | ||
"cdnUrl": "https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 12, | ||
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 3, | ||
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg", | ||
"p": "1" | ||
"id": 10, | ||
"cdnUrl": "https://akamai-perfops.azureedge.net/500b-aka-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 24, | ||
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg", | ||
"p": "0" | ||
"id": 18, | ||
"cdnUrl": "https://azure-perfops1.azureedge.net/500b-azure-bench.jpg", | ||
"p": 1 | ||
}] | ||
@@ -315,3 +315,3 @@ }; | ||
}); | ||
}); // eslint-disable-next-line | ||
}); | ||
}, 1000); | ||
@@ -318,0 +318,0 @@ } |
@@ -1,1 +0,1 @@ | ||
"use strict";!function(u){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,a=t.logError,c=window.rum?window.rum.key:void 0,r=null,p=[],o=[],d=!1;function i(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,o=void 0===e?function(){}:e,c=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new u(function(n,t){var e=new XMLHttpRequest;e.onload=function(){return n(e)},e.onerror=e.ontimeout=function(){a(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,o(e),e.send(c)})}function s(){setTimeout(function(){i("https://api.perfops.net/rum-cdn.php").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 n}).catch(function(){return{data:[{id:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:"0"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:34,cdnUrl:"https://www.superveda.net/500b-bench.jpg",p:"0"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.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: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:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:"0"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:"0"},{id:10,cdnUrl:"https://akamai-perfops.azureedge.net/500b-aka-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast-cdn.cdnperf.com/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"0"},{id:18,cdnUrl:"https://azure-perfops1.azureedge.net/500b-azure-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/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:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"0"}]}}).then(function(n){var t=[],e={ua:navigator.userAgent,hostname:window.location.hostname,client:c},r=0,o=0;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})})},u.resolve([]))}(n.data,function(n){return function(r){var o="".concat(r.cdnUrl,"?t=").concat(Date.now());return i(o).then(function(n){var t=performance.getEntriesByName(o)[0],e={id:r.id};return 200<=n.status&&n.status<300&&(e=Object.assign({},e,{up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(e=Object.assign({},e,{up:0,dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),e}).catch(function(){return{id:r.id,up:0}})}(n).then(function(n){if(p.push(n),n.up?2e3<n.time&&r++:o++,!(1<o||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(o=0,r<2?(r=0,h(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(o<=1&&t.length)return h(e,t)})}).then(e,a).then(function(){d=!0,o.forEach(function(n){return n()})})},1e3)}function h(n,t){return i("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).then(function(n){r=JSON.parse(n.response)}).catch(a)}n=function(){if(void 0!==window.performance)return"function"==typeof u?s():void 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(){u=window.ES6Promise,s()})},"complete"===document.readyState?n():window.addEventListener("load",n),window.perfopsRumJs={getResults:function(){return new u(function(n){if(d)return n(p);o.push(function(){return n(p)})})},getStoreMeta:function(){return new u(function(n){if(d)return n(r);o.push(function(){return n(r)})})}}}(window.Promise); | ||
"use strict";!function(u){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,a=t.logError,c=window.rum?window.rum.key:void 0,r=null,p=[],o=[],d=!1;function i(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,o=void 0===e?function(){}:e,c=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new u(function(n,t){var e=new XMLHttpRequest;e.onload=function(){return n(e)},e.onerror=e.ontimeout=function(){a(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,o(e),e.send(c)})}function s(){setTimeout(function(){i("https://rum-cdn.perfops.net/providers").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 n}).catch(function(){return{data:[{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:1},{id:17,cdnUrl:"https://edgecast-cdn.cdnperf.com/500b-bench.jpg",p:1},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:1},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:1},{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:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:1},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:1},{id:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:0},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:1},{id:7,cdnUrl:"https://google-cdn.perfops.io/500b-google-bench.jpg",p:1},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:1},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:1},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:1},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:0},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:1},{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:2,cdnUrl:"https://ovh-cdn.perfops.io/500b-bench.jpg",p:0},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:1},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:0},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:1},{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:0},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:1},{id:10,cdnUrl:"https://akamai-perfops.azureedge.net/500b-aka-bench.jpg",p:1},{id:18,cdnUrl:"https://azure-perfops1.azureedge.net/500b-azure-bench.jpg",p:1}]}}).then(function(n){var t=[],e={ua:navigator.userAgent,hostname:window.location.hostname,client:c},r=0,o=0;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})})},u.resolve([]))}(n.data,function(n){return function(r){var o="".concat(r.cdnUrl,"?t=").concat(Date.now());return i(o).then(function(n){var t=performance.getEntriesByName(o)[0],e={id:r.id};return 200<=n.status&&n.status<300&&(e=Object.assign({},e,{up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(e=Object.assign({},e,{up:0,dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),e}).catch(function(){return{id:r.id,up:0}})}(n).then(function(n){if(p.push(n),n.up?2e3<n.time&&r++:o++,!(1<o||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(o=0,r<2?(r=0,h(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(o<=1&&t.length)return h(e,t)})}).then(e,a).then(function(){d=!0,o.forEach(function(n){return n()})})},1e3)}function h(n,t){return i("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).then(function(n){r=JSON.parse(n.response)}).catch(a)}n=function(){if(void 0!==window.performance)return"function"==typeof u?s():void 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(){u=window.ES6Promise,s()})},"complete"===document.readyState?n():window.addEventListener("load",n),window.perfopsRumJs={getResults:function(){return new u(function(n){if(d)return n(p);o.push(function(){return n(p)})})},getStoreMeta:function(){return new u(function(n){if(d)return n(r);o.push(function(){return n(r)})})}}}(window.Promise); |
152
dist/rom3.js
@@ -6,3 +6,4 @@ "use strict"; | ||
var _ref = function () { | ||
var _ref = // prettier-ignore | ||
function () { | ||
/* minified */ | ||
@@ -23,3 +24,3 @@ }.toString().indexOf('minified') !== -1 ? { | ||
var resolvers = []; | ||
var done = false; | ||
var done = false; // prettier-ignore | ||
@@ -57,4 +58,4 @@ function fetch(url) { | ||
function fetchJs(url, cb) { | ||
var script = document.createElement('script'), | ||
loaded; | ||
var script = document.createElement('script'); | ||
var loaded; | ||
@@ -110,3 +111,3 @@ script.onreadystatechange = script.onload = function () { | ||
function fetchResourceList() { | ||
return fetch('https://api.perfops.net/rum-cdn.php').then(function (xhr) { | ||
return fetch('https://rum-cdn.perfops.net/providers').then(function (xhr) { | ||
return JSON.parse(xhr.response); | ||
@@ -158,108 +159,107 @@ }); | ||
}).catch(function () { | ||
// eslint-disable-next-line | ||
return { | ||
"data": [{ | ||
"id": 38, | ||
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg", | ||
"p": "0" | ||
}, { | ||
"id": 14, | ||
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 15, | ||
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg", | ||
"p": "1" | ||
"id": 17, | ||
"cdnUrl": "https://edgecast-cdn.cdnperf.com/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 34, | ||
"cdnUrl": "https://www.superveda.net/500b-bench.jpg", | ||
"p": "0" | ||
}, { | ||
"id": 9, | ||
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 35, | ||
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg", | ||
"p": "1" | ||
"id": 20, | ||
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 11, | ||
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg", | ||
"p": "1" | ||
"id": 22, | ||
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 13, | ||
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/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" | ||
"id": 4, | ||
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 15, | ||
"cdnUrl": "https://cdnperf-rum.cdnetworks.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 38, | ||
"cdnUrl": "https://perf.psychz.net/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 6, | ||
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 5, | ||
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg", | ||
"p": "1" | ||
"id": 7, | ||
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 36, | ||
"cdnUrl": "https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg", | ||
"p": "0" | ||
"id": 3, | ||
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 29, | ||
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg", | ||
"p": "0" | ||
}, { | ||
"id": 10, | ||
"cdnUrl": "https://akamai-perfops.azureedge.net/500b-aka-bench.jpg", | ||
"p": "1" | ||
}, { | ||
"id": 8, | ||
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 11, | ||
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 24, | ||
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 30, | ||
"cdnUrl": "https://perfops.doracdn.com/500b-db-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 4, | ||
"cdnUrl": "https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg", | ||
"p": "1" | ||
"id": 13, | ||
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 17, | ||
"cdnUrl": "https://edgecast-cdn.cdnperf.com/500b-bench.jpg", | ||
"p": "1" | ||
"id": 1, | ||
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 2, | ||
"cdnUrl": "https://kgmni17536myjst.belugacdn.link/500b-bench.jpg", | ||
"p": "0" | ||
"cdnUrl": "https://ovh-cdn.perfops.io/500b-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 18, | ||
"cdnUrl": "https://azure-perfops1.azureedge.net/500b-azure-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": 29, | ||
"cdnUrl": "https://25748s.ha.azioncdn.net/500b-az-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 22, | ||
"cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg", | ||
"p": "0" | ||
"id": 35, | ||
"cdnUrl": "https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 7, | ||
"cdnUrl": "https://google-cdn.perfops.io/500b-google-bench.jpg", | ||
"p": "1" | ||
"id": 36, | ||
"cdnUrl": "https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg", | ||
"p": 0 | ||
}, { | ||
"id": 12, | ||
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg", | ||
"p": "1" | ||
"p": 1 | ||
}, { | ||
"id": 3, | ||
"cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg", | ||
"p": "1" | ||
"id": 10, | ||
"cdnUrl": "https://akamai-perfops.azureedge.net/500b-aka-bench.jpg", | ||
"p": 1 | ||
}, { | ||
"id": 24, | ||
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg", | ||
"p": "0" | ||
"id": 18, | ||
"cdnUrl": "https://azure-perfops1.azureedge.net/500b-azure-bench.jpg", | ||
"p": 1 | ||
}] | ||
@@ -315,3 +315,3 @@ }; | ||
}); | ||
}); // eslint-disable-next-line | ||
}); | ||
}, 3000); | ||
@@ -318,0 +318,0 @@ } |
@@ -1,1 +0,1 @@ | ||
"use strict";!function(u){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,a=t.logError,c=window.rum?window.rum.key:void 0,r=null,p=[],o=[],d=!1;function i(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,o=void 0===e?function(){}:e,c=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new u(function(n,t){var e=new XMLHttpRequest;e.onload=function(){return n(e)},e.onerror=e.ontimeout=function(){a(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,o(e),e.send(c)})}function s(){setTimeout(function(){i("https://api.perfops.net/rum-cdn.php").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 n}).catch(function(){return{data:[{id:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:"0"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:"1"},{id:34,cdnUrl:"https://www.superveda.net/500b-bench.jpg",p:"0"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.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: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:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:"0"},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:"0"},{id:10,cdnUrl:"https://akamai-perfops.azureedge.net/500b-aka-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast-cdn.cdnperf.com/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"0"},{id:18,cdnUrl:"https://azure-perfops1.azureedge.net/500b-azure-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/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:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"0"}]}}).then(function(n){var t=[],e={ua:navigator.userAgent,hostname:window.location.hostname,client:c},r=0,o=0;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})})},u.resolve([]))}(n.data,function(n){return function(r){var o="".concat(r.cdnUrl,"?t=").concat(Date.now());return i(o).then(function(n){var t=performance.getEntriesByName(o)[0],e={id:r.id};return 200<=n.status&&n.status<300&&(e=Object.assign({},e,{up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(e=Object.assign({},e,{up:0,dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),e}).catch(function(){return{id:r.id,up:0}})}(n).then(function(n){if(p.push(n),n.up?2e3<n.time&&r++:o++,!(1<o||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(o=0,r<2?(r=0,h(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(o<=1&&t.length)return h(e,t)})}).then(e,a).then(function(){d=!0,o.forEach(function(n){return n()})})},3e3)}function h(n,t){return i("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).then(function(n){r=JSON.parse(n.response)}).catch(a)}n=function(){if(void 0!==window.performance)return"function"==typeof u?s():void 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(){u=window.ES6Promise,s()})},"complete"===document.readyState?n():window.addEventListener("load",n),window.perfopsRumJs={getResults:function(){return new u(function(n){if(d)return n(p);o.push(function(){return n(p)})})},getStoreMeta:function(){return new u(function(n){if(d)return n(r);o.push(function(){return n(r)})})}}}(window.Promise); | ||
"use strict";!function(u){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,a=t.logError,c=window.rum?window.rum.key:void 0,r=null,p=[],o=[],d=!1;function i(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,o=void 0===e?function(){}:e,c=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new u(function(n,t){var e=new XMLHttpRequest;e.onload=function(){return n(e)},e.onerror=e.ontimeout=function(){a(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,o(e),e.send(c)})}function s(){setTimeout(function(){i("https://rum-cdn.perfops.net/providers").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 n}).catch(function(){return{data:[{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:1},{id:17,cdnUrl:"https://edgecast-cdn.cdnperf.com/500b-bench.jpg",p:1},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:1},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:1},{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:4,cdnUrl:"https://fastly.jsdelivr.net/gh/ProspectOne/js-test@1.1/500b-bench.jpg",p:1},{id:15,cdnUrl:"https://cdnperf-rum.cdnetworks.net/500b-bench.jpg",p:1},{id:38,cdnUrl:"https://perf.psychz.net/500b-bench.jpg",p:0},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:1},{id:7,cdnUrl:"https://google-cdn.perfops.io/500b-google-bench.jpg",p:1},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:1},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:1},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:1},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:0},{id:30,cdnUrl:"https://perfops.doracdn.com/500b-db-bench.jpg",p:1},{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:2,cdnUrl:"https://ovh-cdn.perfops.io/500b-bench.jpg",p:0},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:1},{id:29,cdnUrl:"https://25748s.ha.azioncdn.net/500b-az-bench.jpg",p:0},{id:35,cdnUrl:"https://cdn81795137.blazingcdn.net/500b-blz-bench.jpg",p:1},{id:36,cdnUrl:"https://perfops-cc.cdn-tech.io/500b-cc-bench.jpg",p:0},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:1},{id:10,cdnUrl:"https://akamai-perfops.azureedge.net/500b-aka-bench.jpg",p:1},{id:18,cdnUrl:"https://azure-perfops1.azureedge.net/500b-azure-bench.jpg",p:1}]}}).then(function(n){var t=[],e={ua:navigator.userAgent,hostname:window.location.hostname,client:c},r=0,o=0;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})})},u.resolve([]))}(n.data,function(n){return function(r){var o="".concat(r.cdnUrl,"?t=").concat(Date.now());return i(o).then(function(n){var t=performance.getEntriesByName(o)[0],e={id:r.id};return 200<=n.status&&n.status<300&&(e=Object.assign({},e,{up:1,time:Number((t.responseEnd-t.requestStart).toFixed(2)),dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),300<=n.status&&n.status<=500&&(e=Object.assign({},e,{up:0,dnsLookupTime:Number((t.domainLookupEnd-t.domainLookupStart).toFixed(2)),headers:n.getAllResponseHeaders()})),e}).catch(function(){return{id:r.id,up:0}})}(n).then(function(n){if(p.push(n),n.up?2e3<n.time&&r++:o++,!(1<o||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(o=0,r<2?(r=0,h(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(o<=1&&t.length)return h(e,t)})}).then(e,a).then(function(){d=!0,o.forEach(function(n){return n()})})},3e3)}function h(n,t){return i("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).then(function(n){r=JSON.parse(n.response)}).catch(a)}n=function(){if(void 0!==window.performance)return"function"==typeof u?s():void 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(){u=window.ES6Promise,s()})},"complete"===document.readyState?n():window.addEventListener("load",n),window.perfopsRumJs={getResults:function(){return new u(function(n){if(d)return n(p);o.push(function(){return n(p)})})},getStoreMeta:function(){return new u(function(n){if(d)return n(r);o.push(function(){return n(r)})})}}}(window.Promise); |
{ | ||
"name": "perfops-rom", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"jsdelivr": "./dist/rom3.min.js", | ||
@@ -5,0 +5,0 @@ "description": "RUM code for https://perfops.net/", |
32694