summaryrefslogtreecommitdiff
path: root/src/rebar.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar.erl')
-rw-r--r--src/rebar.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rebar.erl b/src/rebar.erl
index 95f43df..45ef1fa 100644
--- a/src/rebar.erl
+++ b/src/rebar.erl
@@ -72,9 +72,12 @@ run(RawArgs) ->
case rebar_config:get_global(enable_profiling, false) of
true ->
io:format("Profiling!\n"),
- fprof:apply(fun(A) -> run_aux(A) end, [Args]),
- fprof:profile(),
- fprof:analyse();
+ try
+ fprof:apply(fun(A) -> run_aux(A) end, [Args])
+ after
+ fprof:profile(),
+ fprof:analyse([{dest, "fprof.analysis"}])
+ end;
_ ->
run_aux(Args)
end.