Class: ZAPv2::Stats
- Inherits:
-
Object
- Object
- ZAPv2::Stats
- Defined in:
- lib/zap/v2apis/stats.rb
Instance Method Summary collapse
- #all_sites_stats(key_prefix) ⇒ Object
- #clear_stats(key_prefix) ⇒ Object
-
#initialize(client) ⇒ Stats
constructor
A new instance of Stats.
- #option_in_memory_enabled ⇒ Object
- #option_statsd_enabled ⇒ Object
- #option_statsd_host ⇒ Object
- #option_statsd_port ⇒ Object
- #option_statsd_prefix ⇒ Object
- #set_option_in_memory_enabled(boolean) ⇒ Object
- #set_option_statsd_host(string) ⇒ Object
- #set_option_statsd_port(integer) ⇒ Object
- #set_option_statsd_prefix(string) ⇒ Object
- #site_stats(site, key_prefix) ⇒ Object
- #stats(key_prefix) ⇒ Object
Constructor Details
#initialize(client) ⇒ Stats
Returns a new instance of Stats.
5 6 7 |
# File 'lib/zap/v2apis/stats.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#all_sites_stats(key_prefix) ⇒ Object
9 10 11 |
# File 'lib/zap/v2apis/stats.rb', line 9 def all_sites_stats(key_prefix) @client.get("/JSON/stats/view/allSitesStats/?keyPrefix=#{key_prefix}") end |
#clear_stats(key_prefix) ⇒ Object
41 42 43 |
# File 'lib/zap/v2apis/stats.rb', line 41 def clear_stats(key_prefix) @client.get("/JSON/stats/action/clearStats/?keyPrefix=#{key_prefix}") end |
#option_in_memory_enabled ⇒ Object
13 14 15 |
# File 'lib/zap/v2apis/stats.rb', line 13 def option_in_memory_enabled @client.get('/JSON/stats/view/optionInMemoryEnabled/') end |
#option_statsd_enabled ⇒ Object
17 18 19 |
# File 'lib/zap/v2apis/stats.rb', line 17 def option_statsd_enabled @client.get('/JSON/stats/view/optionStatsdEnabled/') end |
#option_statsd_host ⇒ Object
21 22 23 |
# File 'lib/zap/v2apis/stats.rb', line 21 def option_statsd_host @client.get('/JSON/stats/view/optionStatsdHost/') end |
#option_statsd_port ⇒ Object
25 26 27 |
# File 'lib/zap/v2apis/stats.rb', line 25 def option_statsd_port @client.get('/JSON/stats/view/optionStatsdPort/') end |
#option_statsd_prefix ⇒ Object
29 30 31 |
# File 'lib/zap/v2apis/stats.rb', line 29 def option_statsd_prefix @client.get('/JSON/stats/view/optionStatsdPrefix/') end |
#set_option_in_memory_enabled(boolean) ⇒ Object
45 46 47 |
# File 'lib/zap/v2apis/stats.rb', line 45 def set_option_in_memory_enabled(boolean) @client.get("/JSON/stats/action/setOptionInMemoryEnabled/?boolean=#{boolean}") end |
#set_option_statsd_host(string) ⇒ Object
49 50 51 |
# File 'lib/zap/v2apis/stats.rb', line 49 def set_option_statsd_host(string) @client.get("/JSON/stats/action/setOptionStatsdHost/?String=#{string}") end |
#set_option_statsd_port(integer) ⇒ Object
53 54 55 |
# File 'lib/zap/v2apis/stats.rb', line 53 def set_option_statsd_port(integer) @client.get("/JSON/stats/action/setOptionStatsdPort/?Integer=#{integer}") end |
#set_option_statsd_prefix(string) ⇒ Object
57 58 59 |
# File 'lib/zap/v2apis/stats.rb', line 57 def set_option_statsd_prefix(string) @client.get("/JSON/stats/action/setOptionStatsdPrefix/?String=#{string}") end |
#site_stats(site, key_prefix) ⇒ Object
33 34 35 |
# File 'lib/zap/v2apis/stats.rb', line 33 def site_stats(site, key_prefix) @client.get("/JSON/stats/view/siteStats/?site=#{site}&keyPrefix=#{key_prefix}") end |
#stats(key_prefix) ⇒ Object
37 38 39 |
# File 'lib/zap/v2apis/stats.rb', line 37 def stats(key_prefix) @client.get("/JSON/stats/view/stats/?keyPrefix=#{key_prefix}") end |