From 2018acb78829769d3b49933ee3cec0ae593addcc Mon Sep 17 00:00:00 2001 From: IWANABETHATGUY Date: Sat, 13 Jul 2024 19:10:16 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/assets/{index-XyTpTolQ.js => index-Bu7eJLPs.js} | 4 ++-- docs/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename docs/assets/{index-XyTpTolQ.js => index-Bu7eJLPs.js} (77%) diff --git a/docs/assets/index-XyTpTolQ.js b/docs/assets/index-Bu7eJLPs.js similarity index 77% rename from docs/assets/index-XyTpTolQ.js rename to docs/assets/index-Bu7eJLPs.js index 78d8db7..97c0cf7 100644 --- a/docs/assets/index-XyTpTolQ.js +++ b/docs/assets/index-Bu7eJLPs.js @@ -1,2 +1,2 @@ -var Xt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var xa=Xt((w,T)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();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 a=Qt.call(t);return n&&(e?t[N]=r:delete t[N]),a}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 ae(t,e){for(var r=-1,n=t==null?0:t.length,a=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=i.get(t),c=i.get(e);if(s&&c)return s==e&&c==t;var l=-1,d=!0,_=r&An?new G:void 0;for(i.set(t,e),i.set(e,t);++lJSON.parse(a))}}class wa{constructor(e,r){this.fetch=e,this.normalized=r}async fetchData(){const e=await this.fetch();return this.normalized(e)}}async function Ta(){return(await Promise.all([new va("https://raw.githubusercontent.com/rolldown/metric/main/metric.json").fetchData(),new wa(async()=>await(await fetch("https://raw.githubusercontent.com/rolldown/benchmark-results-storage/main/benchmark-node-output.json")).text(),e=>{var a;const r=JSON.parse(e);let n=[];return(a=r.entries)==null||a["Node Benchmark"].forEach(i=>{let{commit:o,date:f,benches:u}=i;for(let s=0,c=u.length;s{e.classList.add("hidden")},3e3)}async function Pa(){var s;let t=await Ta();const[e,r]=Oa();Wt(e,r);const n=ba(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[a,i]=Sa(n),o=$a(i);const f=new Map;for(let[c,{unit:l,data:d,commit:_,timestamp:g,metric:h,repoUrl:m}]of Object.entries(a)){let b=c,y=f.get(b);y||(y={data:[],layout:{title:b,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(b,y)),Object.entries(d).forEach(([I,x])=>{console.log("data: ",x,I),y==null||y.data.push({name:I,line:{shape:"hv"},x:g.map(M=>new Date(M)),y:x,hovertext:_,hovertemplate:`%{y} ${l}
(%{hovertext})`,repoUrl:_})})}const u=Array.from(f.entries());u.sort(([c],[l])=>c.localeCompare(l));for(const[c,l]of u){let[d,_]=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;const y=`${(h.points[0].repoUrl??"https://github.com/rolldown/rolldown").trimEnd("/")}/commit/${m}`;console.log("url: ",y);const I=`Commit ${m} URL copied to clipboard`;navigator.clipboard.writeText(y),Aa(I)}),(s=o.get(_))==null||s.appendChild(g)}}function $a(t){let e=Array.from(t),r=new Map;e.sort();for(let n=0;n{a.sort((u,s)=>+u.timestamp-+s.timestamp);let i={},o=[],f=[];for(let u=0;u{i[c]===void 0&&(i[c]=[]),i[c].push(l)}),o.push(s.commit),f.push(s.timestamp)}r.add(a[0].metric),e[n]={data:i,commit:o,timestamp:f,unit:a[0].unit,metric:a[0].metric,repoUrl:a[0].repoUrl}}),[e,r]}function Ea(t){const e=+new Date-t*1e3*60*60*24,r=new Date(e);Wt(r,void 0)}function Ia(){const t=document.getElementsByName("start")[0],e=document.getElementsByName("end")[0];return[t,e]}function Wt(t,e){const[r,n]=Ia();r.value=t?t.toISOString().split("T")[0]:"",n.value=e?e.toISOString().split("T")[0]:""}window.setDays=Ea;Pa()});export default xa(); +var Xt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var xa=Xt((w,T)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();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 a=Qt.call(t);return n&&(e?t[N]=r:delete t[N]),a}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 ae(t,e){for(var r=-1,n=t==null?0:t.length,a=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=i.get(t),c=i.get(e);if(s&&c)return s==e&&c==t;var l=-1,d=!0,b=r&An?new G:void 0;for(i.set(t,e),i.set(e,t);++lJSON.parse(a))}}class wa{constructor(e,r){this.fetch=e,this.normalized=r}async fetchData(){const e=await this.fetch();return this.normalized(e)}}async function Ta(){return(await Promise.all([new va("https://raw.githubusercontent.com/rolldown/metric/main/metric.json").fetchData(),new wa(async()=>await(await fetch("https://raw.githubusercontent.com/rolldown/benchmark-results-storage/main/benchmark-node-output.json")).text(),e=>{var a;const r=JSON.parse(e);let n=[];return(a=r.entries)==null||a["Node Benchmark"].forEach(i=>{let{commit:o,date:f,benches:u}=i;for(let s=0,c=u.length;s{e.classList.add("hidden")},3e3)}async function Pa(){var s;let t=await Ta();const[e,r]=Oa();Wt(e,r);const n=ba(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[a,i]=Sa(n),o=$a(i);const f=new Map;for(let[c,{unit:l,data:d,commit:b,timestamp:g,metric:h,repoUrl:y}]of Object.entries(a)){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(([I,x])=>{console.log("data: ",x,I),m==null||m.data.push({name:I,line:{shape:"hv"},x:g.map(M=>new Date(M)),y:x,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].repoUrl;const m=_?`${_.trimEnd("/")}/commit/${y}`:y;console.log("url: ",m);const I=`Commit ${y} URL copied to clipboard`;navigator.clipboard.writeText(m),Aa(I)}),(s=o.get(b))==null||s.appendChild(g)}}function $a(t){let e=Array.from(t),r=new Map;e.sort();for(let n=0;n{a.sort((u,s)=>+u.timestamp-+s.timestamp);let i={},o=[],f=[];for(let u=0;u{i[c]===void 0&&(i[c]=[]),i[c].push(l)}),o.push(s.commit),f.push(s.timestamp)}r.add(a[0].metric),e[n]={data:i,commit:o,timestamp:f,unit:a[0].unit,metric:a[0].metric,repoUrl:a[0].repoUrl}}),[e,r]}function Ea(t){const e=+new Date-t*1e3*60*60*24,r=new Date(e);Wt(r,void 0)}function Ia(){const t=document.getElementsByName("start")[0],e=document.getElementsByName("end")[0];return[t,e]}function Wt(t,e){const[r,n]=Ia();r.value=t?t.toISOString().split("T")[0]:"",n.value=e?e.toISOString().split("T")[0]:""}window.setDays=Ea;Pa()});export default xa(); diff --git a/docs/index.html b/docs/index.html index c1e8215..6a6ac83 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ rolldown Dashboard - +