Changeset 232854 in webkit
- Timestamp:
- Jun 14, 2018 2:41:07 PM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r232844 r232854 1 2018-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 1 13 2018-06-14 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 14 -
trunk/Tools/Scripts/test262/Runner.pm
r232841 r232854 842 842 843 843 if (not exists $byfeature{$feature}) { 844 $byfeature{$feature} = [0, 0, 0 ]844 $byfeature{$feature} = [0, 0, 0, 0]; 845 845 } 846 846 … … 854 854 $byfeature{$feature}->[2]++; 855 855 } 856 857 if ($test->{time}) { 858 $byfeature{$feature}->[3] += $test->{time}; 859 } 856 860 } 857 861 } … … 862 866 863 867 if (not exists $bypath{$partialpath}) { 864 $bypath{$partialpath} = [0, 0, 0 ];868 $bypath{$partialpath} = [0, 0, 0, 0]; 865 869 } 866 870 … … 874 878 $bypath{$partialpath}->[2]++; 875 879 } 880 881 if ($test->{time}) { 882 $bypath{$partialpath}->[3] += $test->{time}; 883 } 876 884 } 877 885 … … 880 888 open(my $sfh, '>', $summaryTxtFile) or die $!; 881 889 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'); 883 891 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, 892 910 $bypath{$key}->[0], 893 911 $bypath{$key}->[1], 894 $bypath{$key}->[2], $key,); 912 $bypath{$key}->[2], 913 $time, 914 $avgTime, 915 $key); 895 916 } 896 917 897 918 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'); 899 920 900 921 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, 909 940 $byfeature{$key}->[0], 910 941 $byfeature{$key}->[1], 911 $byfeature{$key}->[2], $key); 942 $byfeature{$key}->[2], 943 $time, 944 $avgTime, 945 $key); 912 946 } 913 947
Note: See TracChangeset
for help on using the changeset viewer.