NAME | C++ SYNOPSIS | DESCRIPTION | CONSTRUCTORS | INSTANCES | SEE ALSO | DIAGNOSTICS | COLOPHON

QMC_METRIC(3)             Library Functions Manual             QMC_METRIC(3)

NAME         top

       QmcMetric - container for a metric and all its values

C++ SYNOPSIS         top

       #include <pcp/pmc/Metric.h>
       CC ... -lpcp_pmc -lpcp

DESCRIPTION         top

       A QmcMetric object is a container for a single metric and all its
       values.
       The QmcMetricValue structure is used to hold the instance index,
       values and errors of each instance.  In the case of a singular
       metric, a single QmcMetricValue object is used.
       A QmcMetric object consists of a list of QmcMetricValue objects,
       indexes to the descriptors in the metric's QmcGroup and QmcContext
       and flags to indicate if the instances are explicit or implicit, and
       if only active metrics are required after QmcMetric::updateIndom is
       called.

CONSTRUCTORS         top

       Metrics should be constructed through the QmcGroup::addMetric methods
       as this will ensure that the references to the metric's context,
       descriptor and instance domain are correctly initialized.

INSTANCES         top

       For metrics with an instance domain it is possible to add and remove
       any instance, and also update the instance list to reflect changes in
       a dynamic instance domain.
       bool updateIndom();
           Update the metric to include new instances.  This method will
           first call QmcContext::update to update the instance domain.  If
           the active flag is set in the QmcGroup::addMetric call, only
           instances will exported by the metric, otherwise the metric will
           export all instances listed in the domain.
           The ordering of instances may change as a result of this call.
           Instances that already existed will keep their current and
           previous values and errors, even if they are in a different
           order.
       int addInst(QString const& name);
           Add the instance name to the metric.  If the instance does not
           exist in the instance domain, a PMAPI(3) error will be returned.
           This method ignores the value of the active flag set in the
           QmcMetric constructor.
       void removeInst(uint_t index);
           Remove the instance at position index from the metric.

SEE ALSO         top

       PMAPI(3), QMC(3), QMC_Context(3), QMC_Group(3), pmflush(3) and
       pmprintf(3).

DIAGNOSTICS         top

       Error messages are generated using pmprintf(3) but are not flushed.
       It is the responsibility of the user to call pmflush(3) to output any
       messages.
       Additional diagnostics may be activated by adding DBG_TRACE_PMC to
       the global pmDebug.

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at ⟨http://www.pcp.io/⟩.
       If you have a bug report for this manual page, send it to
       pcp@oss.sgi.com.  This page was obtained from the project's upstream
       Git repository ⟨git://git.pcp.io/pcp⟩ on 2017-07-05.  If you discover
       any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail
       to man-pages@man7.org
Performance Co-Pilot                 SGI                       QMC_METRIC(3)

Pages that refer to this page: QMC(3)QmcContext(3)QmcGroup(3)QmcIndom(3)