class Kitchen::Oven::BakeProfile
Stats on baking
Public Instance Methods
Return the number of seconds it took to bake the parsed file or nil if this info isn't available. @return [Float, nil]
# File lib/kitchen/oven.rb, line 88 def bake_seconds @baked_at - @parsed_at rescue NoMethodError nil end
Record that the input file has been baked
# File lib/kitchen/oven.rb, line 62 def baked!; @baked_at = Time.now; end
Return the number of seconds it took to open the input file or nil if this info isn't available. @return [Float, nil]
# File lib/kitchen/oven.rb, line 70 def open_seconds @opened_at - @started_at rescue NoMethodError nil end
Record that the input file has been opened
# File lib/kitchen/oven.rb, line 56 def opened!; @opened_at = Time.now; end
Return the number of seconds it took to parse the input file after opening or nil if this info isn't available. @return [Float, nil]
# File lib/kitchen/oven.rb, line 79 def parse_seconds @parsed_at - @opened_at rescue NoMethodError nil end
Record that the input file has been parsed
# File lib/kitchen/oven.rb, line 59 def parsed!; @parsed_at = Time.now; end
Record that baking has started
# File lib/kitchen/oven.rb, line 53 def started!; @started_at = Time.now; end
Return the profile stats as a string @return [String]
# File lib/kitchen/oven.rb, line 105 def to_s <<~STRING Open: #{open_seconds || '??'} s Parse: #{parse_seconds || '??'} s Bake: #{bake_seconds || '??'} s Write: #{write_seconds || '??'} s STRING end
Return the number of seconds it took to write the baked file or nil if this info isn't available. @return [Float, nil]
# File lib/kitchen/oven.rb, line 97 def write_seconds @written_at - @baked_at rescue NoMethodError nil end
Record that the output file has been written
# File lib/kitchen/oven.rb, line 65 def written!; @written_at = Time.now; end