pmadeltaindom(3) — Linux manual page

NAME | C SYNOPSIS | CAVEAT | DESCRIPTION | DELTA INDOM FORMAT | SEE ALSO | COLOPHON

PMADELTAINDOM(3)         Library Functions Manual        PMADELTAINDOM(3)

NAME         top

       pmaDeltaInDom - generate a ``delta indom'' if two observations of
       an instance domain are different

C SYNOPSIS         top

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

       int pmaDeltaInDom(__pmLogInDom *old, __pmLogInDom *new,
                          __pmLogInDom *new_delta);

       cc ... -lpcp_archive -lpcp

CAVEAT         top

       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         top

       Checks if two observations of the same instance domain are identi‐
       cal, and if they are not, tries to generate a ``delta  indom''  to
       describe the differences.

       The code assumes (a) old->indom == new->indom and (b) both the in‐
       stance domains are sorted in ascending internal instance identifi‐
       er  sequence;  see  pmaSortInDom(3)  to see how to make the second
       condition true.

       The ``delta  indom''  format  is  only  supported  for  Version  3
       archives  and  it  is  the caller's responsibility to determine if
       calling  pmaDeltaInDom  is  appropriate,   rather   than   calling
       pmaSameInDom(3) which is the preferred method for V2 archives.

       pmaDeltaInDom  returns  0  if the old and new instance domains are
       the same.

       A return value of 1 indicates that the instance domains  are  dif‐
       ferent  and  the  ``delta indom'' format is not more efficient; in
       this case new_delta is not modified.

       A return value of 2 indicates that the instance domains  are  dif‐
       ferent  and  new_delta has been set up to describe the ``delta in‐
       dom'' encoding of the differences;  in this case the caller is re‐
       sponsible for freeing new_delta->instlist and new_delta->namelist.

       The instance domains are considered different if any of  the  fol‐
       lowing 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

DELTA INDOM FORMAT         top

       As for a regular instance domain, new_delta->numinst defines the
       number of instance specifications.

       If new_delta->namelist[i] == NULL then the instance identified by
       new_delta->instlist[i] has been deleted from the instance domain.

       If new_delta->namelist[i] != NULL then the instance identified by
       new_delta->instlist[i] has been added to the instance domain.

       Because the ``delta indom'' is only likely to have short-term rel‐
       evance to the caller, the new_delta->namelist[i] entries that are
       not NULL will point back into old->namelist[j] or new->namelist[k]
       and so old and new should not be freed until the caller has fin‐
       ished with new_delta.

SEE ALSO         top

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

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.  In‐
       formation 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@groups.io.  This page was obtained from the project's upstream
       Git repository ⟨https://github.com/performancecopilot/pcp.git⟩ on
       2025-08-11.  (At that time, the date of the most recent commit
       that was found in the repository was 2025-08-11.)  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               PCP                   PMADELTAINDOM(3)

Pages that refer to this page: pmasameindom(3)pmatrydeltaindom(3)