This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository fateserver.

commit 0cb34cf605083086436b8f8132f0b65fdc825c6c
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Thu Jul 30 01:06:26 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Wed Aug 12 00:42:16 2026 +0200

    index: round the percentages in the failometer
    
    They land in a CSS width and a tooltip, where 17 significant digits are of
    no use.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 index.cgi | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/index.cgi b/index.cgi
index d3dc943..b0b1053 100755
--- a/index.cgi
+++ b/index.cgi
@@ -93,9 +93,17 @@ for my $slot (@slots) {
                          "<a href=\"\">Clear all search criteria.</a>" :
                          'No data in $fatedir.';
 
-$allpass = 100 * $allpass / @reps;
-$allfail = 100 * $allfail / @reps;
-my $warn = 100 - $allpass - $allfail;
+# Percentage of $n out of $total, rounded to one decimal for display.
+sub pct {
+    my ($n, $total) = @_;
+    return int(1000 * $n / $total + 0.5) / 10;
+}
+
+my $nreps = @reps;
+my $warn = $nreps - $allpass - $allfail;
+$allpass = pct($allpass, $nreps);
+$allfail = pct($allfail, $nreps);
+$warn    = pct($warn,    $nreps);
 
 my @sort = ('subarch', 'os', 'cc', 'comment', 'slot');
 defined $sort and unshift @sort, split /\/\//, $sort;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to