'\"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 PMASAMEINDOM 3 "PCP" "Performance Co-Pilot" .SH NAME \f3pmaSameInDom\f1 \- check if two observations of an instance domain are the same` .SH "C SYNOPSIS" .ft 3 #include .br #include .br #include .sp int pmaSameInDom(__pmLogInDom *\fIold\fP, __pmLogInDom *\fInew\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 two observations of the same instance domain are identical. 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 .B pmaSameInDom returns 1 if they are the same, returns 0 otherwise. .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 .PP For Version 3 archives with "delta indom" support, it is more likely that .BR pmaDeltaInDom (3) is more useful than .BR 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. .SH SEE ALSO .BR pmaDeltaInDom (3), .BR PMAPI (3) and .BR pmaSortInDom (3).