PMASAMEINDOM(3) Library Functions Manual PMASAMEINDOM(3)

pmaSameInDom - check if two observations of an instance domain are the same`

#include <pcp/pmapi.h>
#include <pcp/libpcp.h>
#include <pcp/archive.h>

int pmaSameInDom(__pmLogInDom *old, __pmLogInDom *new);

cc ... -lpcp_archive -lpcp

This documentation is intended for internal Performance Co-Pilot (PCP) developer use.

These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and they may not work, or may provide different semantics at some point in the future.

Checks two observations of the same instance domain are identical. The code assumes (a) old->indom == new->indom and (b) both the instance domains are sorted in ascending internal instance identifier sequence; see pmaSortInDom(3) to see how to make the second condition true.

pmaSameInDom returns 1 if they are the same, returns 0 otherwise.

The instance domains are considered different if any of the following hold:

old->numinst != new->numinst
For some i, old->instlist[i] != new->instlist[i]
For some i, the strings pointed to by old->namelist[i] and new->instlist[i] are not identical

For Version 3 archives with "delta indom" support, it is more likely that pmaDeltaInDom(3) is more useful than pmaSameInDom, as the former combines the check for two observations of an instance domain being the same with the optional creation of the "delta indom" format if that is the most efficient encoding.

pmaDeltaInDom(3), PMAPI(3) and pmaSortInDom(3).

PCP Performance Co-Pilot