Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.57 KB

prometheus_mnesia.md

File metadata and controls

76 lines (49 loc) · 2.57 KB

Module prometheus_mnesia

Mnesia instrumentation helpers.

Function Index

table_disk_size/1Equivalent 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.

Function Details

table_disk_size/1


table_disk_size(Table) -> Size

Equivalent to table_disk_size(mnesia:system_info(directory), Table).

table_disk_size/2


table_disk_size(Dir, Table) -> Size

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/0


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.