Diff

Differences From Artifact [b70c6b112e]:

To Artifact [343dd2d6d2]:


    68     68   
    69     69   	return [join $desc {, }]
    70     70   }
    71     71   
    72     72   proc pretty_print_size {size} {
    73     73   	foreach unit [list "" K M G T P] {
    74     74   		if {$size < 1024} {
           75  +			if {$size < 10} {
           76  +				set size [expr {round($size * 10) / 10.0}]
           77  +			} else {
           78  +				set size [expr {round($size)}]
           79  +			}
           80  +
    75     81   			return "$size [string trim ${unit}B]"
    76     82   		}
    77     83   
    78         -		set size [expr {${size} / 1024}]
           84  +		set size [expr {${size} / 1024.000}]
    79     85   	}
    80     86   }
    81     87   
    82     88   ##########################################################################
    83     89   ## MAIN BODY #############################################################
    84     90   ##########################################################################
    85     91   
................................................................................
   155    161   puts $fd "    <title>KitCreator Build Status</title>"
   156    162   puts $fd "  </head>"
   157    163   puts $fd "  <body>"
   158    164   puts $fd "    <table cellpadding=\"2\" border=\"1\">"
   159    165   foreach key [lsort -dictionary [array names allkitinfo]] {
   160    166   	puts $fd "      <tr>"
   161    167   	puts $fd "        <th><u>Tclkit for [pretty_print_key $key]</u></th>"
          168  +	puts $fd "        <th>Kit Size</th>"
   162    169   	puts $fd "        <th>Status</th>"
   163    170   	puts $fd "        <th>Log</th>"
   164    171   	puts $fd "        <th>Failed Tests</th>"
   165    172   	puts $fd "      </tr>"
   166    173   	foreach kitinfo_list $allkitinfo($key) {
   167    174   		puts $fd "      <tr>"
   168    175   		unset -nocomplain kitinfo
................................................................................
   195    202   			}
   196    203   
   197    204   			lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>"
   198    205   		}
   199    206   
   200    207   
   201    208   		puts $fd "        <td><a href=\"$kitinfo(file)\">[pretty_print_buildinfo $kitinfo(buildflags)]</a></td>"
          209  +		puts $fd "        <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(file)]]]</td>"
   202    210   		puts $fd "        <td bgcolor=\"$bgcolor\">$status</td>"
   203    211   		puts $fd "        <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>"
   204    212   		puts $fd "        <td>[join $failedtestshtml {, }]</td>"
   205    213   		puts $fd "      </tr>"
   206    214   	}
   207    215   
   208    216   }
   209    217   puts $fd "    </table>"
   210    218   puts $fd "  </body>"
   211    219   puts $fd "</html>"
   212    220   
   213    221   close $fd