| 108 | } |
| 109 | |
| 110 | function printUsage() { |
| 111 | process.stdout.write( |
| 112 | [ |
| 113 | "Usage:", |
| 114 | " node scripts/bench-ci-compare.mjs [options]", |
| 115 | "", |
| 116 | "Options:", |
| 117 | ` --current <path> Current results JSON (default: ${toRel(DEFAULT_CURRENT_PATH)})`, |
| 118 | ` --baseline <path> Baseline results JSON (default: ${toRel(DEFAULT_BASELINE_PATH)})`, |
| 119 | ` --config <path> Threshold config JSON (default: ${toRel(DEFAULT_CONFIG_PATH)})`, |
| 120 | ` --report-json <path> Machine report output (default: ${toRel(DEFAULT_REPORT_JSON_PATH)})`, |
| 121 | ` --report-md <path> Markdown report output (default: ${toRel(DEFAULT_REPORT_MD_PATH)})`, |
| 122 | " --fail-on-advisory Also fail CI when advisory regressions are present", |
| 123 | " --help, -h Show this help", |
| 124 | "", |
| 125 | ].join("\n"), |
| 126 | ); |
| 127 | } |
| 128 | |
| 129 | function readJson(path, label) { |
| 130 | let raw; |