Include not named_tables on top overview
This commit is contained in:
		
							parent
							
								
									8355352a3d
								
							
						
					
					
						commit
						81c9829314
					
				|  | @ -29,6 +29,7 @@ | ||||||
|     <th><%= fmt_sort_desc_by_default('Memory', 'memory') %></th> |     <th><%= fmt_sort_desc_by_default('Memory', 'memory') %></th> | ||||||
|     <th><%= fmt_sort_desc_by_default('Size', 'size') %></th> |     <th><%= fmt_sort_desc_by_default('Size', 'size') %></th> | ||||||
|     <th><%= fmt_sort_desc_by_default('Type', 'type') %></th> |     <th><%= fmt_sort_desc_by_default('Type', 'type') %></th> | ||||||
|  |     <th><%= fmt_sort_desc_by_default('Named', 'named_table') %></th> | ||||||
|     <th>Protection</th> |     <th>Protection</th> | ||||||
|     <th>Compressed</th> |     <th>Compressed</th> | ||||||
|   </tr> |   </tr> | ||||||
|  | @ -44,6 +45,7 @@ | ||||||
|     <td><%= fmt_bytes(table.memory * 1.0) %></td> |     <td><%= fmt_bytes(table.memory * 1.0) %></td> | ||||||
|     <td><%= table.size %></td> |     <td><%= table.size %></td> | ||||||
|     <td><%= table.type %></td> |     <td><%= table.type %></td> | ||||||
|  |     <td><%= table.named_table %></td> | ||||||
|     <td><%= table.protection %></td> |     <td><%= table.protection %></td> | ||||||
|     <td><%= table.compressed %></td> |     <td><%= table.compressed %></td> | ||||||
|   </tr> |   </tr> | ||||||
|  |  | ||||||
|  | @ -55,9 +55,9 @@ ets_tables(Node, Sort, Order, RowCount) -> | ||||||
|     end. |     end. | ||||||
| 
 | 
 | ||||||
| fmt(Info) -> | fmt(Info) -> | ||||||
|     {owner, Pid} = lists:keyfind(owner, 1, Info), |     {owner, OPid} = lists:keyfind(owner, 1, Info), | ||||||
|     %% OTP 21 introduced the 'id' element that contains a reference. |     {heir, HPid} = lists:keyfind(heir, 1, Info), | ||||||
|     %% These cannot be serialised and must be removed from the proplist |     Info1 = lists:keydelete(owner, 1, Info), | ||||||
|     Info1 = lists:keydelete(owner, 1, |     Info2 = lists:keydelete(heir, 1, Info1), | ||||||
|                             lists:keydelete(id, 1, Info)), |     [{owner,  rabbit_top_util:fmt(OPid)}, | ||||||
|     [{owner,  rabbit_top_util:fmt(Pid)} | Info1]. |      {heir, rabbit_top_util:fmt(HPid)} | Info2]. | ||||||
|  |  | ||||||
|  | @ -122,13 +122,12 @@ ets_tables(_OldTables) -> | ||||||
|         end, |         end, | ||||||
|         ets:all()). |         ets:all()). | ||||||
| 
 | 
 | ||||||
| table_info(Table) when not is_atom(Table) -> undefined; | table_info(Table) -> | ||||||
| table_info(TableName) when is_atom(TableName) -> |  | ||||||
|     Info = lists:map(fun |     Info = lists:map(fun | ||||||
|                         ({memory, MemWords}) -> {memory, bytes(MemWords)}; |                         ({memory, MemWords}) -> {memory, bytes(MemWords)}; | ||||||
|                         (Other) -> Other |                         (Other) -> Other | ||||||
|                      end, |                      end, | ||||||
|                      ets:info(TableName)), |                      ets:info(Table)), | ||||||
|     {owner, OwnerPid} = lists:keyfind(owner, 1, Info), |     {owner, OwnerPid} = lists:keyfind(owner, 1, Info), | ||||||
|     case process_info(OwnerPid, registered_name) of |     case process_info(OwnerPid, registered_name) of | ||||||
|         []                           -> Info; |         []                           -> Info; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue