1PMADELTAINDOM(3) Library Functions Manual PMADELTAINDOM(3)
2
3
4
6 pmaDeltaInDom - generate a ``delta indom'' if two observations of an
7 instance domain are different
8
10 #include <pcp/pmapi.h>
11 #include <pcp/libpcp.h>
12 #include <pcp/archive.h>
13
14 void pmaDeltaInDom(__pmLogInDom *old, __pmLogInDom *new, __pmLogInDom
15 *new_delta);
16
17 cc ... -lpcp_archive -lpcp
18
20 This documentation is intended for internal Performance Co-Pilot (PCP)
21 developer use.
22
23 These interfaces are not part of the PCP APIs that are guaranteed to
24 remain fixed across releases, and they may not work, or may provide
25 different semantics at some point in the future.
26
28 Checks if two observations of the same instance domain are identical,
29 and if they are not, tries to generate a ``delta indom'' to describe
30 the differences.
31
32 The code assumes (a) old->indom == new->indom and (b) both the instance
33 domains are sorted in ascending internal instance identifier sequence;
34 see pmaSortInDom(3) to see how to make the second condition true.
35
36 The ``delta indom'' format is only supported for Version 3 archives and
37 it is the caller's responsibility to determine if calling pmaDeltaInDom
38 is appropriate, rather than calling pmaSameInDom(3) which is the pre‐
39 ferred method for V2 archives.
40
41 pmaDeltaInDom returns 0 if the old and new instance domains are the
42 same.
43
44 A return value of 1 indicates that the instance domains are different
45 and the ``delta indom'' format is not more efficient; in this case
46 new_delta is not modified.
47
48 A return value of 2 indicates that the instance domains are different
49 and new_delta has been set up to describe the ``delta indom'' encoding
50 of the differences; in this case the caller is responsible for freeing
51 new_delta->instlist and new_delta->namelist.
52
53 The instance domains are considered different if any of the following
54 hold:
55
56 1. old->numinst != new->numinst
57
58 2. For some i, old->instlist[i] != new->instlist[i]
59
60 3. For some i, the strings pointed to by old->namelist[i] and new->in‐
61 stlist[i] are not identical
62
64 As for a regular instance domain, new_delta->numinst defines the number
65 of instance specifications.
66
67 If new_delta->namelist[i] == NULL then the instance identified by
68 new_delta->instlist[i] has been deleted from the instance domain.
69
70 If new_delta->namelist[i] != NULL then the instance identified by
71 new_delta->instlist[i] has been added to the instance domain.
72
73 Because the ``delta indom'' is only likely to have short-term relevance
74 to the caller, the new_delta->namelist[i] entries that are not NULL
75 will point back into old->namelist[j] or new->namelist[k] and so old
76 and new should not be freed until the caller has finished with
77 new_delta.
78
80 PMAPI(3), pmaSortInDom(3) and pmaSameInDom(3).
81
82
83
84Performance Co-Pilot PCP PMADELTAINDOM(3)