Class: Monitoring::Client::Profiler
- Inherits:
-
Object
- Object
- Monitoring::Client::Profiler
- Defined in:
- lib/monitoring/client/profiler.rb
Instance Method Summary collapse
-
#initialize(program_name) ⇒ Profiler
constructor
A new instance of Profiler.
- #routine(routine_name) {|routine| ... } ⇒ Object
Constructor Details
#initialize(program_name) ⇒ Profiler
Returns a new instance of Profiler.
10 11 12 |
# File 'lib/monitoring/client/profiler.rb', line 10 def initialize(program_name) @program_name = program_name end |
Instance Method Details
#routine(routine_name) {|routine| ... } ⇒ Object
15 16 17 18 19 20 |
# File 'lib/monitoring/client/profiler.rb', line 15 def routine(routine_name) routine = Routine.new(routine_name) yield(routine) UDPSocket.new().send(routine.compile(@program_name).to_json + "\n", 0, "localhost", 57475) end |