Fb 9995 #1

Closed
wants to merge 3 commits into
from
View
@@ -62,8 +62,21 @@ merge_results(Info) ->
[{compact_running, lists:member(true, X)} | Acc];
(disk_size, X, Acc) ->
[{disk_size, lists:sum(X)} | Acc];
+ (other, X, Acc) ->
+ [{other, {merge_other_results(X)}} | Acc];
(disk_format_version, X, Acc) ->
[{disk_format_version, lists:max(X)} | Acc];
(_, _, Acc) ->
Acc
end, [{instance_start_time, <<"0">>}], Dict).
+
+merge_other_results(Results) ->
+ Dict = lists:foldl(fun({Props}, D) ->
+ lists:foldl(fun({K,V},D0) -> orddict:append(K,V,D0) end, D, Props)
+ end, orddict:new(), Results),
+ orddict:fold(fun
+ (data_size, X, Acc) ->
+ [{data_size, lists:sum(X)} | Acc];
+ (_, _, Acc) ->
+ Acc
+ end, [], Dict).
@@ -59,6 +59,8 @@ merge_results(Info) ->
[{language, X} | Acc];
(disk_size, X, Acc) ->
[{disk_size, lists:sum(X)} | Acc];
+ (data_size, X, Acc) ->
+ [{data_size, lists:sum(X)} | Acc];
(compact_running, X, Acc) ->
[{compact_running, lists:member(true, X)} | Acc];
(updater_running, X, Acc) ->