mnesia_rocksdb/doc/mrdb_stats.md
2025-10-10 13:07:23 +02:00

2.8 KiB

Module mrdb_stats

Statistics API for the mnesia_rocksdb plugin.

Description

Some counters are maintained for each active alias. Currently, the following counters are supported:

  • inner_retries
  • outer_retries

Data Types

alias()


alias() = mnesia_rocksdb:alias()

counter()


counter() = atom()

counters()


counters() = #{counter() => integer()}

db_ref()


db_ref() = mrdb:db_ref()

increment()


increment() = integer()

Function Index

get/1Fetches all known counters for Alias, in the form of a map, #{Counter => Value}.
get/2Fetches the integer value of the known counter Ctr for Alias.
incr/3Increment Ctr counter for Alias` with increment `N.
new/0

Function Details

get/1


get(Alias::alias() | db_ref()) -> counters()

Fetches all known counters for Alias, in the form of a map, #{Counter => Value}.

get/2


get(Alias::alias() | db_ref(), Ctr::counter()) -> integer()

Fetches the integer value of the known counter Ctr for Alias.

incr/3


incr(Alias::alias() | db_ref(), Ctr::counter(), N::increment()) -> ok

Increment Ctr counter for Alias with increment N.

Note that the first argument may also be a db_ref() map, corresponding to mrdb:get_ref({admin, Alias}).

new/0

new() -> any()