PMASAMEINDOM(3)
β¨ NAME β¨
okay so bestie, welcome to the Library Functions Manual, section 3 β and today's main character is pmaSameInDom, which is literally just "check if two observations of an instance domain are the same" π«Ά
(fr fr, the original page ends that line with a lil stray backtick β `same`` β so like, it's giving typo energy, but we're keeping it because the vibes must be preserved π)
π C SYNOPSIS π
here's the summoning circle, no cap:
#include <pcp/pmapi.h>
#include <pcp/libpcp.h>
#include <pcp/archive.h>
int pmaSameInDom(__pmLogInDom *old, __pmLogInDom *new);
cc ... -lpcp_archive -lpcp
π CAVEAT π
STOP. read this. it's important. π¨
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. so like, it's giving "use at your own risk, bestie" π
π DESCRIPTION π
So what does it actually do? It checks whether two observations of the same instance domain are identical. periodt. β¨
The code assumes two things, and I need you to clock these:
- (a)
old->indom == new->indom - (b) both the instance domains are sorted in ascending internal instance identifier sequence
...and if you're sitting there like "okay but how do I make (b) true tho" π β go see pmaSortInDom(3). it's right there, she's got you. π§
pmaSameInDom returns 1 if they are the same, and returns 0 otherwise. that's it, that's the whole personality.
πΈ when are they "different" tho?
The instance domains are considered different if any of the following hold:
old->numinst != new->numinst- For some
i,old->instlist[i] != new->instlist[i] - For some
i, the strings pointed to byold->namelist[i]andnew->instlist[i]are not identical
(yeah bestie, item 3 really does say new->instlist[i] β we're copying it exactly, character for character, don't @ me π
)
π₯ the "delta indom" tea
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.
so like... it does the vibe check and the encoding in one go? main character energy honestly π
π SEE ALSO π
go read these next, iykyk:
and that's a wrap, bestie!! π this lil masterpiece came to you from Performance Co-Pilot β the PCP girlies β as page PMASAMEINDOM(3). stay iconic, go sort your instance domains, and slay πβ¨π¦
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp-archive1-dev 7.1.1-1
- ubuntu stonking: libpcp-archive1-dev 7.2.1-2build1
- Copyright (c) 2022 Ken McDonell. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms