mco_perfmon_close

Terminate performance monitoring.

Prototype

 
    MCO_RET	mco_perfmon_close( void );
 

Arguments

void

No arguments

Description

This function terminates database monitoring.

Return Codes

MCO_S_OK The perfmon database was closed successfully
MCO_E_PERFMON_NOT_INITIALIZED The perfmon database has not been initialized

MCO_E_PERFMON_DB_NOT_DETACHED

A database is still attached for monitoring

Example

 
    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);
        ...
        rc = mco_perfmon_detach(dbName);
        rc = mco_perfmon_close();
        
        ...
    }
 

Files

Header file:
mcoperfmon.h
Source file:
mcoperf.c
Library:
libmcoperf.a