aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-05-18 14:53:06 +0200
committerBadlop <badlop@process-one.net>2021-05-19 15:00:16 +0200
commit494ba9a63541e798128f2b4cdcf40ab8e1caba44 (patch)
tree96ce80748bb6fd1b8f10ada020a20dcd1ca625c0
parentAdd missing indexes to sql sr_group tables (diff)
Show mnesia table memory in bytes, not in words
-rw-r--r--src/ejabberd_web_admin.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ejabberd_web_admin.erl b/src/ejabberd_web_admin.erl
index 05ebc5f10..543cd28e5 100644
--- a/src/ejabberd_web_admin.erl
+++ b/src/ejabberd_web_admin.erl
@@ -1151,6 +1151,7 @@ get_node(global, Node, [<<"db">>], Query, Lang) ->
{T, S, M};
_ -> {unknown, 0, 0}
end,
+ MemoryB = Memory*erlang:system_info(wordsize),
?XE(<<"tr">>,
[?XE(<<"td">>,
[?AC(<<"./", STable/binary,
@@ -1166,7 +1167,7 @@ get_node(global, Node, [<<"db">>], Query, Lang) ->
(pretty_string_int(Size)))]),
?XAC(<<"td">>,
[{<<"class">>, <<"alignright">>}],
- (pretty_string_int(Memory)))])
+ (pretty_string_int(MemoryB)))])
end,
STables),
[?XC(<<"h1">>,
@@ -1750,6 +1751,7 @@ make_table_view(Node, STable, Lang) ->
{value, {storage_type, Type}} = lists:keysearch(storage_type, 1, TInfo),
{value, {size, Size}} = lists:keysearch(size, 1, TInfo),
{value, {memory, Memory}} = lists:keysearch(memory, 1, TInfo),
+ MemoryB = Memory*erlang:system_info(wordsize),
TableInfo = str:format("~p", [TInfo]),
[?XC(<<"h1">>, (str:translate_and_format(Lang, ?T("Database Tables at ~p"),
[Node]))),
@@ -1780,7 +1782,7 @@ make_table_view(Node, STable, Lang) ->
?XE(<<"tr">>,
[?XCT(<<"td">>, ?T("Memory")),
?XAC(<<"td">>, [{<<"class">>, <<"alignright">>}],
- (pretty_string_int(Memory))
+ (pretty_string_int(MemoryB))
)])
])]),
?XC(<<"pre">>, TableInfo)].