When profiling, save analysis results to disk

This commit is contained in:
Dave Smith 2011-10-25 23:58:53 -06:00
parent 45fc18f990
commit 1c1620a244

View file

@ -72,9 +72,12 @@ run(RawArgs) ->
case rebar_config:get_global(enable_profiling, false) of case rebar_config:get_global(enable_profiling, false) of
true -> true ->
io:format("Profiling!\n"), io:format("Profiling!\n"),
fprof:apply(fun(A) -> run_aux(A) end, [Args]), try
fprof:profile(), fprof:apply(fun(A) -> run_aux(A) end, [Args])
fprof:analyse(); after
fprof:profile(),
fprof:analyse([{dest, "fprof.analysis"}])
end;
_ -> _ ->
run_aux(Args) run_aux(Args)
end. end.