Support profiling server startup and build via a --profile flag

This commit is contained in:
Ben Hollis 2012-07-18 22:10:02 -07:00
parent 3f21f7bc62
commit 00b590eedb
7 changed files with 81 additions and 6 deletions

View file

@ -32,6 +32,10 @@ module Middleman::Cli
:type => :string,
:default => false,
:desc => 'Print instrument messages'
method_option :profile,
:type => :boolean,
:default => false,
:desc => 'Generate profiling report for the build'
# Core build Thor command
# @return [void]
@ -257,6 +261,8 @@ module Middleman::Cli
@cleaning_queue.delete(Pathname.new(output_path).realpath) if cleaning?
end
::Middleman::Profiling.report("build")
end
end