ry / ebb fork watch download tarball
public this repo is viewable by everyone
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Remove debugging printfs - add some ticks to benchmark
Ryan Dahl (author)
about 1 month ago
commit  eb55b568610bf4d33ebc59ef7ff79838544617aa
tree    b3974e4b7596be9b7d0567f9c5cd14ff017aef36
parent  03904ad050dfa2ff8814b28debc95f1020d2a58f
...
30
31
32
33
 
34
35
36
...
30
31
32
 
33
34
35
36
0
@@ -30,7 +30,7 @@ trials = {
0
     File.open(fn, 'w+') { |f| f.write("C"*size) } unless FileTest.exists?(fn)
0
     [l, "ab -t 6 -q -c 50 -p #{fn} http://0.0.0.0:PORT/test_post_length"]
0
   },
0
- 'concurrency' => [1,2,5,10,20,30,50,75,100].map { |c|
0
+ 'concurrency' => [1,2,5,10,20,25,30,35,40,50,75,100].map { |c|
0
     [c, "ab -t 3 -q -c #{c} http://0.0.0.0:PORT/bytes/1"]
0
   }
0
 }
...
44
45
46
47
48
49
50
...
52
53
54
55
56
57
58
...
88
89
90
91
 
92
93
94
95
 
96
97
98
...
44
45
46
 
47
48
49
...
51
52
53
 
54
55
56
...
86
87
88
 
89
90
91
92
 
93
94
95
96
0
@@ -44,7 +44,6 @@ static void attach_idle_watcher()
0
 {
0
   if(!ev_is_active(&idle_watcher)) {
0
     ev_idle_start (loop, &idle_watcher);
0
- printf("attach!\n");
0
   }
0
 }
0
 
0
@@ -52,7 +51,6 @@ static void attach_idle_watcher()
0
 static void detach_idle_watcher()
0
 {
0
   ev_idle_stop(loop, &idle_watcher);
0
- printf("detach!\n");
0
 }
0
 
0
 static int clients_in_use_p()
0
@@ -88,11 +86,11 @@ idle_cb (struct ev_loop *loop, struct ev_idle *w, int revents) {
0
      * ruby 1.8.x because rb_thread_select is slow.
0
      * (Don't worry - you're probably not doing this.)
0
      */
0
- struct timeval tv = { tv_sec: 0, tv_usec: 50000 };
0
+ struct timeval select_timeout = { tv_sec: 0, tv_usec: 50000 };
0
     fd_set server_fd_set;
0
     FD_ZERO(&server_fd_set);
0
     FD_SET(server->fd, &server_fd_set);
0
- rb_thread_select(server->fd+1, &server_fd_set, 0, 0, &tv);
0
+ rb_thread_select(server->fd+1, &server_fd_set, 0, 0, &select_timeout);
0
   } else {
0
     detach_idle_watcher();
0
   }

Comments

    No one has commented yet.