Skip to content

Commit

Permalink
chore: bump to 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwencool committed Oct 21, 2024
1 parent ea25657 commit bbd34a3
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 65 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Visualize Erlang/Elixir Nodes On The Command Line base on [recon](https://github
%% rebar.config
{deps, [observer_cli]}
%% erlang.mk
dep_observer_cli = hex 1.7.5
dep_observer_cli = hex 1.8.0
```

**Elixir**

```elixir
# mix.exs
def deps do
[{:observer_cli, "~> 1.7"}]
[{:observer_cli, "~> 1.8"}]
end
```

Expand Down Expand Up @@ -89,7 +89,7 @@ _build/dev/rel/example/bin/example rpc ":observer_cli.start"

### DEMO

<img src="https://user-images.githubusercontent.com/3116225/39091211-55554414-4622-11e8-8b28-bd3b5c7e17a6.jpg" width="100%" alt="Home"> </img>
<img src="https://github.com/user-attachments/assets/ce797033-732a-4178-a9c5-df4de559ed0c" width="100%" alt="Home"> </img>

### How to write your own plugin?

Expand Down Expand Up @@ -255,7 +255,12 @@ Support F/B to page up/down.
---

### Changelog

- 1.8.0
- Support `<Pid` to jump to specific pid.
- Show process's label if it's set with [proc_lib:set_label(Label)](https://www.erlang.org/doc/apps/stdlib/proc_lib.html#set_label/1)
- Show The number of bytes in the output distribution queue on System View. This queue sits between the Erlang code and the port driver, using undocumented function`erlang:dist_get_stat/1`.
- Fix Doc View not show when otp version = 27

- 1.7.5
- Fix crash when mnesia table with external copies.
Which `mnesia:table_info(TabName, storage_type)` returns tuple `{ext, _, _}`
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ defmodule ObserverCli.MixProject do
def project do
[
app: :observer_cli,
version: "1.7.5",
version: "1.8.0",
language: :erlang,
description: "observer in shell",
deps: [
{:recon, "~> 2.5.1"},
{:recon, "~> 2.5.6"},
]
]
end
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%{
"recon": {:hex, :recon, "2.5.1", "430ffa60685ac1efdfb1fe4c97b8767c92d0d92e6e7c3e8621559ba77598678a", [:mix, :rebar3], [], "hexpm"},
"recon": {:hex, :recon, "2.5.6", "9052588e83bfedfd9b72e1034532aee2a5369d9d9343b61aeb7fbce761010741", [:mix, :rebar3], [], "hexpm", "96c6799792d735cc0f0fd0f86267e9d351e63339cbe03df9d162010cefc26bb0"},
}
78 changes: 39 additions & 39 deletions src/observer_cli.app.src
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{application, observer_cli,
[
{description, "Visualize Erlang Nodes On The Command Line"},
{vsn, "1.7.5"},
{modules, [
observer_cli
]},
{registered, []},
{applications, [
kernel,
stdlib,
recon
]},
{files, ["include",
"LICENSE*",
"mix.exs",
"mix.lock",
"README.md",
"rebar.config",
"rebar.lock",
"src"]},
{build_tools, ["mix", "rebar3"]},
{env, [
{scheduler_usage, disable},
{plugins,
[
%% module - Specific module implements plugin behavior. It's mandatory.
%% title - Menu title. It's mandatory.
%% shortcut - Switch plugin by shortcut. It's mandatory.
%% interval - Refresh interval ms. It's options. default is 1500ms.
%% sort_column - Sort the sheet by this index. It's options default is 2.
%% #{module => observer_cli_plug_1, title => "Example-1", interval => 1500, shortcut => "S", sort_column => 3},
%% #{module => observer_cli_plug_2, title => "Example-2", interval => 1600, shortcut => "D", sort_column => 2}
]}
]},
{licenses, ["MIT"]},
{links, [{"Github", "https://github.com/zhongwencool/observer_cli"}]}
]}.
{application, observer_cli, [
{description, "Visualize Erlang Nodes On The Command Line"},
{vsn, "1.8.0"},
{modules, [
observer_cli
]},
{registered, []},
{applications, [
kernel,
stdlib,
recon
]},
{files, [
"include",
"LICENSE*",
"mix.exs",
"mix.lock",
"README.md",
"rebar.config",
"rebar.lock",
"src"
]},
{build_tools, ["mix", "rebar3"]},
{env, [
{scheduler_usage, disable},
{plugins, [
%% module - Specific module implements plugin behavior. It's mandatory.
%% title - Menu title. It's mandatory.
%% shortcut - Switch plugin by shortcut. It's mandatory.
%% interval - Refresh interval ms. It's options. default is 1500ms.
%% sort_column - Sort the sheet by this index. It's options default is 2.

%% #{module => observer_cli_plug_1, title => "Example-1", interval => 1500, shortcut => "S", sort_column => 3},
%% #{module => observer_cli_plug_2, title => "Example-2", interval => 1600, shortcut => "D", sort_column => 2}
]}
]},
{licenses, ["MIT"]},
{links, [{"Github", "https://github.com/zhongwencool/observer_cli"}]}
]}.
3 changes: 2 additions & 1 deletion src/observer_cli.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
-spec start() -> no_return | {badrpc, term()}.
start() -> start(#view_opts{}).

-spec start(Node) -> no_return | {badrpc, term()} when Node :: atom() | non_neg_integer().
-spec start(Node) -> no_return | {badrpc, term()} when
Node :: atom() | non_neg_integer() | #view_opts{}.
start(Node) when Node =:= node() ->
start(#view_opts{});
start(Node) when is_atom(Node) ->
Expand Down
36 changes: 18 additions & 18 deletions src/observer_cli_help.erl
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ render_help() ->
"| \e[48;2;80;80;80m1.3\e[0m observer_start:start(Node, Cookie).\n",

"|\e[44m2. HOME(H) Commands\e[49m \n",
"| \e[48;2;80;80;80m` \e[0m enable/disable schedule usage.\n",
"| \e[48;2;80;80;80mPageDown \e[0m pd or F(forward).\n",
"| \e[48;2;80;80;80mPageUp \e[0m pu or B(back).\n",
"| \e[48;2;80;80;80mr \e[0m switch mode to reduction(proc_count).\n",
"| \e[48;2;80;80;80mrr \e[0m switch mode to reduction(proc_window).\n",
"| \e[48;2;80;80;80mm \e[0m switch mode to memory(proc_count).\n",
"| \e[48;2;80;80;80mmm \e[0m switch mode to memory(proc_window).\n",
"| \e[48;2;80;80;80mb \e[0m switch mode to bin memory(proc_count).\n",
"| \e[48;2;80;80;80mbb \e[0m switch mode to bin memory(proc_window).\n",
"| \e[48;2;80;80;80mmq \e[0m switch mode to message queue len(proc_count).\n",
"| \e[48;2;80;80;80mmmq \e[0m switch mode to message queue len(proc_window).\n",
"| \e[48;2;80;80;80mt \e[0m switch mode to total heap size(proc_count).\n",
"| \e[48;2;80;80;80mtt \e[0m switch mode to total heap size(proc_window).\n",
"| \e[48;2;80;80;80m3000 \e[0m set interval time to 3000ms, the integer must >= 1500.\n",
"| \e[48;2;80;80;80m13 \e[0m choose the 13th process(green line), the integer must in top list.\n",
"| \e[48;2;80;80;80m<0.43.0> \e[0m choose the <0.43.0> process, the pid does not need to be in the top list.\n",
"| \e[48;2;80;80;80m<43 or >43 \e[0m choose the <0.43.0> process, the pid does not need to be in the top list.\n",
"| \e[48;2;80;80;80mp \e[0m pause/unpause the view.\n",
"| \e[48;2;80;80;80m` \e[0m enable/disable schedule usage.\n",
"| \e[48;2;80;80;80mPageDown \e[0m pd or F(forward).\n",
"| \e[48;2;80;80;80mPageUp \e[0m pu or B(back).\n",
"| \e[48;2;80;80;80mr \e[0m switch mode to reduction(proc_count).\n",
"| \e[48;2;80;80;80mrr \e[0m switch mode to reduction(proc_window).\n",
"| \e[48;2;80;80;80mm \e[0m switch mode to memory(proc_count).\n",
"| \e[48;2;80;80;80mmm \e[0m switch mode to memory(proc_window).\n",
"| \e[48;2;80;80;80mb \e[0m switch mode to bin memory(proc_count).\n",
"| \e[48;2;80;80;80mbb \e[0m switch mode to bin memory(proc_window).\n",
"| \e[48;2;80;80;80mmq \e[0m switch mode to message queue len(proc_count).\n",
"| \e[48;2;80;80;80mmmq \e[0m switch mode to message queue len(proc_window).\n",
"| \e[48;2;80;80;80mt \e[0m switch mode to total heap size(proc_count).\n",
"| \e[48;2;80;80;80mtt \e[0m switch mode to total heap size(proc_window).\n",
"| \e[48;2;80;80;80m3000 \e[0m set interval time to 3000ms, the integer must >= 1500.\n",
"| \e[48;2;80;80;80m13 \e[0m choose the 13th process(green line), the integer must in top list.\n",
"| \e[48;2;80;80;80m<0.43.0> \e[0m choose the <0.43.0> process, the pid does not need to be in the top list.\n",
"| \e[48;2;80;80;80m<431 or >431 \e[0m choose the <0.431.0> process, the pid does not need to be in the top list.\n",
"| \e[48;2;80;80;80mp \e[0m pause/unpause the view.\n",

"|\e[44m5. Reference\e[49m \n",
"|More information about recon:proc_count/2 and recon:proc_window/3 \n",
Expand Down

0 comments on commit bbd34a3

Please sign in to comment.