PMASAMEINDOM(3)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

✨ 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:

  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

(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