PMASAMEINDOM(3)

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

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

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

cc ... -lpcp_archive -lpcp

CAVEAT
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.

DESCRIPTION
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:

1.  old->numinst != new->numinst

2.  For some i, old->instlist[i] != new->instlist[i]

3.  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.

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