This article is deprecated. Please see the following article instead.
The Performance Monitor C API consists of the functions described below which are intended to be incorporated into an application that initializes the monitor, attaches an eXtremeDB database to be monitored, then detaches and closes the monitor. The application first initializes the monitor by allocating memory for the perfmon database and passing the memory address and size of the memory segment to mco_perfmon_init(). Then the application opens the eXtremeDB database to monitor and passes the database name to mco_perfmon_attach().
Now the application performs the database operations for which performance metrics are desired and the HTTP Viewer displays these metrics in a browser. When monitoring is completed, the application detaches the database from the monitor by calling mco_perfmon_detach(), and closes the monitor with mco_perfmon_close().
At any time after initializing the monitor the application can set the following options that control its behavior:
enabled
A flag to allow a temporary pause of monitoring. 0=disable or 1=enable. (default is 1 enabled)
monitor_interval_ms
How often the monitor will read values, in ms (default is 1000ms or 1s)
monitor_length_sec
The duration of data that will be displayed in the HV perfmon GUI (default is 3600s)
ui_update_rate_ms
How often to update graphs on perfmon GUI (default is 5000ms)
store_interval_sec
The amount of time data will be stored in the perfmon database. (default is 3600s). Older data will be removed to save space
To retrieve the current options call mco_perfmon_get_options() which returns an options strucure. To set any of the option values, modify an options structure and call mco_perfmon_set_options() with the modified structure. At any time after attaching a database, the name of the monitor database (where the performance metrics are maintained) can be obtained by calling mco_perfmon_get_db_name().
(Please refer to SDK sample 23_httpviewpmon for implementation details .)