@@ -2153,7 +2153,7 @@ test('perf samples Apple cpu and memory metrics on iOS simulator app sessions',
21532153 if ( cmd === 'plutil' ) {
21542154 return { stdout : 'ExampleSimExec\n' , stderr : '' , exitCode : 0 } ;
21552155 }
2156- if ( cmd === 'xcrun' && args . includes ( 'spawn' ) && args . includes ( '/bin/ ps' ) ) {
2156+ if ( cmd === 'xcrun' && args . includes ( 'spawn' ) && args . includes ( 'ps' ) ) {
21572157 return {
21582158 stdout : [ '111 11.0 6144 ExampleSimExec' , '222 2.0 2048 SpringBoard' ] . join ( '\n' ) ,
21592159 stderr : '' ,
@@ -2252,64 +2252,11 @@ test('perf samples Apple cpu and memory metrics on physical iOS devices', async
22522252 return { stdout : '' , stderr : '' , exitCode : 0 } ;
22532253 }
22542254 if ( args [ 0 ] === 'xctrace' && args [ 1 ] === 'record' ) {
2255- if ( ! args . includes ( 'Animation Hitches' ) ) {
2256- vi . setSystemTime ( new Date ( Date . now ( ) + 1000 ) ) ;
2257- }
2255+ vi . setSystemTime ( new Date ( Date . now ( ) + 1000 ) ) ;
22582256 return { stdout : '' , stderr : '' , exitCode : 0 } ;
22592257 }
22602258 if ( args [ 0 ] === 'xctrace' && args [ 1 ] === 'export' ) {
22612259 const outputIndex = args . indexOf ( '--output' ) ;
2262- const xpath = args [ args . indexOf ( '--xpath' ) + 1 ] ?? '' ;
2263- if ( xpath . includes ( 'hitches-frame-lifetimes' ) ) {
2264- await fs . promises . writeFile (
2265- args [ outputIndex + 1 ] ! ,
2266- [
2267- '<?xml version="1.0"?>' ,
2268- '<trace-query-result><node>' ,
2269- '<schema name="hitches-frame-lifetimes">' ,
2270- '<col><mnemonic>start</mnemonic></col>' ,
2271- '<col><mnemonic>duration</mnemonic></col>' ,
2272- '</schema>' ,
2273- '<row><start-time>0</start-time><duration>16000000</duration></row>' ,
2274- '<row><start-time>16000000</start-time><duration>16000000</duration></row>' ,
2275- '</node></trace-query-result>' ,
2276- ] . join ( '' ) ,
2277- ) ;
2278- return { stdout : '' , stderr : '' , exitCode : 0 } ;
2279- }
2280- if ( xpath . includes ( 'device-display-info' ) ) {
2281- await fs . promises . writeFile (
2282- args [ outputIndex + 1 ] ! ,
2283- [
2284- '<?xml version="1.0"?>' ,
2285- '<trace-query-result><node>' ,
2286- '<schema name="device-display-info">' ,
2287- '<col><mnemonic>timestamp</mnemonic></col>' ,
2288- '<col><mnemonic>max-refresh-rate</mnemonic></col>' ,
2289- '</schema>' ,
2290- '<row><event-time>0</event-time><uint32>60</uint32></row>' ,
2291- '</node></trace-query-result>' ,
2292- ] . join ( '' ) ,
2293- ) ;
2294- return { stdout : '' , stderr : '' , exitCode : 0 } ;
2295- }
2296- if ( xpath . includes ( 'hitches' ) ) {
2297- await fs . promises . writeFile (
2298- args [ outputIndex + 1 ] ! ,
2299- [
2300- '<?xml version="1.0"?>' ,
2301- '<trace-query-result><node>' ,
2302- '<schema name="hitches">' ,
2303- '<col><mnemonic>start</mnemonic></col>' ,
2304- '<col><mnemonic>duration</mnemonic></col>' ,
2305- '<col><mnemonic>process</mnemonic></col>' ,
2306- '<col><mnemonic>is-system</mnemonic></col>' ,
2307- '</schema>' ,
2308- '</node></trace-query-result>' ,
2309- ] . join ( '' ) ,
2310- ) ;
2311- return { stdout : '' , stderr : '' , exitCode : 0 } ;
2312- }
23132260 exportCount += 1 ;
23142261 await fs . promises . writeFile (
23152262 args [ outputIndex + 1 ] ! ,
0 commit comments