mco_perfmon_get_dictionary

Retrieves a handle to the dictionary of the internal perfmon database.

Prototype

    mco_dictionary_h mco_perfmon_get_dictionary(void);

Arguments

void
No arguments.

Description

This function returns a handle to the schema dictionary of the Performance Monitor’s internal database. The dictionary can be used with User-Defined Aggregates (UDA), metadata introspection, or other eXtremeDB features that require access to the database schema.

The returned handle is valid only after mco_perfmon_init() has been called successfully.

Return Value

mco_dictionary_h
Handle to the perfmon database dictionary. The value is undefined if the Performance Monitor has not been initialized.

Example

    {
        MCO_RET rc;
        const char *dbname = mco_perfmon_get_db_name();
        mco_metadict_entry_t *entry;

        if (dbname == NULL) {
            /* No database attached */
            return;
        }

        init_metadict();

        rc = mco_metadict_register(metadict, dbname, mco_perfmon_get_dictionary(), 0);
        if (rc == MCO_S_OK) {
            rc = mco_metadict_entry_name(metadict, dbname, &entry);
            if (rc == MCO_S_OK) {
                /* Use 'entry' for metadata operations */
            }
        }
    }

Files

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