From 8e2c4fe762a0adb9afe3d59443d6f1d0dc40f358 Mon Sep 17 00:00:00 2001 From: IWANABETHATGUY Date: Sat, 13 Jul 2024 19:26:39 +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-Bu7eJLPs.js => index-CywZ8q6G.js} | 4 ++-- docs/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename docs/assets/{index-Bu7eJLPs.js => index-CywZ8q6G.js} (58%) diff --git a/docs/assets/index-Bu7eJLPs.js b/docs/assets/index-CywZ8q6G.js similarity index 58% rename from docs/assets/index-Bu7eJLPs.js rename to docs/assets/index-CywZ8q6G.js index 97c0cf7..62898f7 100644 --- a/docs/assets/index-Bu7eJLPs.js +++ b/docs/assets/index-CywZ8q6G.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,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(); +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:h,metric:g,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(([I,x])=>{console.log("data: ",x,I),m==null||m.data.push({name:I,line:{shape:"hv"},x:h.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 h=document.createElement("div");l.data.sort((g,y)=>g.namey.name?1:0),Plotly.newPlot(h,l.data,l.layout),h.on("plotly_click",g=>{const y=g.points[0].hovertext;if(!y)return;let _=g.points[g.points.length-1].repoUrl;const m=_?`${_.trimEnd("/")}/commit/${y}`:y;console.log("url: ",m);const I=`Commit ${y} URL copied to clipboard`;navigator.clipboard.writeText(m),Ai(I)}),(s=o.get(b))==null||s.appendChild(h)}}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[0].metric),e[n]={data:a,commit:o,timestamp:f,unit:i[0].unit,metric:i[0].metric,repoUrl:i[0].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/index.html b/docs/index.html index 6a6ac83..8ba43be 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ rolldown Dashboard - +