- Revision
- 260610
- Author
- [email protected]
- Date
- 2020-04-23 17:12:00 -0700 (Thu, 23 Apr 2020)
Log Message
Support `--report-execution-time` to report execution time for each JSC stress test
https://bugs.webkit.org/show_bug.cgi?id=210938
Reviewed by Saam Barati.
We can run `run-_javascript_core-tests` with `--report-execution-time` option to report execution time for each JSC stress test,
to figure out which test is taking a long time. It appends execution-time to the verbose log. To see it stderr, --verbose is also
required.
$ run-_javascript_core-tests .... --verbose --report-execution-time
* Scripts/run-_javascript_core-tests:
(runJSCStressTests):
* Scripts/run-jsc-stress-tests:
* Scripts/webkitruby/jsc-stress-test-writer-default.rb:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (260609 => 260610)
--- trunk/Tools/ChangeLog 2020-04-24 00:07:25 UTC (rev 260609)
+++ trunk/Tools/ChangeLog 2020-04-24 00:12:00 UTC (rev 260610)
@@ -1,3 +1,21 @@
+2020-04-23 Yusuke Suzuki <[email protected]>
+
+ Support `--report-execution-time` to report execution time for each JSC stress test
+ https://bugs.webkit.org/show_bug.cgi?id=210938
+
+ Reviewed by Saam Barati.
+
+ We can run `run-_javascript_core-tests` with `--report-execution-time` option to report execution time for each JSC stress test,
+ to figure out which test is taking a long time. It appends execution-time to the verbose log. To see it stderr, --verbose is also
+ required.
+
+ $ run-_javascript_core-tests .... --verbose --report-execution-time
+
+ * Scripts/run-_javascript_core-tests:
+ (runJSCStressTests):
+ * Scripts/run-jsc-stress-tests:
+ * Scripts/webkitruby/jsc-stress-test-writer-default.rb:
+
2020-04-23 Wenson Hsieh <[email protected]>
Text manipulation does not account for text in fully clipped containers
Modified: trunk/Tools/Scripts/run-_javascript_core-tests (260609 => 260610)
--- trunk/Tools/Scripts/run-_javascript_core-tests 2020-04-24 00:07:25 UTC (rev 260609)
+++ trunk/Tools/Scripts/run-_javascript_core-tests 2020-04-24 00:12:00 UTC (rev 260610)
@@ -62,6 +62,7 @@
my $rubyRunner;
my $testWriter;
my $memoryLimited;
+my $reportExecutionTime;
my $report;
my $buildbotMaster;
@@ -272,6 +273,8 @@
--memory-limited Indicate that we are targeting the test for a memory limited device.
Skip tests tagged with //\@skip if \$memoryLimited
+ --report-execution-time Print execution time for each stress test.
+
--filter Only run tests whose name matches the given regular _expression_.
--env-vars Pass a list of environment variables to set before running tests.
Each environment variable should be separated by a space.
@@ -334,6 +337,7 @@
'ruby-runner' => \$rubyRunner,
'test-writer=s' => \$testWriter,
'memory-limited' => \$memoryLimited,
+ 'report-execution-time' => \$reportExecutionTime,
'filter=s' => \$filter,
'help' => \$showHelp,
'env-vars=s' => \$envVars,
@@ -787,6 +791,10 @@
push(@jscStressDriverCmd, "--memory-limited");
}
+ if ($reportExecutionTime) {
+ push(@jscStressDriverCmd, "--report-execution-time");
+ }
+
if ($filter) {
push(@jscStressDriverCmd, "--filter");
push(@jscStressDriverCmd, $filter);
Modified: trunk/Tools/Scripts/run-jsc-stress-tests (260609 => 260610)
--- trunk/Tools/Scripts/run-jsc-stress-tests 2020-04-24 00:07:25 UTC (rev 260609)
+++ trunk/Tools/Scripts/run-jsc-stress-tests 2020-04-24 00:12:00 UTC (rev 260610)
@@ -121,6 +121,7 @@
$mode = "full"
$buildType = "release"
$forceCollectContinuously = false
+$reportExecutionTime = false
def usage
puts "run-jsc-stress-tests -j <shell path> <collections path> [<collections path> ...]"
@@ -150,6 +151,7 @@
puts " \"ruby\" to use ruby scripts for systems without a unix shell."
puts "--remote Specify a remote host on which to run tests from command line argument."
puts "--remote-config-file Specify a remote host on which to run tests from JSON file."
+ puts "--report-execution-time Print execution time for each test."
puts "--child-processes (-c) Specify the number of child processes."
puts "--filter Only run tests whose name matches the given regular _expression_."
puts "--help (-h) Print this message."
@@ -185,6 +187,7 @@
['--test-writer', GetoptLong::REQUIRED_ARGUMENT],
['--remote', GetoptLong::REQUIRED_ARGUMENT],
['--remote-config-file', GetoptLong::REQUIRED_ARGUMENT],
+ ['--report-execution-time', GetoptLong::NO_ARGUMENT],
['--model', GetoptLong::REQUIRED_ARGUMENT],
['--child-processes', '-c', GetoptLong::REQUIRED_ARGUMENT],
['--filter', GetoptLong::REQUIRED_ARGUMENT],
@@ -236,6 +239,8 @@
$remoteHosts << RemoteHost.new("default-#{$remoteHosts.length}", uri.user, uri.host, uri.port)
when '--remote-config-file'
$remoteConfigFile = arg
+ when '--report-execution-time'
+ $reportExecutionTime = true
when '--child-processes'
$numChildProcesses = arg.to_i
when '--filter'
Modified: trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb (260609 => 260610)
--- trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb 2020-04-24 00:07:25 UTC (rev 260609)
+++ trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb 2020-04-24 00:12:00 UTC (rev 260610)
@@ -263,8 +263,12 @@
end
def successCommand
- if $progressMeter or $verbosity >= 2
- "rm -f #{failFile} ; echo PASS: #{Shellwords.shellescape(@name)}"
+ executionTimeMessage = ""
+ if $reportExecutionTime
+ executionTimeMessage = " $(($SECONDS - $START_TIME))s"
+ end
+ if $progressMeter or $reportExecutionTime or $verbosity >= 2
+ "rm -f #{failFile} ; echo PASS: #{Shellwords.shellescape(@name)}#{executionTimeMessage}"
else
"rm -f #{failFile}"
end
@@ -277,6 +281,9 @@
def writeRunScript(filename)
File.open(filename, "w") {
| outp |
+ if $reportExecutionTime
+ outp.puts "START_TIME=$SECONDS"
+ end
outp.puts "echo Running #{Shellwords.shellescape(@name)}"
cmd = "(" + shellCommand + " || (echo $? > #{failFile})) 2>&1 "
cmd += @outputHandler.call(@name)