percept_db

Percept database.

Percept database.

DATA TYPES

activity_option() = {ts_min, timestamp()} | {ts_max, timestamp()} | {ts_exact, bool()} | {mfa, {atom(), atom(), byte()}} | {state, active | inactive} | {id, all | procs | ports | pid() | port()}
information_option() = all | procs | ports | pid() | port()
scheduler_option() = {ts_min, timestamp()} | {ts_max, timestamp()} | {ts_exact, bool()} | {id, scheduler_id()}
system_option() = start_ts | stop_ts

Functions


start() -> ok | {started, Pid} | {restarted, Pid}

  • Pid = pid()

Starts or restarts the percept database.

stop() -> not_started | {stopped, Pid}

  • Pid = pid()

Stops the percept database.

insert(Trace::tuple()) -> ok

Inserts a trace or profile message to the database.

select(Query::{atom(), Options}) -> Result

Synchronous call. Selects information based on a query.

Queries:

  {system, Option}
 	Option = system_option()
 	Result = timestamp()
  {information, Options}
 	Options = [information_option()]
 	Result = [#information{}]
  {scheduler, Options}
 	Options = [sceduler_option()]
 	Result = [#activity{}]
  {activity, Options}
 	Options = [activity_option()]
 	Result = [#activity{}]
  

Note: selection of Id's are always OR all other options are considered AND.

select(Table::atom(), Options::list()) -> Result

Equivalent to select({Table, Options}).

consolidate() -> Result

Checks timestamp and state-flow inconsistencies in the the database.

View Functions