59
59
border-radius : 3px ;
60
60
user-select : all;
61
61
}
62
+
63
+ # artifact-table th {
64
+ text-align : center;
65
+ }
66
+
67
+ # artifact-table td {
68
+ padding : 0 0 0 20px ;
69
+ }
62
70
</ style >
63
71
</ head >
64
72
70
78
< div id ="content ">
71
79
< h3 id ="title "> </ h3 >
72
80
< div id ="raw-urls "> </ div >
81
+ < h4 > Artifact Size</ h4 >
82
+ < table id ="artifact-table ">
83
+ < thead >
84
+ < tr id ="table-header ">
85
+ < th > Artifact</ th >
86
+ < th > Size</ th >
87
+ < th > Size delta</ th >
88
+ </ tr >
89
+ </ thead >
90
+ < tbody id ="artifact-body ">
91
+ </ tbody >
92
+ </ table >
73
93
< p > 'Time (%)' is the percentage of the cpu-clock time spent on this query (we do not use
74
94
wall-time as we want to account for parallelism).</ p >
75
95
< p > Executions do not include cached executions.</ p >
@@ -152,7 +172,7 @@ <h3 id="title"></h3>
152
172
let processed_url = ( commit , bench , run , ty ) => {
153
173
return `/perf/processed-self-profile?commit=${ commit } &benchmark=${ bench } &run_name=${ run } &type=${ ty } ` ;
154
174
} ;
155
- let processed_link = ( commit , { benchmark, run_name} , ty ) => {
175
+ let processed_link = ( commit , { benchmark, run_name } , ty ) => {
156
176
let url = processed_url ( commit , benchmark , run_name , ty ) ;
157
177
return `<a href="${ url } ">${ ty } </a>` ;
158
178
} ;
@@ -313,7 +333,7 @@ <h3 id="title"></h3>
313
333
fmt_delta (
314
334
to_seconds ( cur . incremental_load_time ) ,
315
335
to_seconds ( delta . incremental_load_time ) ,
316
- false ,
336
+ false ,
317
337
) ,
318
338
true ) . classList . add ( "incr" ) ;
319
339
} else {
@@ -322,6 +342,25 @@ <h3 id="title"></h3>
322
342
table . appendChild ( row ) ;
323
343
idx += 1 ;
324
344
}
345
+
346
+ let artifactTable = document . getElementById ( "artifact-body" ) ;
347
+ function td ( row , content ) {
348
+ let td = document . createElement ( "td" ) ;
349
+ td . innerHTML = content ;
350
+ row . appendChild ( td ) ;
351
+ return td ;
352
+ }
353
+ for ( let [ idx , element ] of data . profile . artifact_sizes . entries ( ) ) {
354
+ let row = document . createElement ( "tr" ) ;
355
+ const label = td ( row , element . label ) ;
356
+ label . style . textAlign = "center" ;
357
+ td ( row , element . bytes ) ;
358
+ if ( data . base_profile_delta && data . base_profile_delta . artifact_sizes [ idx ] ) {
359
+ td ( row , data . base_profile_delta . artifact_sizes [ idx ] . bytes ) ;
360
+ }
361
+ artifactTable . appendChild ( row ) ;
362
+ idx += 1 ;
363
+ }
325
364
}
326
365
327
366
function to_object ( element ) {
@@ -368,4 +407,4 @@ <h3 id="title"></h3>
368
407
</ script >
369
408
</ body >
370
409
371
- </ html >
410
+ </ html >
0 commit comments