@@ -70,7 +70,8 @@ export const Build: React.FC<Props> = React.memo((props) => {
70
70
logContainerRef . current . scrollTop = logContainerRef . current . scrollHeight ;
71
71
}
72
72
if ( stderrContainerRef . current ) {
73
- stderrContainerRef . current . scrollTop = stderrContainerRef . current . scrollHeight ;
73
+ stderrContainerRef . current . scrollTop =
74
+ stderrContainerRef . current . scrollHeight ;
74
75
}
75
76
} , [ shownLog ] ) ;
76
77
@@ -207,13 +208,17 @@ export const Build: React.FC<Props> = React.memo((props) => {
207
208
// const time: number | undefined = x.get("time");
208
209
// const time_str = time ? `(${(time / 1000).toFixed(1)} seconds)` : "";
209
210
let job_info_str = "" ;
210
- // if (y != null && y.type === " async") {
211
+ // Show build time and resource usage if available for async jobs
211
212
if ( x . type === "async" ) {
212
- const { elapsed_s, stats } = x ; // y
213
+ const { elapsed_s, stats } = x ;
213
214
if ( typeof elapsed_s === "number" && elapsed_s > 0 ) {
214
215
job_info_str = `Build time: ${ elapsed_s . toFixed ( 1 ) } seconds.` ;
215
216
}
216
- job_info_str += getResourceUsage ( stats , "peak" ) ;
217
+
218
+ // try to show peak resource usage if stats are available
219
+ if ( stats ) {
220
+ job_info_str += getResourceUsage ( stats , "peak" ) ;
221
+ }
217
222
}
218
223
const title = BUILD_SPECS [ stage ] . label ;
219
224
// highlights tab, if there is at least one parsed error
@@ -381,13 +386,15 @@ export const Build: React.FC<Props> = React.memo((props) => {
381
386
{ status }
382
387
{ "\n" }
383
388
</ div >
384
- < div style = { {
385
- flex : 1 ,
386
- display : "flex" ,
387
- flexDirection : "column" ,
388
- gap : hasStdout && hasStderr ? "10px" : "0" ,
389
- overflow : "hidden"
390
- } } >
389
+ < div
390
+ style = { {
391
+ flex : 1 ,
392
+ display : "flex" ,
393
+ flexDirection : "column" ,
394
+ gap : hasStdout && hasStderr ? "10px" : "0" ,
395
+ overflow : "hidden" ,
396
+ } }
397
+ >
391
398
{ hasStdout && (
392
399
< div
393
400
style = { {
0 commit comments