-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add more information to the Observer #1484
Conversation
I wonder if it would make sense to group those?
I am just not sure how the distribution buffer busy limit fits this. :( |
yes, looks nicer. |
@Gsantomaggio good call. Especially if we call "Distribution buffer busy limit" and skip the word "limit" in the others. |
@josevalim sounds good! if it is ok @dgud also for you I will modify it |
Test that is doesn't crash if observing an old node, from which the new info is not supplied. Also test the other way around, old observer receiving the new info, |
New to old:
The observer is: Attach to an old version: Old to newthere are not errors or crash |
@dgud @josevalim WDYT ?
|
@Gsantomaggio great! Shouldn't you flip the values though? |
Ooops yes:) @josevalim |
Global view:New observer connected to old node versionOld node connected to new observer node |
Could you rebase this maint branch. |
@dgud already did it. Just changed the PR to |
Oh ok, thanks. |
I don't like that you do the string construction in the backend, everywhere else the rawdata is sent, I think it's better to send the usage and limit as separate key-value pairs from backend and process the info in observer see example get_gc_info/1 in observer_procinfo of using a fun to fill in the info fields. |
@dgud yes you are right. Let me change it |
ok @dgud that's much better and it is fully compatible with the old versions: just one question: Should I replace |
Maybe "Not available" is better? |
@dgud done: |
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.
Otherwise looks good, I will take vacation it in August will merge when I get back.
lib/observer/src/observer_sys_wx.erl
Outdated
wxSizer:layout(Sizer). | ||
|
||
|
||
maybe_convert(V) when (is_atom(V) andalso V =:= undefined) -> "Not available"; |
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.
maybe_convert(undefined) -> "Not available";
lib/observer/src/observer_sys_wx.erl
Outdated
io_lib:format("~s / ~s ~s", | ||
[maybe_convert(C), maybe_convert(L), | ||
if | ||
{C, L} =:= {undefined, undefined} -> ""; |
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.
Replace with (otherwise C/L will crash if one of them is undefined)
C =:= undefined -> "";
L =:= undefined -> "";
@dgud done. |
lib/observer/src/observer_sys_wx.erl
Outdated
wxSizer:add(Sizer, HSizer2, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM}, | ||
{proportion, 0}, {border, 5}]), | ||
|
||
wxPanel:setSizer(Panel, Sizer), |
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.
Indentation should be done with space and not tabs in new or changed code
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.
Sorry @dgud,
It should be ok now!
Show the statistics, limits and percentage for atoms, processes,ports and ETS. Backward compatibility with old versions, In case the valuse is missing it shows the string Not available.
Add other two panels: first one: 'System limits' and second one 'Limit Statistics'
Show infomations as atom_limit,process_limit,port_limit and counts.
The result is: