Skip to content

Commit 8856050

Browse files
committed
fake native host
1 parent 4caea86 commit 8856050

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

scripts/src/runTsPerf.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ async function getCommonBenchmarkArgs() {
6363
const cpu = getNonEmptyEnv("TSPERF_AGENT_BENCHMARK_CPU");
6464
const info = await getRepoInfo(args.builtDir);
6565

66-
if (host !== "native") {
67-
tsperfArgs.push("--host", host);
68-
}
66+
tsperfArgs.push("--host", host);
6967
tsperfArgs.push("--scenario", scenario);
7068
tsperfArgs.push("--iterations", iterations);
7169
tsperfArgs.push("--warmups", warmups);

ts-perf/packages/api/src/model/host.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ export class Host {
183183
const availableHosts = await this.getAvailableHosts();
184184
const results = new Set<Host>();
185185
for (const host of hosts) {
186+
if (host === "native") {
187+
results.add(new Host("native"));
188+
continue;
189+
}
186190
const pattern = typeof host === "string" ? HostPattern.parse(host) : HostPattern.create(host);
187191
if (pattern.executable && !(pattern.arch || pattern.version)) {
188192
if (!installed) {

0 commit comments

Comments
 (0)