Changeset 232854 in webkit


Ignore:
Timestamp:
Jun 14, 2018 2:41:07 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Test262-Runner: Add more information in the summarized stats
https://bugs.webkit.org/show_bug.cgi?id=185749

Patch by Leo Balter <Leo Balter> on 2018-06-14
Reviewed by Michael Saboff.

This patch adds extra information in the summarized stats for the given results for each run.
This includes a total of files, a total of executed files and a time information per path and feature.

  • Scripts/test262/Runner.pm:

(summarizeResults):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r232844 r232854  
     12018-06-14  Leo Balter  <leonardo.balter@gmail.com>
     2
     3        Test262-Runner: Add more information in the summarized stats
     4        https://bugs.webkit.org/show_bug.cgi?id=185749
     5
     6        Reviewed by Michael Saboff.
     7
     8        This patch adds extra information in the summarized stats for the given results for each run.
     9        This includes a total of files, a total of executed files and a time information per path and feature.
     10        * Scripts/test262/Runner.pm:
     11        (summarizeResults):
     12
    1132018-06-14  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    214
  • trunk/Tools/Scripts/test262/Runner.pm

    r232841 r232854  
    842842
    843843                if (not exists $byfeature{$feature}) {
    844                     $byfeature{$feature} = [0, 0, 0]
     844                    $byfeature{$feature} = [0, 0, 0, 0];
    845845                }
    846846
     
    854854                    $byfeature{$feature}->[2]++;
    855855                }
     856
     857                if ($test->{time}) {
     858                    $byfeature{$feature}->[3] += $test->{time};
     859                }
    856860            }
    857861        }
     
    862866
    863867            if (not exists $bypath{$partialpath}) {
    864                 $bypath{$partialpath} = [0, 0, 0];
     868                $bypath{$partialpath} = [0, 0, 0, 0];
    865869            }
    866870
     
    874878                $bypath{$partialpath}->[2]++;
    875879            }
     880
     881            if ($test->{time}) {
     882                $bypath{$partialpath}->[3] += $test->{time};
     883            }
    876884        }
    877885
     
    880888    open(my $sfh, '>', $summaryTxtFile) or die $!;
    881889
    882     print $sfh sprintf("%-6s %-6s %-6s %-6s %s\n", '%PASS', 'PASS', 'FAIL', 'SKIP', 'FOLDER');
     890    print $sfh sprintf("%-6s %-6s %-6s %-6s %-6s %-6s %-7s %-6s %s\n", 'TOTAL', 'RAN', 'PASS-%', 'PASS', 'FAIL', 'SKIP', 'TIME', 'AVG', 'FOLDER');
    883891    foreach my $key (sort keys %bypath) {
    884         my $per = ($bypath{$key}->[0] / (
    885             $bypath{$key}->[0]
    886             + $bypath{$key}->[1]
    887             + $bypath{$key}->[2])) * 100;
    888 
    889         $per = sprintf("%.0f", $per) . "%";
    890 
    891         print $sfh sprintf("%-6s %-6d %-6d %-6d %s \n", $per,
     892        my $totalFilesRan = $bypath{$key}->[0] + $bypath{$key}->[1];
     893        my $totalFiles = $totalFilesRan + $bypath{$key}->[2];
     894
     895        my $per = sprintf("%.0f", ($bypath{$key}->[0] / $totalFiles) * 100) . "%";
     896
     897        my $time = sprintf("%.1f", $bypath{$key}->[3]) . "s";
     898        my $avgTime;
     899
     900        if ($totalFilesRan) {
     901            $avgTime = sprintf("%.2f", $bypath{$key}->[3] / $totalFilesRan) . "s";
     902        } else {
     903            $avgTime = "0s";
     904        }
     905
     906        print $sfh sprintf("%-6s %-6s %-6s %-6d %-6d %-6d %-7s %-6s %s\n",
     907                           $totalFiles,
     908                           $totalFilesRan,
     909                           $per,
    892910                           $bypath{$key}->[0],
    893911                           $bypath{$key}->[1],
    894                            $bypath{$key}->[2], $key,);
     912                           $bypath{$key}->[2],
     913                           $time,
     914                           $avgTime,
     915                           $key);
    895916    }
    896917
    897918    print $sfh "\n\n";
    898     print $sfh sprintf("%-6s %-6s %-6s %-6s %s\n", '%PASS', 'PASS', 'FAIL', 'SKIP', 'FEATURE');
     919    print $sfh sprintf("%-6s %-6s %-6s %-6s %-6s %-6s %-7s %-6s %s\n", 'TOTAL', 'RAN', 'PASS-%', 'PASS', 'FAIL', 'SKIP', 'TIME', 'AVG', 'FEATURE');
    899920
    900921    foreach my $key (sort keys %byfeature) {
    901         my $per = ($byfeature{$key}->[0] / (
    902             $byfeature{$key}->[0]
    903             + $byfeature{$key}->[1]
    904             + $byfeature{$key}->[2])) * 100;
    905 
    906         $per = sprintf("%.0f", $per) . "%";
    907 
    908         print $sfh sprintf("%-6s %-6d %-6d %-6d %s\n", $per,
     922        my $totalFilesRan = $byfeature{$key}->[0] + $byfeature{$key}->[1];
     923        my $totalFiles = $totalFilesRan + $byfeature{$key}->[2];
     924
     925        my $per = sprintf("%.0f", ($byfeature{$key}->[0] / $totalFiles) * 100) . "%";
     926
     927        my $time = sprintf("%.1f", $byfeature{$key}->[3]) . "s";
     928        my $avgTime;
     929
     930        if ($totalFilesRan) {
     931            $avgTime = sprintf("%.2f", $byfeature{$key}->[3] / $totalFilesRan) . "s";
     932        } else {
     933            $avgTime = "0s";
     934        }
     935
     936        print $sfh sprintf("%-6s %-6s %-6s %-6d %-6d %-6d %-7s %-6s %s\n",
     937                           $totalFiles,
     938                           $totalFilesRan,
     939                           $per,
    909940                           $byfeature{$key}->[0],
    910941                           $byfeature{$key}->[1],
    911                            $byfeature{$key}->[2], $key);
     942                           $byfeature{$key}->[2],
     943                           $time,
     944                           $avgTime,
     945                           $key);
    912946    }
    913947
Note: See TracChangeset for help on using the changeset viewer.