Method: JvmGcGraph::ParseMemoryLog#initialize
- Defined in:
- lib/jvm_gc_graph.rb
#initialize(opts) ⇒ ParseMemoryLog
Returns a new instance of ParseMemoryLog.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/jvm_gc_graph.rb', line 37 def initialize(opts) File.open(opts[:file], "r") do |f| @lines = f.readlines end if m = @lines.last.match(ANY_GC_REGEX) @start_time = Time.now.to_i - m[0].to_f end @data = [] @gc_data = [] self.class.send(:define_method, :title) {opts[:title]} end |