Class: Pinbo::Request
- Inherits:
-
Object
- Object
- Pinbo::Request
- Defined in:
- lib/pinbo/request.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(options) ⇒ Request
constructor
A new instance of Request.
- #perform ⇒ Object
Constructor Details
#initialize(options) ⇒ Request
Returns a new instance of Request.
4 5 6 |
# File 'lib/pinbo/request.rb', line 4 def initialize() self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/pinbo/request.rb', line 3 def @options end |
Instance Method Details
#cmd ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/pinbo/request.rb', line 8 def cmd req = Proto::Pinbo::Request.new req.hostname = Config[:host] req.server_name = [:data][:server_name] req.script_name = [:data][:script_name] req.request_count = [:data][:request_count] req.document_size = [:data][:document_size] req.memory_peak = [:data][:memory_peak] req.request_time = [:data][:request_time] req.ru_utime = [:data][:ru_utime] req.ru_stime = [:data][:ru_stime] Pinbo.timers.each do |timer| req.timer_hit_count << timer[:counter] req.timer_value << timer[:period] req.timer_tag_count << timer[:tags].size timer[:normalized_tags].each do |tag| req.timer_tag_name << tag[:name_id] req.dictionary << tag[:name] req.timer_tag_value << tag[:value_id] req.dictionary << tag[:value] end end req.status = [:data][:status] # require 'ruby-debug' # debugger req.serialize_to_string end |