Skip to content

Commit

Permalink
chore: optimize split param
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Oct 21, 2023
1 parent d84cb69 commit cd4905f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion benchmark-compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function updateReadme () {
${compareResults(true)}
`
const md = readFileSync('README.md', 'utf8')
writeFileSync('README.md', md.split('# Benchmarks')[0] + benchmarkMd, 'utf8')
writeFileSync('README.md', md.split('# Benchmarks', 1)[0] + benchmarkMd, 'utf8')
}

function compareResults (markdown) {
Expand Down
2 changes: 1 addition & 1 deletion metrics/process-results.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function updateReadme (startupResults) {
${startupResults}
`
const md = fs.readFileSync('METRICS.md', 'utf8')
fs.writeFileSync('METRICS.md', md.split('# Metrics')[0] + benchmarkMd, 'utf8')
fs.writeFileSync('METRICS.md', md.split('# Metrics', 1)[0] + benchmarkMd, 'utf8')
}

const results = fs.readdirSync(__dirname).filter((x) => x.endsWith('.txt'))
Expand Down

0 comments on commit cd4905f

Please sign in to comment.