@@ -76,9 +76,38 @@ def print_res (i)
76
76
f . puts "<p>Benchmarking in progress: #{ i } /#{ $projects. length } <progress value=\" #{ i } \" max=\" #{ $projects. length } \" /></p>" unless i . nil?
77
77
f . puts "<table border=2 cellpadding=4 style=\" font-size: 90%\" >"
78
78
gname = ""
79
+ first_group = true
79
80
total_assert_count = 0
80
81
$projects. each do |p |
81
82
if p . group != gname then
83
+ if first_group == false then
84
+ f . puts "<tr>"
85
+ f . puts "<td colspan=3> Summary </td>"
86
+ f . puts "<td>#{ $analyses[ 0 ] [ 4 ] } </td>"
87
+ $analyses. each do |a |
88
+ success = a [ 2 ]
89
+ unknown = a [ 3 ]
90
+ total = a [ 4 ]
91
+
92
+ thenumbers = ""
93
+ if success == total then
94
+ thenumbers << "<font color=\" green\" title=\" success\" >✔️</font> "
95
+ elsif unknown == total then
96
+ thenumbers << "<font color=\" red\" title=\" unknown\" >❌</font>"
97
+ else
98
+ thenumbers << "<font color=\" green\" title=\" success\" >✔️<b>#{ success } </b></font> "
99
+ thenumbers << "<font color=\" red\" title=\" unknown\" >❌<b>#{ unknown } </b></font>"
100
+ end
101
+
102
+ f . puts "<td> #{ thenumbers } </td>"
103
+ a [ 2 ] = 0
104
+ a [ 3 ] = 0
105
+ a [ 4 ] = 0
106
+ end
107
+ f . puts "</tr>"
108
+ else
109
+ first_group = false
110
+ end
82
111
gname = p . group
83
112
f . puts "<tr><th colspan=#{ 4 +$analyses. size +1 } >#{ gname } </th></tr>"
84
113
if $print_desc then
@@ -153,6 +182,12 @@ def print_res (i)
153
182
# thenumbers << "<font color=\"orange\" title=\"vulnerable memory locations\">#{vulner}</font> + "
154
183
# thenumbers << "<font color=\"red\" title=\"unsafe memory locations\">#{unsafe}</font>; "
155
184
thenumbers = ""
185
+
186
+ a [ 2 ] += success
187
+ a [ 3 ] += unknown
188
+ a [ 4 ] += assert_count
189
+
190
+
156
191
# thenumbers << "<font color=\"magenta\" title=\"uncalled functions\">#{uncalled}</font>; " if uncalled > 0
157
192
# thenumbers << "<b><font color=\"red\" title=\"dead lines\">#{dead}</font></b>+"
158
193
# thenumbers << "<b title=\"live lines\">#{live}</b>="
@@ -182,6 +217,35 @@ def print_res (i)
182
217
f . puts "</tr>"
183
218
f . puts "</tr>"
184
219
end
220
+
221
+ f . puts "<tr>"
222
+ f . puts "<td colspan=3> Summary </td>"
223
+ f . puts "<td>#{ $analyses[ 0 ] [ 4 ] } </td>"
224
+ $analyses. each do |a |
225
+ success = a [ 2 ]
226
+ unknown = a [ 3 ]
227
+ total = a [ 4 ]
228
+
229
+ thenumbers = ""
230
+ if success == total then
231
+ thenumbers << "<font color=\" green\" title=\" success\" >✔️</font> "
232
+ elsif unknown == total then
233
+ thenumbers << "<font color=\" red\" title=\" unknown\" >❌</font>"
234
+ else
235
+ thenumbers << "<font color=\" green\" title=\" success\" >✔️<b>#{ success } </b></font> "
236
+ thenumbers << "<font color=\" red\" title=\" unknown\" >❌<b>#{ unknown } </b></font>"
237
+ end
238
+
239
+ f . puts "<td> #{ thenumbers } </td>"
240
+
241
+
242
+ a [ 2 ] = 0
243
+ a [ 3 ] = 0
244
+ a [ 4 ] = 0
245
+ end
246
+ f . puts "</tr>"
247
+
248
+
185
249
f . puts "</table>"
186
250
f . print "<p style=\" font-size: 80%; white-space: pre-line\" >"
187
251
f . puts "Last updated: #{ Time . now . strftime ( "%Y-%m-%d %H:%M:%S %z" ) } "
@@ -227,7 +291,7 @@ def print_res (i)
227
291
gname = $1. chomp
228
292
skipgrp << gname if line =~ /SKIP/
229
293
elsif line =~ /(.*): ?(.*)/
230
- $analyses << [ $1, $2]
294
+ $analyses << [ $1, $2, 0 , 0 , 0 ]
231
295
else
232
296
name = line . chomp
233
297
url = f . gets . chomp
0 commit comments