Class: AppProfiler::StackprofProfile
Constant Summary
collapse
- FILE_EXTENSION =
".stackprof.json"
Instance Attribute Summary
Attributes inherited from BaseProfile
#context
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseProfile
#duration, #enqueue_upload, #file, from_stackprof, from_vernier, #id, #to_h, #upload, #valid?
Constructor Details
#initialize(data, id: nil, context: nil) ⇒ StackprofProfile
Returns a new instance of StackprofProfile.
13
14
15
16
|
# File 'lib/app_profiler/stackprof_profile.rb', line 13
def initialize(data, id: nil, context: nil)
data[:metadata] ||= {}
super(data, id: id, context: context)
end
|
Instance Method Details
26
27
28
|
# File 'lib/app_profiler/stackprof_profile.rb', line 26
def format
FILE_EXTENSION
end
|
22
23
24
|
# File 'lib/app_profiler/stackprof_profile.rb', line 22
def metadata
@data[:metadata]
end
|
#mode ⇒ Object
18
19
20
|
# File 'lib/app_profiler/stackprof_profile.rb', line 18
def mode
@data[:mode]
end
|
#view(params = {}) ⇒ Object
30
31
32
|
# File 'lib/app_profiler/stackprof_profile.rb', line 30
def view(params = {})
AppProfiler.stackprof_viewer.view(self, **params)
end
|