diff --git a/docs/assets/index-4mbEWK-W.js b/docs/assets/index-4mbEWK-W.js deleted file mode 100644 index 02e9e24..0000000 --- a/docs/assets/index-4mbEWK-W.js +++ /dev/null @@ -1,2 +0,0 @@ -var Xt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var xi=Xt((w,T)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var It=typeof global=="object"&&global&&global.Object===Object&&global,Yt=typeof self=="object"&&self&&self.Object===Object&&self,A=It||Yt||Function("return this")(),E=A.Symbol,xt=Object.prototype,Jt=xt.hasOwnProperty,Qt=xt.toString,N=E?E.toStringTag:void 0;function Zt(t){var e=Jt.call(t,N),r=t[N];try{t[N]=void 0;var n=!0}catch{}var i=Qt.call(t);return n&&(e?t[N]=r:delete t[N]),i}var Vt=Object.prototype,kt=Vt.toString;function te(t){return kt.call(t)}var ee="[object Null]",re="[object Undefined]",st=E?E.toStringTag:void 0;function R(t){return t==null?t===void 0?re:ee:st&&st in Object(t)?Zt(t):te(t)}function L(t){return t!=null&&typeof t=="object"}var ne="[object Symbol]";function tt(t){return typeof t=="symbol"||L(t)&&R(t)==ne}function ie(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r-1&&t%1==0&&t-1&&t%1==0&&t<=$e}function Lt(t){return t!=null&&rt(t.length)&&!jt(t)}var Se=Object.prototype;function Ee(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Se;return t===r}function Ie(t,e){for(var r=-1,n=Array(t);++r-1}function Rr(t,e){var r=this.__data__,n=H(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function P(t){var e=-1,r=t==null?0:t.length;for(this.clear();++ef))return!1;var s=a.get(t),c=a.get(e);if(s&&c)return s==e&&c==t;var l=-1,d=!0,b=r&An?new G:void 0;for(a.set(t,e),a.set(e,t);++lJSON.parse(i))}}class wi{constructor(e,r){this.fetch=e,this.normalized=r}async fetchData(){const e=await this.fetch();return this.normalized(e)}}async function Ti(){return(await Promise.all([new vi("https://raw.githubusercontent.com/rolldown/metric/main/metric.json").fetchData(),new wi(async()=>await(await fetch("https://raw.githubusercontent.com/rolldown/benchmark-results-storage/main/benchmark-node-output.json")).text(),e=>{var i;const r=JSON.parse(e);let n=[];return(i=r.entries)==null||i["Node Benchmark"].forEach(a=>{let{commit:o,date:f,benches:u}=a;for(let s=0,c=u.length;s{e.classList.add("hidden")},3e3)}async function Pi(){var s;let t=await Ti();const[e,r]=Oi();Wt(e,r);const n=bi(t.filter(c=>{const l=r?c.timestamp<=+r:!0,d=e?c.timestamp>=+e:!0;return l&&d}),c=>`${c.case}/${c.metric}`);let[i,a]=Si(n),o=$i(a);const f=new Map;for(let[c,{unit:l,data:d,commit:b,timestamp:g,metric:h,repoUrl:y}]of Object.entries(i)){let _=c,m=f.get(_);m||(m={data:[],layout:{title:_,xaxis:{type:"date",tickformat:"%Y-%m-%d"},yaxis:{title:l,rangemode:"tozero"},width:Math.min(1200,window.innerWidth-30),margin:{l:50,r:20,b:100,t:100,pad:4},legend:{orientation:window.innerWidth<700?"h":"v"}}},f.set(_,m)),Object.entries(d).forEach(([j,D])=>{m==null||m.data.push({name:j,line:{shape:"hv"},x:g.map(M=>new Date(M)),y:D,hovertext:b,hovertemplate:`%{y} ${l}
(%{hovertext})`,repoUrl:y})})}const u=Array.from(f.entries());u.sort(([c],[l])=>c.localeCompare(l));for(const[c,l]of u){let[d,b]=c.split("/");const g=document.createElement("div");l.data.sort((h,y)=>h.namey.name?1:0),Plotly.newPlot(g,l.data,l.layout),g.on("plotly_click",h=>{const y=h.points[0].hovertext;if(!y)return;let _=h.points[0].data.repoUrl;const m=_?`${_.trimEnd("/")}/commit/${y}`:y,j=`Commit ${y} URL copied to clipboard`;navigator.clipboard.writeText(m),Ai(j)}),(s=o.get(b))==null||s.appendChild(g)}}function $i(t){let e=Array.from(t),r=new Map;e.sort();for(let n=0;n{i.sort((u,s)=>+u.timestamp-+s.timestamp);let a={},o=[],f=[];for(let u=0;u{a[c]===void 0&&(a[c]=[]),a[c].push(l)}),o.push(s.commit),f.push(s.timestamp)}r.add(i[i.length-1].metric),e[n]={data:a,commit:o,timestamp:f,unit:i[i.length-1].unit,metric:i[i.length-1].metric,repoUrl:i[i.length-1].repoUrl}}),[e,r]}function Ei(t){const e=+new Date-t*1e3*60*60*24,r=new Date(e);Wt(r,void 0)}function Ii(){const t=document.getElementsByName("start")[0],e=document.getElementsByName("end")[0];return[t,e]}function Wt(t,e){const[r,n]=Ii();r.value=t?t.toISOString().split("T")[0]:"",n.value=e?e.toISOString().split("T")[0]:""}window.setDays=Ei;Pi()});export default xi(); diff --git a/docs/assets/index-B2NxmcmY.js b/docs/assets/index-B2NxmcmY.js new file mode 100644 index 0000000..d4c1e26 --- /dev/null +++ b/docs/assets/index-B2NxmcmY.js @@ -0,0 +1,2 @@ +var nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _a=nt((w,T)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var je=typeof global=="object"&&global&&global.Object===Object&&global,it=typeof self=="object"&&self&&self.Object===Object&&self,A=je||it||Function("return this")(),E=A.Symbol,Me=Object.prototype,at=Me.hasOwnProperty,ot=Me.toString,N=E?E.toStringTag:void 0;function st(e){var t=at.call(e,N),r=e[N];try{e[N]=void 0;var n=!0}catch{}var i=ot.call(e);return n&&(t?e[N]=r:delete e[N]),i}var ut=Object.prototype,ft=ut.toString;function ct(e){return ft.call(e)}var lt="[object Null]",dt="[object Undefined]",ce=E?E.toStringTag:void 0;function L(e){return e==null?e===void 0?dt:lt:ce&&ce in Object(e)?st(e):ct(e)}function D(e){return e!=null&&typeof e=="object"}var pt="[object Symbol]";function re(e){return typeof e=="symbol"||D(e)&&L(e)==pt}function gt(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r-1&&e%1==0&&e-1&&e%1==0&&e<=Gt}function Fe(e){return e!=null&&ae(e.length)&&!De(e)}var Ht=Object.prototype;function Kt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ht;return e===r}function Wt(e,t){for(var r=-1,n=Array(e);++r-1}function Vr(e,t){var r=this.__data__,n=H(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function $(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ti?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:hn(e,t,r)}var yn="\\ud800-\\udfff",_n="\\u0300-\\u036f",bn="\\ufe20-\\ufe2f",vn="\\u20d0-\\u20ff",wn=_n+bn+vn,Tn="\\ufe0e\\ufe0f",On="\\u200d",An=RegExp("["+On+yn+wn+Tn+"]");function $n(e){return An.test(e)}function Pn(e){return e.split("")}var Je="\\ud800-\\udfff",Sn="\\u0300-\\u036f",En="\\ufe20-\\ufe2f",xn="\\u20d0-\\u20ff",In=Sn+En+xn,Cn="\\ufe0e\\ufe0f",Rn="["+Je+"]",Q="["+In+"]",V="\\ud83c[\\udffb-\\udfff]",jn="(?:"+Q+"|"+V+")",Ze="[^"+Je+"]",Xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ye="[\\ud800-\\udbff][\\udc00-\\udfff]",Mn="\\u200d",Qe=jn+"?",Ve="["+Cn+"]?",Dn="(?:"+Mn+"(?:"+[Ze,Xe,Ye].join("|")+")"+Ve+Qe+")*",Ln=Ve+Qe+Dn,Nn="(?:"+[Ze+Q+"?",Q,Xe,Ye,Rn].join("|")+")",Fn=RegExp(V+"(?="+V+")|"+Nn+Ln,"g");function Un(e){return e.match(Fn)||[]}function ve(e){return $n(e)?Un(e):Pn(e)}function zn(){this.__data__=new $,this.size=0}function Bn(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Gn(e){return this.__data__.get(e)}function Hn(e){return this.__data__.has(e)}var Kn=200;function Wn(e,t){var r=this.__data__;if(r instanceof $){var n=r.__data__;if(!z||n.lengthf))return!1;var s=a.get(e),c=a.get(t);if(s&&c)return s==t&&c==e;var l=-1,p=!0,b=r&ci?new G:void 0;for(a.set(e,t),a.set(t,e);++l-1;);return r}function sa(e,t,r){if(e=Ke(e),e&&t===void 0)return e.slice(0,yt(e)+1);if(!e||!(t=ne(t)))return e;var n=ve(e),i=oa(n,ve(t))+1;return mn(n,0,i).join("")}class ua{constructor(t){this.url=t}async fetchData(){return(await(await fetch(this.url)).text()).split(` +`).filter(Boolean).map(i=>JSON.parse(i))}}class fa{constructor(t,r){this.fetch=t,this.normalized=r}async fetchData(){const t=await this.fetch();return this.normalized(t)}}async function ca(){return(await Promise.all([new ua("https://raw.githubusercontent.com/rolldown/metric/main/metric.json").fetchData(),new fa(async()=>await(await fetch("https://raw.githubusercontent.com/rolldown/benchmark-results-storage/main/benchmark-node-output.json")).text(),t=>{var i;const r=JSON.parse(t);let n=[];return(i=r.entries)==null||i["Node Benchmark"].forEach(a=>{let{commit:o,date:f,benches:u}=a;for(let s=0,c=u.length;s{t.classList.add("hidden")},3e3)}async function pa(){var s;let e=await ca();const[t,r]=la();rt(t,r);const n=aa(e.filter(c=>{const l=r?c.timestamp<=+r:!0,p=t?c.timestamp>=+t:!0;return l&&p}),c=>`${c.case}/${c.metric}`);let[i,a]=ha(n),o=ga(a);const f=new Map;for(let[c,{unit:l,data:p,commit:b,timestamp:g,metric:h,repoUrl:m}]of Object.entries(i)){let _=c,y=f.get(_);y||(y={data:[],layout:{title:_,xaxis:{type:"date",tickformat:"%Y-%m-%d"},yaxis:{title:l,rangemode:"tozero"},width:Math.min(1200,window.innerWidth-30),margin:{l:50,r:20,b:100,t:100,pad:4},legend:{orientation:window.innerWidth<700?"h":"v"}}},f.set(_,y)),Object.entries(p).forEach(([R,j])=>{y==null||y.data.push({name:R,line:{shape:"hv"},x:g.map(M=>new Date(M)),y:j,hovertext:b,hovertemplate:`%{y} ${l}
(%{hovertext})`,repoUrl:m})})}const u=Array.from(f.entries());u.sort(([c],[l])=>c.localeCompare(l));for(const[c,l]of u){let[p,b]=c.split("/");const g=document.createElement("div");l.data.sort((h,m)=>h.namem.name?1:0),Plotly.newPlot(g,l.data,l.layout),g.on("plotly_click",h=>{const m=h.points[0].hovertext;if(!m)return;let _=h.points[0].data.repoUrl??"https://github.com/rolldown/rolldown";const y=_?`${sa(_,"/")}/commit/${m}`:m,R=`URL of commit ${y} copied to clipboard`;navigator.clipboard.writeText(y),da(R)}),(s=o.get(b))==null||s.appendChild(g)}}function ga(e){let t=Array.from(e),r=new Map;t.sort();for(let n=0;n{i.sort((u,s)=>+u.timestamp-+s.timestamp);let a={},o=[],f=[];for(let u=0;u{a[c]===void 0&&(a[c]=[]),a[c].push(l)}),o.push(s.commit),f.push(s.timestamp)}r.add(i[i.length-1].metric),t[n]={data:a,commit:o,timestamp:f,unit:i[i.length-1].unit,metric:i[i.length-1].metric,repoUrl:i[i.length-1].repoUrl}}),[t,r]}function ma(e){const t=+new Date-e*1e3*60*60*24,r=new Date(t);rt(r,void 0)}function ya(){const e=document.getElementsByName("start")[0],t=document.getElementsByName("end")[0];return[e,t]}function rt(e,t){const[r,n]=ya();r.value=e?e.toISOString().split("T")[0]:"",n.value=t?t.toISOString().split("T")[0]:""}window.setDays=ma;pa()});export default _a(); diff --git a/docs/index.html b/docs/index.html index 2c1409b..e1d549e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ rolldown Dashboard - +