Skip to content

Commit

Permalink
Update slightly perf comment output
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Jan 21, 2025
1 parent 1956545 commit 67b2904
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/perfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
repo: context.repo.repo,
// TODO: generate comment header inside the report file instead of here for better portability?
// We should already have access to the sha1 through `git` and the destination branch through the command line arguments.
body: "Automated performance checks have found a sensible difference on commit " +
body: "Automated performance checks have been performed on commit " +
"\`${{github.event.pull_request.head.sha}}\` with the base branch \`${{github.base_ref}}\`:\n\n" +
fileContent +
"\n\n If you want to skip performance checks for latter commits, add the `skip-performance-checks` label to this Pull Request.",
Expand Down
11 changes: 8 additions & 3 deletions tests/performance/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,14 @@ if (import.meta.url === pathToFileURL(process.argv[1]).href) {
.then(async (results) => {
if (reportFile !== undefined) {
try {
writeFileSync(
reportFile,
"Performance tests 1st run output:\n" + "---------------------------------\n",
writeFileSync(reportFile, "Tests results\n" + "-------------\n");
if (results.worse.length === 0) {
appendToReportFile("✅ Tests have passed.");
} else {
appendToReportFile("❌ Tests have failed.");
}
appendToReportFile(
"Performance tests 1st run output:\n" + "---------------------------------",
);
} catch (err) {
console.error(
Expand Down

0 comments on commit 67b2904

Please sign in to comment.