raindrops 0.8.0 → 0.8.0.5.g71f8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
- # This is the exact config that powers http://raindrops-demo.bogomips.org/
2
- # This is used with zbatery.conf.rb
1
+ # This is a snippet of the config that powers
2
+ # http://raindrops-demo.bogomips.org/
3
+ # This may be used with the packaged zbatery.conf.rb
3
4
  #
4
5
  # zbatery -c zbatery.conf.ru watcher_demo.ru -E none
5
6
  require "raindrops"
@@ -7,7 +8,6 @@ use Raindrops::Middleware
7
8
  listeners = %w(
8
9
  0.0.0.0:9418
9
10
  0.0.0.0:80
10
- /tmp/.raindrops
11
11
  /tmp/.r
12
12
  )
13
13
  run Raindrops::Watcher.new :listeners => listeners
@@ -8,6 +8,6 @@ log_dir = "/var/log/zbatery"
8
8
  if File.writable?(log_dir) && File.directory?(log_dir)
9
9
  stderr_path "#{log_dir}/raindrops-demo.stderr.log"
10
10
  stdout_path "#{log_dir}/raindrops-demo.stdout.log"
11
- listen "/tmp/.raindrops"
11
+ listen "/tmp/.r"
12
12
  pid "/tmp/.raindrops.pid"
13
13
  end
@@ -13,23 +13,20 @@ have_func('rb_thread_blocking_region')
13
13
  have_func('rb_thread_io_blocking_region')
14
14
 
15
15
  checking_for "GCC 4+ atomic builtins" do
16
+ # we test CMPXCHG anyways even though we don't need it to filter out
17
+ # ancient i386-only targets without CMPXCHG
16
18
  src = <<SRC
17
19
  int main(int argc, char * const argv[]) {
18
- volatile unsigned long i = 0;
20
+ unsigned long i = 0;
21
+ __sync_lock_test_and_set(&i, 0);
22
+ __sync_lock_test_and_set(&i, 1);
19
23
  __sync_add_and_fetch(&i, argc);
20
24
  __sync_sub_and_fetch(&i, argc);
21
25
  return 0;
22
26
  }
23
27
  SRC
24
28
 
25
- if try_run(src)
26
- # some systems target GCC for i386 and don't get the atomic builtins
27
- # when building shared objects
28
- arch = `#{CONFIG['CC']} -dumpmachine`.split(/-/)[0]
29
- if arch == "i386" && $CFLAGS !~ /\b-march=/
30
- $CFLAGS += " -march=i486 "
31
- end
32
-
29
+ if try_link(src)
33
30
  $defs.push(format("-DHAVE_GCC_ATOMIC_BUILTINS"))
34
31
  true
35
32
  else
@@ -27,8 +27,8 @@ module Raindrops::Linux
27
27
  # SS_CONNECTED, /* connected to socket */
28
28
  # SS_DISCONNECTING /* in process of disconnecting */
29
29
  # } socket_state;
30
- # * SS_CONNECTING maps to ListenStats#active
31
- # * SS_CONNECTED maps to ListenStats#queued
30
+ # * SS_CONNECTING maps to ListenStats#queued
31
+ # * SS_CONNECTED maps to ListenStats#active
32
32
  #
33
33
  # This method may be significantly slower than its tcp_listener_stats
34
34
  # counterpart due to the latter being able to use inet_diag via netlink.
@@ -130,7 +130,7 @@ class Raindrops::Middleware
130
130
  body = "calling: #{@stats.calling}\n" \
131
131
  "writing: #{@stats.writing}\n"
132
132
 
133
- if defined?(Raindrops::Linux)
133
+ if defined?(Raindrops::Linux.tcp_listener_stats)
134
134
  Raindrops::Linux.tcp_listener_stats(@tcp).each do |addr,stats|
135
135
  body << "#{addr} active: #{stats.active}\n" \
136
136
  "#{addr} queued: #{stats.queued}\n"
@@ -58,4 +58,4 @@ class TestLinuxTCP_Info < Test::Unit::TestCase
58
58
  a.close if a
59
59
  s.close
60
60
  end
61
- end
61
+ end if RUBY_PLATFORM =~ /linux/
metadata CHANGED
@@ -1,51 +1,58 @@
1
- --- !ruby/object:Gem::Specification
2
- name: raindrops
3
- version: !ruby/object:Gem::Version
4
- hash: 63
5
- prerelease:
6
- segments:
7
- - 0
8
- - 8
9
- - 0
10
- version: 0.8.0
1
+ --- !ruby/object:Gem::Specification
2
+ name: !binary |-
3
+ cmFpbmRyb3Bz
4
+ version: !ruby/object:Gem::Version
5
+ version: 0.8.0.5.g71f8
6
+ prerelease: 8
11
7
  platform: ruby
