-
-
Notifications
You must be signed in to change notification settings - Fork 299
Expand file tree
/
Copy pathpgo.js
More file actions
20 lines (16 loc) · 612 Bytes
/
Copy pathpgo.js
File metadata and controls
20 lines (16 loc) · 612 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { $ } from "bun";
let additional = [];
if (Bun.argv.length >= 3) {
additional = Bun.argv.slice(2);
}
let server = null;
try {
server = Bun.spawn(['cargo', 'run', '--release', '--manifest-path', 'pgo/server/Cargo.toml']);
await $`cargo pgo run -- --profile pgo ${additional} -- -z 1m -c 900 --no-tui http://localhost:8888`;
await $`cargo pgo run --keep-profiles -- --profile pgo ${additional} -- -n 1000000 -c 900 --no-tui http://localhost:8888`;
await $`cargo pgo optimize build -- --profile pgo ${additional}`
} finally {
if (server !== null) {
server.kill();
}
}