Class: Tracemake::MakeTrace2ChromeTracing
- Inherits:
-
Object
- Object
- Tracemake::MakeTrace2ChromeTracing
- Defined in:
- lib/tracemake.rb
Overview
Main class for converting make trace to Chrome Tracing format
Instance Method Summary collapse
- #generate(input_file, output_file) ⇒ Object
-
#initialize ⇒ MakeTrace2ChromeTracing
constructor
A new instance of MakeTrace2ChromeTracing.
Constructor Details
#initialize ⇒ MakeTrace2ChromeTracing
Returns a new instance of MakeTrace2ChromeTracing.
118 119 120 121 |
# File 'lib/tracemake.rb', line 118 def initialize @open_spans = Set.new @closed_spans = [] end |
Instance Method Details
#generate(input_file, output_file) ⇒ Object
123 124 125 126 127 128 |
# File 'lib/tracemake.rb', line 123 def generate(input_file, output_file) events = parse_events(input_file) process_events(events) spans = @closed_spans.sort_by(&:start) generate_output(spans, output_file) end |