Class: RailsPerformance::Reports::TraceReport
- Inherits:
-
Object
- Object
- RailsPerformance::Reports::TraceReport
- Defined in:
- lib/rails_performance/reports/trace_report.rb
Instance Attribute Summary collapse
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(request_id:) ⇒ TraceReport
constructor
A new instance of TraceReport.
Constructor Details
#initialize(request_id:) ⇒ TraceReport
Returns a new instance of TraceReport.
6 7 8 |
# File 'lib/rails_performance/reports/trace_report.rb', line 6 def initialize(request_id:) @request_id = request_id end |
Instance Attribute Details
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
4 5 6 |
# File 'lib/rails_performance/reports/trace_report.rb', line 4 def request_id @request_id end |
Instance Method Details
#data ⇒ Object
10 11 12 13 |
# File 'lib/rails_performance/reports/trace_report.rb', line 10 def data key = "trace|#{request_id}|END|#{RailsPerformance::SCHEMA}" JSON.parse(RailsPerformance.redis.get(key).presence || '[]') end |