| OLD | NEW |
| 1 #!/usr/bin/env ruby | 1 #!/usr/bin/env ruby |
| 2 | 2 |
| 3 # Copyright (C) 2011 Apple Inc. All rights reserved. | 3 # Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions | 6 # modification, are permitted provided that the following conditions |
| 7 # are met: | 7 # are met: |
| 8 # 1. Redistributions of source code must retain the above copyright | 8 # 1. Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # 2. Redistributions in binary form must reproduce the above copyright | 10 # 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 } | 711 } |
| 712 | 712 |
| 713 cssCode = Benchfile.create("bencher-css") { | 713 cssCode = Benchfile.create("bencher-css") { |
| 714 | file | | 714 | file | |
| 715 doublePuts($stderr,file,".pass {\n font-weight: bold;\n color: green
;\n}\n.fail {\n font-weight: bold;\n color: red;\n}\n\#console {\n whit
e-space: pre-wrap;\n font-family: monospace;\n}") | 715 doublePuts($stderr,file,".pass {\n font-weight: bold;\n color: green
;\n}\n.fail {\n font-weight: bold;\n color: red;\n}\n\#console {\n whit
e-space: pre-wrap;\n font-family: monospace;\n}") |
| 716 } | 716 } |
| 717 | 717 |
| 718 preCode = Benchfile.create("bencher-pre") { | 718 preCode = Benchfile.create("bencher-pre") { |
| 719 | file | | 719 | file | |
| 720 doublePuts($stderr,file,"if (window.testRunner) {") | 720 doublePuts($stderr,file,"if (window.testRunner) {") |
| 721 doublePuts($stderr,file," testRunner.dumpAsText(window.enablePixelTesti
ng);") | 721 doublePuts($stderr,file," if (window.enablePixelTesting) {") |
| 722 doublePuts($stderr,file," testRunner.waitUntilDone();") | 722 doublePuts($stderr,file," testRunner.dumpAsTextWithPixelResults();"
) |
| 723 doublePuts($stderr,file," } else {") |
| 724 doublePuts($stderr,file," testRunner.dumpAsText();") |
| 725 doublePuts($stderr,file," }") |
| 723 doublePuts($stderr,file,"}") | 726 doublePuts($stderr,file,"}") |
| 724 doublePuts($stderr,file,"") | 727 doublePuts($stderr,file,"") |
| 725 doublePuts($stderr,file,"function debug(msg)") | 728 doublePuts($stderr,file,"function debug(msg)") |
| 726 doublePuts($stderr,file,"{") | 729 doublePuts($stderr,file,"{") |
| 727 doublePuts($stderr,file," var span = document.createElement(\"span\");"
) | 730 doublePuts($stderr,file," var span = document.createElement(\"span\");"
) |
| 728 doublePuts($stderr,file," document.getElementById(\"console\").appendCh
ild(span); // insert it first so XHTML knows the namespace") | 731 doublePuts($stderr,file," document.getElementById(\"console\").appendCh
ild(span); // insert it first so XHTML knows the namespace") |
| 729 doublePuts($stderr,file," span.innerHTML = msg + '<br />';") | 732 doublePuts($stderr,file," span.innerHTML = msg + '<br />';") |
| 730 doublePuts($stderr,file,"}") | 733 doublePuts($stderr,file,"}") |
| 731 doublePuts($stderr,file,"") | 734 doublePuts($stderr,file,"") |
| 732 doublePuts($stderr,file,"function quit() {") | 735 doublePuts($stderr,file,"function quit() {") |
| (...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 puts "sh runscript > results.txt" | 2092 puts "sh runscript > results.txt" |
| 2090 puts | 2093 puts |
| 2091 puts wrap("Then you can analyze the results by running bencher with the same
arguments "+ | 2094 puts wrap("Then you can analyze the results by running bencher with the same
arguments "+ |
| 2092 "as now, but replacing --prepare-only with --analyze results.txt."
, 78) | 2095 "as now, but replacing --prepare-only with --analyze results.txt."
, 78) |
| 2093 end | 2096 end |
| 2094 rescue => e | 2097 rescue => e |
| 2095 fail(e) | 2098 fail(e) |
| 2096 end | 2099 end |
| 2097 | 2100 |
| 2098 | 2101 |
| OLD | NEW |