Class: Tracebin::SystemHealthSample
- Inherits:
-
Object
- Object
- Tracebin::SystemHealthSample
- Includes:
- Helpers
- Defined in:
- lib/tracebin/system_health_sample.rb
Constant Summary collapse
- DATA_TYPE =
'system_health_sample'.freeze
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SystemHealthSample
constructor
A new instance of SystemHealthSample.
- #payload ⇒ Object
Methods included from Helpers
#deserialize_time_string, #milliseconds_between, #time_to_string, #timestamp_string, #to_milliseconds
Constructor Details
#initialize(options = {}) ⇒ SystemHealthSample
Returns a new instance of SystemHealthSample.
7 8 9 10 11 |
# File 'lib/tracebin/system_health_sample.rb', line 7 def initialize( = {}) @process = [:process] || :web @sampled_at = @metrics = sample_metrics end |
Instance Method Details
#payload ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tracebin/system_health_sample.rb', line 13 def payload { type: DATA_TYPE, data: { sampled_at: @sampled_at, metrics: @metrics } } end |