Attach a database for monitoring.
MCO_RET mco_perfmon_attach( /*IN*/ const char *dbName);
dbName |
The name of the database to attach |
This function attaches the specified database for monitoring.
MCO_S_OK | The database was attached successfully |
MCO_E_PERFMON_NOT_INITIALIZED | The perfmon database has not been initialized |
Application snippet: #define PERF_DATABASE_SEGMENT_SIZE ( 64<<20 ) const char* dbName = "SimpleDb"; int main(int argc, char* argv[]) { mco_db_h db; MCO_RET rc; ... void *perf_memory; ... perf_memory = malloc(PERF_DATABASE_SEGMENT_SIZE); rc = mco_perfmon_init(perf_memory, PERF_DATABASE_SEGMENT_SIZE); rc = mco_perfmon_attach(dbName); rc = mco_db_connect(dbName, &db); ... }