Changeset 61507
- Timestamp:
- 01/21/2026 05:23:44 PM (8 days ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
.github/workflows/reusable-performance-report-v2.yml (modified) (1 diff)
-
.github/workflows/reusable-performance.yml (modified) (1 diff)
-
tests/performance/log-results.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/reusable-performance-report-v2.yml
r61209 r61507 105 105 BASE_SHA: ${{ steps.base-sha.outputs.result }} 106 106 CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} 107 HOST_NAME: www.codevitals.run107 HOST_NAME: codevitals.run 108 108 run: | 109 109 if [ -z "$CODEVITALS_PROJECT_TOKEN" ]; then -
trunk/.github/workflows/reusable-performance.yml
r61209 r61507 348 348 BASE_SHA: ${{ steps.base-sha.outputs.result }} 349 349 CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} 350 HOST_NAME: " www.codevitals.run"350 HOST_NAME: "codevitals.run" 351 351 run: | 352 352 if [ -z "$CODEVITALS_PROJECT_TOKEN" ]; then -
trunk/tests/performance/log-results.js
r59582 r61507 11 11 * External dependencies. 12 12 */ 13 const https = require( 'https' );14 13 const [ token, branch, hash, baseHash, date, host ] = 15 14 process.argv.slice( 2 ); … … 83 82 } 84 83 85 const data = new TextEncoder().encode( 86 JSON.stringify( { 87 branch, 88 hash, 89 baseHash, 90 timestamp: date, 91 metrics: metrics, 92 baseMetrics: baseMetrics, 93 } ) 94 ); 95 96 const options = { 97 hostname: host, 98 port: 443, 99 path: '/api/log?token=' + token, 100 method: 'POST', 101 headers: { 102 'Content-Type': 'application/json', 103 'Content-Length': data.length, 104 }, 105 }; 106 107 const req = https.request( options, ( res ) => { 108 console.log( `statusCode: ${ res.statusCode }` ); 109 110 res.on( 'data', ( d ) => { 111 process.stdout.write( d ); 112 } ); 84 const data = JSON.stringify( { 85 branch, 86 hash, 87 baseHash, 88 timestamp: date, 89 metrics: metrics, 90 baseMetrics: baseMetrics, 113 91 } ); 114 92 115 req.on( 'error', ( error ) => { 116 console.error( error ); 117 process.exit( 1 ); 118 } ); 93 ( async () => { 94 try { 95 const response = await fetch( 96 `https://${ host }/api/log?token=${ token }`, 97 { 98 method: 'POST', 99 headers: { 100 'Content-Type': 'application/json', 101 }, 102 body: data, 103 } 104 ); 119 105 120 req.write( data ); 121 req.end(); 106 console.log( `statusCode: ${ response.status }` ); 107 108 const responseText = await response.text(); 109 if ( responseText ) { 110 console.log( responseText ); 111 } 112 113 if ( ! response.ok ) { 114 process.exit( 1 ); 115 } 116 } catch ( error ) { 117 console.error( error ); 118 process.exit( 1 ); 119 } 120 } )();
Note: See TracChangeset
for help on using the changeset viewer.