File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -106,16 +106,22 @@ function renderReport(report: Report) {
106106}
107107
108108async function main ( ) {
109+ const svgFiles = [ ]
109110 for ( const jsonFile of readdirSync ( '.' ) ) {
110111 if ( ! jsonFile . startsWith ( 'tmp.benchmark-report.' ) || ! jsonFile . endsWith ( '.json' ) ) continue
111112 const svgFile = jsonFile . replace ( / \. j s o n $ / , '.svg' )
113+ svgFiles . push ( svgFile )
112114 console . error ( jsonFile , '→' , svgFile )
113115 const report = JSON . parse ( readFileSync ( jsonFile , 'utf-8' ) )
114116 assertReport ( report )
115117 const svgSuffix = await renderToString ( renderReport ( report ) )
116118 const svgFileContent = `${ xmlHeader } \n${ svgSuffix } `
117119 writeFileSync ( svgFile , svgFileContent )
118120 }
121+ const markdown = svgFiles
122+ . map ( svgFile => `### ${ svgFile } \n\n` )
123+ . join ( '\n' )
124+ writeFileSync ( 'tmp.benchmark-report.CHARTS.md' , `# Benchmark Charts\n${ markdown } ` )
119125}
120126
121127main ( ) . catch ( error => {
You can’t perform that action at this time.
0 commit comments