12
- authors:
13
- - raindrops hackers
8
+ authors:
9
+ - !binary |-
10
+ cmFpbmRyb3BzIGhhY2tlcnM=
14
11
  autorequire:
15
12
  bindir: bin
16
13
  cert_chain: []
17
-
18
- date: 2011-10-15 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: bundler
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
14
+ date: 2012-05-10 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: !binary |-
18
+ YnVuZGxlcg==
19
+ requirement: !ruby/object:Gem::Requirement
24
20
  none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 1
31
- - 0
32
- - 10
33
- version: 1.0.10
21
+ requirements:
22
+ - - !binary |-
23
+ fj4=
24
+ - !ruby/object:Gem::Version
25
+ version: !binary |-
26
+ MS4wLjEw
34
27
  type: :development
35
- version_requirements: *id001
36
- description: |-
37
- Raindrops is a real-time stats toolkit to show statistics for Rack HTTP
28
+ prerelease: false
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - !binary |-
33
+ fj4=
34
+ - !ruby/object:Gem::Version
35
+ version: !binary |-
36
+ MS4wLjEw
37
+ description: ! 'Raindrops is a real-time stats toolkit to show statistics for Rack
38
+ HTTP
39
+
38
40
  servers. It is designed for preforking servers such as Rainbows! and
41
+
39
42
  Unicorn, but should support any Rack HTTP server under Ruby 1.9, 1.8 and
43
+
40
44
  Rubinius on platforms supporting POSIX shared memory. It may also be
45
+
41
46
  used as a generic scoreboard for sharing atomic counters across multiple
42
- processes.
43
- email: raindrops@librelist.org
44
- executables: []
45
47
 
46
- extensions:
47
- - ext/raindrops/extconf.rb
48
- extra_rdoc_files:
48
+ processes.'
49
+ email: !binary |-
50
+ cmFpbmRyb3BzQGxpYnJlbGlzdC5vcmc=
51
+ executables: []
52
+ extensions:
53
+ - !binary |-
54
+ ZXh0L3JhaW5kcm9wcy9leHRjb25mLnJi
55
+ extra_rdoc_files:
49
56
  - README
50
57
  - LICENSE
51
58
  - NEWS
@@ -63,7 +70,7 @@ extra_rdoc_files:
63
70
  - ext/raindrops/raindrops.c
64
71
  - ext/raindrops/linux_inet_diag.c
65
72
  - ext/raindrops/linux_tcp_info.c
66
- files:
73
+ files:
67
74
  - .document
68
75
  - .gitignore
69
76
  - .manifest
@@ -124,41 +131,34 @@ files:
124
131
  - test/test_watcher.rb
125
132
  homepage: http://raindrops.bogomips.org/
126
133
  licenses: []
127
-
128
134
  post_install_message:
129
- rdoc_options:
135
+ rdoc_options:
130
136
  - -t
131
137
  - raindrops - real-time stats for preforking Rack servers
132
138
  - -W
133
139
  - http://bogomips.org/raindrops.git/tree/%s
134
- require_paths:
140
+ require_paths:
135
141
  - lib
136
- required_ruby_version: !ruby/object:Gem::Requirement
142
+ required_ruby_version: !ruby/object:Gem::Requirement
137
143
  none: false
138
- requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- hash: 3
142
- segments:
143
- - 0
144
- version: "0"
145
- required_rubygems_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ! '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
149
  none: false
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- hash: 3
151
- segments:
152
- - 0
153
- version: "0"
150
+ requirements:
151
+ - - ! '>'
152
+ - !ruby/object:Gem::Version
153
+ version: 1.3.1
154
154
  requirements: []
155
-
156
- rubyforge_project: rainbows
157
- rubygems_version: 1.8.5
155
+ rubyforge_project: !binary |-
156
+ cmFpbmJvd3M=
157
+ rubygems_version: 1.8.21
158
158
  signing_key:
159
159
  specification_version: 3
160
160
  summary: real-time stats for preforking Rack servers
161
- test_files:
161
+ test_files:
162
162
  - test/test_aggregate_pmq.rb
163
163
  - test/test_inet_diag_socket.rb
164
164
  - test/test_last_data_recv_unicorn.rb
@@ -175,3 +175,4 @@ test_files:
175
175
  - test/test_raindrops_gc.rb
176
176
  - test/test_struct.rb
177
177
  - test/test_watcher.rb
178
+ has_rdoc: