@@ -49,6 +49,7 @@ const hosts = {
4949 node18 : "node@18.15.0" ,
5050 bun : "bun@1.1.24" ,
5151 vscode : "vscode@1.82.1" ,
52+ native : "native" , // Native Go binary; no host runtime needed.
5253} as const satisfies Record < string , string > ;
5354
5455const allJobKinds = [ "tsc" , "tsserver" , "startup" ] as const ;
@@ -389,7 +390,7 @@ async function parseInput({ input, isPr, gitParseRev }: SetupPipelineInput) {
389390 return parsed ;
390391}
391392
392- function * transformPreset ( parameters : Parameters , iter : Iterable < Scenario > ) : Iterable < Scenario > {
393+ function * transformPreset ( parameters : Parameters , iter : Iterable < Scenario > , tsgo : boolean ) : Iterable < Scenario > {
393394 const all = [ ...worker ( ) ] ;
394395
395396 for ( const scenario of all ) {
@@ -410,9 +411,9 @@ function* transformPreset(parameters: Parameters, iter: Iterable<Scenario>): Ite
410411
411412 function * worker ( ) : Iterable < Scenario > {
412413 for ( const scenario of iter ) {
413- const hosts = parameters . hosts ?? [ scenario . host ] ;
414+ const scenarioHosts = tsgo ? [ hosts . native ] : ( parameters . hosts ?? [ scenario . host ] ) ;
414415
415- for ( const host of hosts ) {
416+ for ( const host of scenarioHosts ) {
416417 yield {
417418 ...scenario ,
418419 host,
@@ -433,12 +434,13 @@ export interface SetupPipelineInput {
433434 input : string ;
434435 baselining : boolean ;
435436 isPr : boolean ;
437+ tsgo : boolean ;
436438 shouldLog : boolean ;
437439 gitParseRev : ( query : string ) => Promise < GitParseRevResult > ;
438440}
439441
440442export async function setupPipeline ( input : SetupPipelineInput ) {
441- const { baselining, shouldLog } = input ;
443+ const { baselining, shouldLog, tsgo } = input ;
442444
443445 const parameters = await parseInput ( input ) ;
444446 if ( shouldLog ) {
@@ -470,7 +472,7 @@ export async function setupPipeline(input: SetupPipelineInput) {
470472 let maxCost = 0 ;
471473 const costPerAgent = new Map < Agent , number > ( ) ;
472474
473- for ( const scenario of transformPreset ( parameters , preset ( ) ) ) {
475+ for ( const scenario of transformPreset ( parameters , preset ( ) , tsgo ) ) {
474476 const agent = baselining ? scenario . agent : "any" ;
475477 const jobName = sanitizeJobName ( `${ scenario . kind } _${ scenario . host } _${ scenario . name } ` ) ;
476478 matrix [ agent ] [ jobName ] = {
@@ -591,11 +593,13 @@ if (esMain(import.meta)) {
591593 const input = getNonEmptyEnv ( "TSPERF_PRESET" ) ;
592594 const baselining = parseBoolean ( process . env . USE_BASELINE_MACHINE , false ) ;
593595 const isPr = parseBoolean ( process . env . IS_PR , false ) ;
596+ const tsgo = ! ! process . env . TSGOFLAG ;
594597
595598 const { outputVariables } = await setupPipeline ( {
596599 input,
597600 baselining,
598601 isPr,
602+ tsgo,
599603 shouldLog : true ,
600604 gitParseRev,
601605 } ) ;
0 commit comments