[sledge] Change test report to use speedup ratio instead of percentage change

Reviewed By: jvillard

Differential Revision: D26571000

fbshipit-source-id: d088c8268
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent c5cbd3142e
commit b708c1e3db

@ -310,22 +310,22 @@ let write_html ranges rows chan =
<th>Test</th>
<th>elapsed<br>(sec)</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>user<br>(sec)</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>system<br>(sec)</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>alloc<br>(bytes)</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>promo<br>(bytes)</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>peak<br>(bytes)</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>Status</th>
<th>&Delta;<br></th>
<th>Steps</th>
@ -333,7 +333,7 @@ let write_html ranges rows chan =
<th>Cover</th>
<th>%%</th>
<th>&Delta;<br></th>
<th>&Delta;%%<br></th>
<th><math><mrow><mfrac><mi>prev</mi><mi>curr</mi></mfrac></mrow></math></th>
<th>Solver<br>Steps</th>
<th>&Delta;<br></th>
</tr>|} ;
@ -378,21 +378,23 @@ let write_html ranges rows chan =
in
let delta max pct t ppf d =
let r = 100. *. d /. t in
let x = (t -. d) /. t in
Printf.fprintf ppf
"<td align=\"right\" bgcolor=\"%s\">%12.3f</td>\n\
<td align=\"right\" bgcolor=\"%s\">%12.0f%%</td>\n"
<td align=\"right\" bgcolor=\"%s\">%12.2fx</td>\n"
(color max d) d (color pct r)
(Base.Float.round_decimal ~decimal_digits:2 r)
(Base.Float.round_decimal ~decimal_digits:2 x)
in
let delta_mem max pct w ppf d =
let r = if Float.(abs d < 0.000001) then 0. else 100. *. d /. w in
let x = (w -. d) /. w in
Printf.fprintf ppf
"<td align=\"right\" bgcolor=\"%s\">%s</td>\n\
<td align=\"right\" bgcolor=\"%s\">%12.0f%%</td>\n"
<td align=\"right\" bgcolor=\"%s\">%12.2fx</td>\n"
(color max d)
Core_kernel.Byte_units.(to_string_short (of_megabytes d))
(color pct r)
(Base.Float.round_decimal ~decimal_digits:2 r)
(Base.Float.round_decimal ~decimal_digits:2 x)
in
let timed = delta ranges.max_time ranges.pct_time in
let allocd = delta_mem ranges.max_alloc ranges.pct_alloc in

Loading…
Cancel
Save