QmcSource3
Manages contexts created by all groups
C++ synopsis
#include <QmcSource.h>
c++ ... -lpcp_qmc -lpcp
Overview
The QmcSource class maintains a unique list of all metric sources in use to minimize the creation of new contexts (see pmNewContext(3)) when the context could have been duplicated (see pmDupContext(3)). This also reduces the duplication of descriptions of each source.
In general, QMC users should only need to access QmcSource methods to obtain source descriptions for a QmcContext(3) object. All context creation by the user should be handled through QmcGroup(3).
Destructor
~QmcSource();-
Destructor.
Constructors
- static QmcSource* getSource(int type, const char* source,
-
bool matchHosts)
This method will return a
QmcSourceobject that represents a context of type to source. TheQmcSourceobject may be a new object if the source has not been previously requested. Memory management of theQmcSourceobjects is handled byQmcSource. If all QmcContext(3)s to theQmcSourcehave been deleted, theQmcSourceobject will also be deleted.The matchHosts flag controls the algorithm that is used to match hosts to archives. If matchHosts is equal to
falsethen no attempt will be made by this method to match a host context to an existing source context. AQmcSourceobject will always be returned in this case, although theQmcSource::statusmethod may indicate that a context to source failed.If matchHosts is equal to
true, host contexts will be matched to a predefined archive source collected from that source. If no archive sources for the source have been previous specified,getSourcewill return a NULL pointer.
Diagnostics
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 the option pmc to the global debugging specification, as described in pmSetDebug(3).
Releases
6 releases since Debian 8 (Jessie); the text changed 5 times.