Class: RailsPerformance::SystemMonitor::ResourceChart
- Inherits:
-
Struct
- Object
- Struct
- RailsPerformance::SystemMonitor::ResourceChart
- Defined in:
- lib/rails_performance/system_monitor/resource_chart.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#key ⇒ Object
Returns the value of attribute key.
-
#legend ⇒ Object
Returns the value of attribute legend.
-
#server ⇒ Object
Returns the value of attribute server.
-
#subtitle ⇒ Object
Returns the value of attribute subtitle.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
3 4 5 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 3 def description @description end |
#key ⇒ Object
Returns the value of attribute key
3 4 5 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 3 def key @key end |
#legend ⇒ Object
Returns the value of attribute legend
3 4 5 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 3 def legend @legend end |
#server ⇒ Object
Returns the value of attribute server
3 4 5 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 3 def server @server end |
#subtitle ⇒ Object
Returns the value of attribute subtitle
3 4 5 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 3 def subtitle @subtitle end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 3 def type @type end |
Instance Method Details
#data ⇒ Object
8 9 10 11 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 8 def data all_data = server.report.extract_signal { |e| signal(e) } all_data[server.key] end |
#format(measurement) ⇒ Object
17 18 19 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 17 def format measurement measurement end |
#id ⇒ Object
4 5 6 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 4 def id [key, "report", server.key.parameterize].join("_") end |
#signal(e) ⇒ Object
13 14 15 |
# File 'lib/rails_performance/system_monitor/resource_chart.rb', line 13 def signal e format(e[key]) end |