File: pmadeltaindom.3

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (142 lines) | stat: -rw-r--r-- 3,784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
'\"macro stdmacro
.\"
.\" Copyright (c) 2022 Ken McDonell.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMADELTAINDOM 3 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmaDeltaInDom\f1 \- generate a ``delta indom'' if two observations of an instance domain are different
.SH "C SYNOPSIS"
.ft 3
#include <pcp/pmapi.h>
.br
#include <pcp/libpcp.h>
.br
#include <pcp/archive.h>
.sp
void pmaDeltaInDom(__pmLogInDom *\fIold\fP, __pmLogInDom *\fInew\fP, __pmLogInDom *\fInew_delta\fP);
.sp
cc ... \-lpcp_archive \-lpcp
.ft 1
.SH CAVEAT
This documentation is intended for internal Performance Co-Pilot
(PCP) developer use.
.PP
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.
.SH DESCRIPTION
.de CR
.ie t \f(CR\\$1\fR\\$2
.el \fI\\$1\fR\\$2
..
Checks if two observations of the same instance domain are identical, and
if they are
.BR not ,
tries to generate a ``delta indom'' to describe the
differences.
.PP
The code assumes (a)
.IR old -> indom " == " new -> indom
and (b) both the instance domains are sorted in ascending internal
instance identifier sequence; see
.BR pmaSortInDom (3)
to see how to make the second condition true.
.PP
The ``delta indom'' format is only supported for Version 3 archives and it
is the caller's responsibility to determine if calling
.B pmaDeltaInDom
is appropriate, rather than calling
.BR pmaSameInDom (3)
which is the preferred method for V2 archives.
.PP
.B pmaDeltaInDom
returns 0 if the
.I old
and
.I new
instance domains are the same.
.PP
A return value of 1 indicates that the instance domains are different
and the ``delta indom'' format is
.B not
more efficient; in this case
.I new_delta
is not modified.
.PP
A return value of 2 indicates that the instance domains are different
and
.I new_delta
has been set up to describe the ``delta indom'' encoding of the
differences;  in this case the caller is responsible for freeing
.IR new_delta -> instlist
and
.IR new_delta -> namelist.
.PP
The instance domains are considered different if any of the
following hold:
.IP 1. 4n
.IR old -> numinst " != " new -> numinst
.IP 2. 4n
For some i,
.IR old -> instlist [ i ] " != " new -> instlist [ i ]
.IP 3. 4n
For some i, the strings pointed to by
.IR old -> namelist [ i ]
and
.IR new -> instlist [ i ]
are not identical
.SH DELTA INDOM FORMAT
As for a regular instance domain,
.IR new_delta -> numinst
defines the number of instance specifications.
.PP
If
.IR new_delta -> namelist [ i "] == NULL"
then the instance identified by
.IR new_delta -> instlist [ i ]
has been
.B deleted
from the instance domain.
.PP
If
.IR new_delta -> namelist [ i "] != NULL"
then the instance identified by
.IR new_delta -> instlist [ i ]
has been
.B added
to the instance domain.
.PP
Because the ``delta indom'' is only likely to have short-term relevance
to the caller, the
.IR new_delta -> namelist [ i ]
entries that are not NULL will point
back into
.IR old -> namelist [ j ]
or
.IR new -> namelist [ k ]
and so
.I old
and
.I new
should not be freed until the caller has finished with
.IR new_delta .
.
.SH SEE ALSO
.BR PMAPI (3),
.BR pmaSortInDom (3)
and
.BR pmaSameInDom (3).

.\" control lines for scripts/man-spell
.\" +ok+ INDOM