Skip to content
This repository
Browse code

wip

  • Loading branch information...
commit fc201479bcaafbeb9e7bebe72864e07e17c9e487 1 parent d26ce73
Joe Ferris authored
6  benchmarks/run
@@ -22,9 +22,11 @@ class Runner
22 22
   end
23 23
 
24 24
   def run
25  
-    RUN_COUNT.times do
  25
+    (1..RUN_COUNT).each do |count|
26 26
       @session.visit "#{AppRunner.app_host}"
27  
-      @runs << Benchmark.realtime { @benchmark.run(@session) }
  27
+      run = Benchmark.realtime { @benchmark.run(@session) }
  28
+      printf("#{@name}:#{count}: %.02f seconds\n", run)
  29
+      @runs << run
28 30
       @session.reset!
29 31
     end
30 32
 
20  lib/capybara/webkit/connection.rb
@@ -48,32 +48,12 @@ def start_server
48 48
     def open_pipe
49 49
       @pipe_stdin, @pipe_stdout, @pipe_stderr, wait_thr = Open3.popen3(SERVER_PATH)
50 50
       @pid = wait_thr[:pid]
51  
-      register_shutdown_hook
52 51
     end
53 52
 
54 53
     def check_ready
55 54
       result = @pipe_stdout.gets
56 55
     end
57 56
 
58  
-    def register_shutdown_hook
59  
-      @owner_pid = Process.pid
60  
-      at_exit do
61  
-        if Process.pid == @owner_pid
62  
-          kill_process
63  
-        end
64  
-      end
65  
-    end
66  
-
67  
-    def kill_process
68  
-      if RUBY_PLATFORM =~ /mingw32/
69  
-        Process.kill(9, @pid)
70  
-      else
71  
-        Process.kill("INT", @pid)
72  
-      end
73  
-    rescue Errno::ESRCH
74  
-      # This just means that the webkit_server process has already ended
75  
-    end
76  
-
77 57
     def forward_output_in_background_thread
78 58
       Thread.new do
79 59
         Thread.current.abort_on_exception = true
2  src/main.cpp
@@ -36,8 +36,6 @@ int main(int argc, char **argv) {
36 36
     app.processEvents();
37 37
   }
38 38
 
39  
-  qDebug() << "That's all";
40  
-
41 39
   app.sendPostedEvents(NULL, QEvent::DeferredDelete);
42 40
 
43 41
   return 0;
2  src/webkit_server.pro
@@ -135,7 +135,7 @@ greaterThan(QT_MAJOR_VERSION, 4) {
135 135
 } else {
136 136
   QT += webkit
137 137
 }
138  
-CONFIG += console precompile_header debug
  138
+CONFIG += console precompile_header
139 139
 CONFIG -= app_bundle
140 140
 PRECOMPILED_HEADER = stable.h
141 141
 

0 notes on commit fc20147

Please sign in to comment.
Something went wrong with that request. Please try again.