Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: support custom timeout in stop_trace/2 #13

Open
jmitchell opened this issue Jan 17, 2017 · 3 comments · May be fixed by #15 or #20
Open

Request: support custom timeout in stop_trace/2 #13

jmitchell opened this issue Jan 17, 2017 · 3 comments · May be fixed by #15 or #20

Comments

@jmitchell
Copy link

jmitchell commented Jan 17, 2017

I was getting timeout errors after the function passed to apply/2 was finished. Turned out I needed to increase the timeout in stop_trace/2. It would be nice if it could be customized by the user.

The generated stacks.out file in my case was 81 MB. Admittedly, the resulting flame graph is noisy enough that it's difficult to drill in, but the high-level picture is still somewhat insightful. The noise and large file size are due in part to me testing a recursive algorithm.

jmitchell added a commit to jmitchell/backtrex that referenced this issue Jan 17, 2017
The example puzzle is the same as the one in the Sudoku solver test, except with
several more cells filled in. Using the original causes :eflame to time out
while creating the final report (see
proger/eflame#13).

Ensure rebar is installed (the original, not rebar3), and run the following:

    $ MIX_ENV=prod mix do clean, deps.get, deps.compile, compile
    $ MIX_ENV=prod iex -S mix run -e "Backtrex.Profiler.eflame; exit(:normal)"
    $ ./deps/eflame/stack_to_flame.sh < stacks.out > flame-prod.svg

Credit goes to http://learningelixir.joekain.com/profiling-elixir-2/ for getting
me started.
@leifg
Copy link

leifg commented Sep 19, 2017

I would really love this feature as well

@proger
Copy link
Owner

proger commented Sep 19, 2017

Would anyone like to add this feature in a PR? I assume this implies exporting one more function — apply/6 or smth like that.

@ijcd ijcd linked a pull request Oct 22, 2017 that will close this issue
@ijcd
Copy link

ijcd commented Oct 22, 2017

I took a stab at this, but I'm not sure if it is idiomatic Erlang.

#15

@MegaRedHand MegaRedHand linked a pull request Dec 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants