@@ -2,11 +2,12 @@ import { uuid } from '@signalwire/core'
22import  {  test ,  expect  }  from  '../../fixtures' 
33import  {  SERVER_URL ,  createCFClient  }  from  '../../utils' 
44import  {  SignalWireContract  }  from  '@signalwire/js' 
5+ import  {  appendFileSync  }  from  'fs' 
56
6- const  MAX_CALL_SETUP_TIME_MS  =  5000 
7+ const  MAX_CALL_SETUP_TIME_MS  =  4000 
78
89test . describe ( 'CallFabric Start Time' ,  ( )  =>  { 
9-   test ( 'should join a video room within 5  seconds' ,  async  ( { 
10+   test ( 'should join a video room within 4  seconds' ,  async  ( { 
1011    createCustomPage, 
1112    resource, 
1213  } )  =>  { 
@@ -41,15 +42,26 @@ test.describe('CallFabric Start Time', () => {
4142      } 
4243    ) 
4344
44-     console . log ( '::group::CallFabric perf' ) 
45-     console . log ( `[PERF] call.start(ms)= ${ ms . toFixed ( 0 ) }  ` ) 
46-     console . log ( `::notice title=Call setup latency::${ Math . round ( ms ) }   ms` ) 
47-     console . log ( '::endgroup::' ) 
45+     if  ( ms  <  MAX_CALL_SETUP_TIME_MS )  { 
46+       console . log ( `\x1b[1;32m✅ call.start(): ${ ms . toFixed ( 0 ) }   ms\x1b[0m` ) 
47+     }  else  { 
48+       console . log ( `\x1b[1;31m❌ call.start(): ${ ms . toFixed ( 0 ) }   ms\x1b[0m` ) 
49+     } 
50+ 
51+     if  ( process . env . GITHUB_STEP_SUMMARY )  { 
52+       const  summary  =  [ 
53+         '### CallFabric Performance' , 
54+         '' , 
55+         `- Room: \`${ roomName }  \`` , 
56+         `- \`call.start()\`: **${ ms . toFixed ( 0 ) }   ms**` , 
57+       ] . join ( '\n' ) 
58+       appendFileSync ( process . env . GITHUB_STEP_SUMMARY ,  `\n${ summary }  \n` ) 
59+     } 
4860
4961    expect ( ms ) . toBeLessThan ( MAX_CALL_SETUP_TIME_MS ) 
5062  } ) 
5163
52-   test ( 'should join an audio-only room within 5  seconds' ,  async  ( { 
64+   test ( 'should join an audio-only room within 4  seconds' ,  async  ( { 
5365    createCustomPage, 
5466    resource, 
5567  } )  =>  { 
0 commit comments