diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2011-10-25 23:58:53 -0600 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2011-10-25 23:58:53 -0600 |
commit | 1c1620a244ea2be94b2dce4506d48390e2c77d19 (patch) | |
tree | 0aae5bb1de6056179fc5f119647d080b1528fa07 /src | |
parent | 45fc18f990ab93bbcce8934f0ba397f3cd87e519 (diff) |
When profiling, save analysis results to disk
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar.erl | 9 |
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. |