Module: Web::Remote
- Defined in:
- lib/poolparty/monitors/web.rb
Instance Method Summary collapse
Instance Method Details
#web ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/poolparty/monitors/web.rb', line 15 def web out = begin str = run("httperf --server localhost --port #{Application.client_port} --num-conn 3 --timeout 5 | grep 'Request rate'") str[/[.]* ([\d]*\.[\d]*) [.]*/, 0].chomp.to_f rescue Exception => e 0.0 end PoolParty. "Web requests: #{out}" out end |