-
Notifications
You must be signed in to change notification settings - Fork 40
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
Timeline Tracking #17
Conversation
Thank you very much for contributing! I will review this PR asap, hopefully tonight. BTW, how do you like lectures on discrete mathematics? ;) |
I know we had conversation about this plugin but I dont really remember when and how should we display time travel debug info in our UI. |
About UI. Ideal way would be a separate pane with list of tracked timelines, and input to type in the pid manually. (That's partially why pids are compared as lists). Very nice thing would be also a track timeline button in one of the other views in process details. The click would start trackign and move user to timeline view. Yet another option would be a pane with all the pids in a filterable lists, user could tick interesting pids of and see their timeline on the other subpane. (left half pane list, right half timeline) At least that's how I would imagine it. |
I'll try to add think about something for it. Is it possible to have it as separate plugin? It can be good starting point for plugin system for frontend as well because I'm thinking about moving all core plugins to one "core/official" plugins monorepo at some point and we need plugin system for that. |
The problem with making it Plugin is fact that I had to severely modify already existing tracer. (At stock it gives only information about amount of messages between processes) |
Hi @Hajto, I was thinking how we could visualise the trace information you gather and one idea is to render so-called flame graphs. It could be rendered in the 3rd level of Vizceral, when one double-clicks a process. In other words can you please review your PR and see if you gather enough information to render a flame graph? Such graphs for Erlang processes are already implemented by @proger in his eflame. |
I've added /cc @michalslaski @arkgil I would really appreciate your review on my Erlang code 🙂 |
You can checkout this version. Basic functionality is done, only some UI improvements and of course tracker changes if required :) / cc @Hajto |
And to answer your question - yes, we retrieve them all, but we can't capture changing state step by step if messages come too fast. Because messages can come to process and change its state after we receive trace message but before we make |
One more question - is it possible to show whole message received by the process? I can't find a way to extend the column with messages. |
No right now. I'll add this message in state's header because side panel has limited space for that. |
I've moved |
apps/epl/src/epl_timeline.erl
Outdated
JSON = epl_json:encode(#{timelines => T}, <<"timeline-info">>), | ||
handle_info({data, _, Data}, State = #state{subscribers = Subs, timelines = Times}) -> | ||
{Timelines, NewState} = | ||
lists:foldl(fun({Pid, {P, PidList, Changes}}, {Acc1, Acc2}) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This anonymous function is huge, so it might be a good idea to move it to private function in the module :)
apps/epl/src/epl_timeline.erl
Outdated
JSON = epl_json:encode(#{timelines => T}, <<"timeline-info">>), | ||
handle_info({data, _, Data}, State = #state{subscribers = Subs, timelines = Times}) -> | ||
{Timelines, NewState} = | ||
lists:foldl(fun({Pid, {P, PidList, Changes}}, {Acc1, Acc2}) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename Acc1
and Acc2
so that the reader knows what do they refer to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that was already done by @baransu.
@arkgil I'm retrieving node part of pid from kernel's |
@baransu I tried the new view and I like it very much. The UX of the timeline feature is intuitive and easy to figure out. @Hajto I tried tracing the mnesia_locker process and noticed that throughput of messages reported in the dashboard view increased to over 45,000 msg. The system is not processing any Mnesia transactions, so most of the internal traffic is between epl_tracer and mnesia_locker processes. Is it expected? |
@michalslaski I am sorry for inactivity. It is not expected to ignore those messages. I will have to investigate it more. |
No worries, good to have you back :) |
I've added resizable panes with state and messages so when messages are to long or you want to focus on state better it's now easier 🎉 @Hajto what is progress on issues with to many messages? |
@michalslaski @mkacper |
@baransu moving through mailbox by up/down arrows works perfectly but if you want to see details of a message -> state pair you have to click on a particular message. Maybe it would be easier to use when you can hit enter on a highlighted message to see the details or we can just automaticly switch the detailed view when moving through the mailbox? What do you think? |
It should automatically select message on which you're on. Did you run |
First I used only |
@mkacper It was because of old version of |
Added:
Edited:
To test