WebKit Bugzilla
Attachment 340517 Details for
Bug 185692
: Test262-Runner: Set timer for each test run
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185692-20180516170801.patch (text/plain), 3.01 KB, created by
Leo Balter
on 2018-05-16 13:08:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Leo Balter
Created:
2018-05-16 13:08:03 PDT
Size:
3.01 KB
patch
obsolete
>Subversion Revision: 231861 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 9a4a47e364e8620daa422778c13e5ed1477d005a..aae4c077aeb744be257653db77ac8159bb6b01dd 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-16 Leo Balter <leonardo.balter@gmail.com> >+ >+ Test262-Runner: Set timer for each test run >+ https://bugs.webkit.org/show_bug.cgi?id=185692 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Sets a high resolution timer for each execution call of JSC, reporting >+ the time in the results report to allow identifying slow tests. >+ * Scripts/test262/Runner.pm: >+ (main): >+ (processFile): >+ (runTest): >+ (processResult): >+ > 2018-05-14 Yusuke Suzuki <utatane.tea@gmail.com> > > [Win] Use C++17 in MSVC >diff --git a/Tools/Scripts/test262/Runner.pm b/Tools/Scripts/test262/Runner.pm >index f48cca2bf28e6f9a9a30e378410b5d5120d51d12..2d1444928b1731198a5efbbe286cbe61cffc468e 100755 >--- a/Tools/Scripts/test262/Runner.pm >+++ b/Tools/Scripts/test262/Runner.pm >@@ -41,6 +41,7 @@ use Cwd qw(abs_path); > use FindBin; > use Env qw(DYLD_FRAMEWORK_PATH); > use Config; >+use Time::HiRes qw(time); > > my $podIsAvailable; > if (eval {require Pod::Usage; 1;}) { >@@ -397,9 +398,7 @@ sub main { > > print $skipfilecount . " test files skipped\n"; > >- my $endTime = time(); >- my $totalTime = $endTime - $startTime; >- print "Done in $totalTime seconds!\n"; >+ printf("Done in %.2f seconds!\n", time() - $startTime); > > my $totalfailures = $expect ? $newfailcount : $failcount; > exit ($totalfailures ? 1 : 0); >@@ -512,9 +511,9 @@ sub processFile { > ($includesfh, $includesfile) = compileTest($includes) if defined $includes; > > foreach my $scenario (@scenarios) { >- my $result = runTest($includesfile, $filename, $scenario, $data); >+ my ($result, $execTime) = runTest($includesfile, $filename, $scenario, $data); > >- $resultsdata = processResult($filename, $data, $scenario, $result); >+ $resultsdata = processResult($filename, $data, $scenario, $result, $execTime); > DumpFile($resultsfh, $resultsdata); > } > >@@ -623,21 +622,29 @@ sub runTest { > $defaultHarness = $deffile if $scenario ne 'raw'; > > my $prefix = qq(DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH); >+ >+ my $execTimeStart = time(); > my $result = qx($prefix $JSC $args $defaultHarness $includesfile '$prefixFile$filename'); >+ my $execTime = time() - $execTimeStart; > > chomp $result; > >- return $result if ($?); >+ if ($?) { >+ return ($result, $execTime); >+ } else { >+ return (0, $execTime); >+ } > } > > sub processResult { >- my ($path, $data, $scenario, $result) = @_; >+ my ($path, $data, $scenario, $result, $execTime) = @_; > > # Report a relative path > my $file = abs2rel( $path, $test262Dir ); > my %resultdata; > $resultdata{path} = $file; > $resultdata{mode} = $scenario; >+ $resultdata{time} = $execTime; > > my $currentfailure = parseError($result) if $result; > my $expectedfailure = $expect
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185692
: 340517