Module: Middleman::Profiling
- Defined in:
- lib/middleman-core/profiling.rb
Defined Under Namespace
Classes: NullProfiler, RubyProfProfiler
Class Method Summary collapse
- .profiler ⇒ Object
-
.profiler=(prof) ⇒ Object
The profiler instance.
-
.report(report_name) ⇒ Object
Stop the profiler and generate a report.
-
.start ⇒ Object
Start the profiler.
Class Method Details
.profiler ⇒ Object
8 9 10 |
# File 'lib/middleman-core/profiling.rb', line 8 def self.profiler @profiler ||= NullProfiler.new end |
.profiler=(prof) ⇒ Object
The profiler instance. There can only be one!
5 6 7 |
# File 'lib/middleman-core/profiling.rb', line 5 def self.profiler=(prof) @profiler = prof end |
.report(report_name) ⇒ Object
Stop the profiler and generate a report. Make sure to call start first
18 19 20 |
# File 'lib/middleman-core/profiling.rb', line 18 def self.report(report_name) profiler.report(report_name) end |
.start ⇒ Object
Start the profiler
13 14 15 |
# File 'lib/middleman-core/profiling.rb', line 13 def self.start profiler.start end |