Mnesia instrumentation helpers.
table_disk_size/1 | Equivalent to table_disk_size(mnesia:system_info(directory), Table). |
table_disk_size/2 |
Returns sum of all mnesia files for the given Table in bytes. |
tm_info/0 | Returns {PCount, CCount} tuple, where PCount is a number of participant transactions and CCount is a number of coordinator transactions. |
table_disk_size(Table) -> Size
Table = file:name_all()
Size = non_neg_integer()
Equivalent to table_disk_size(mnesia:system_info(directory), Table)
.
table_disk_size(Dir, Table) -> Size
Dir = file:name_all()
Table = file:name_all()
Size = non_neg_integer()
Returns sum of all mnesia files for the given Table
in bytes.
Mnesia can create different files for each table:
- .DAT - DETS files
- .TMP - temp files
- .DMP - dumped ets tables
- .DCD - disc copies data
- .DCL - disc copies log
- .LOGTMP - disc copies log
More on Mnesia files can be found in Mnesia System Information chapter of Mnesia User's Guide
tm_info() -> {Ps, Cs} | {undefined, undefined}
Ps = non_neg_integer()
Cs = non_neg_integer()
Returns {PCount, CCount} tuple, where PCount is a number of participant transactions and CCount is a number of coordinator transactions. Can return {undefined, undefined} occasionally.