Module: StyleScanner::ProfilingHelpers

Defined in:
lib/style_scanner/profiling_helpers.rb

Instance Method Summary collapse

Instance Method Details

#output_profilng_resultsObject



9
10
11
12
13
14
15
# File 'lib/style_scanner/profiling_helpers.rb', line 9

def output_profilng_results
  result = RubyProf.stop
  printer = RubyProf::GraphHtmlPrinter.new(result)
  output_file = File.new("performance_report.html", "w")
  printer.print(output_file, :min_percent=>0)
  puts "Output performance report to performance_report.html".green
end

#start_profilingObject



5
6
7
# File 'lib/style_scanner/profiling_helpers.rb', line 5

def start_profiling
  RubyProf.start
end