QMCDESC(3)

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

πŸ‘‘ QmcDesc β€” the metric description container, bestie edition πŸ’…

okay so this is QmcDesc(3), a page from the Library Functions Manual (section 3, C++ library functions, iykyk). It's a container for a metric description and honestly? she's serving structure. ✨


✨ C++ SYNOPSIS ✨

like, this is how you get her in the door:

#include <QmcDesc.h>

c++ ... -lpcp_qmc -lpcp

yes bestie, you link -lpcp_qmc and -lpcp. both. no skipping. 🫢


🌸 DESCRIPTION 🌸

A QmcDesc object is literally just a container for a metric descriptor β€” that's a pmDesc, see PMAPI(3) β€” plus units. that's it. that's the whole vibe. she holds the descriptor and the units and she holds them well. πŸ’–


πŸŽ€ CONSTRUCTORS & DESTRUCTOR πŸŽ€

  • ~QmcDesc(); β€” Destructor. she says bye. πŸ’€
  • QmcDesc(pmID pmid); β€” Construct a container for the descriptor for pmid. The descriptor is obtained from the current PMAPI(3) context using pmLookupDesc(3). so like, she goes and fetches it for you, main character energy fr fr. πŸ‘‘

✨ DESCRIPTION ✨ (yes there's a second one, the manpage said so, not me πŸ™ˆ)

  • int status() const; β€” A status less than zero means the descriptor could not be obtained, and the PMAPI(3) error is encoded in the result. so like… check her status before you start acting brand new. 😭
  • pmID id() const; β€” Return the pmID for this descriptor. her name tag. πŸŽ€
  • pmDesc desc() const; β€” Return a copy of the actual metric descriptor. a copy, bestie, not the original. πŸ’…
  • const pmDesc *descPtr() const; β€” Return a pointer to the actual descriptor, and the whole point of this one is to avoid using a pointer to a temporary. so if you need the real thing and not a ghost of a temporary, this is the one. πŸ¦‹

🌈 UNITS 🌈

  • const QString &units() const; β€” The complete unit string for this descriptor. the full sentence, no abbreviations, she's being thorough. πŸ’œ
  • const QString &shortUnits() const; β€” The unit string using abbreviations. the text-message version. ⭐
  • bool useScaleUnits() const; β€” Returns true if the units have been set by a call to QmcDesc::setScaleUnits. literally just a vibe check on whether the scaling units got set. πŸ”₯
  • const pmUnits &scaleUnits() const; β€” Return the scaling units for this descriptor.
  • void setScaleUnits(const pmUnits &units); β€” Set the scaling units for this descriptor. go off, set them. ✨

πŸ’€ DIAGNOSTICS πŸ’€

Error messages are generated using pmprintf(3) but β€” and this is important bestie β€” they are not flushed. It is the responsibility of the user to call pmflush(3) to output any messages. like, she wrote the message, she did NOT hit send. that's on you. 🫢

no cap: if you don't call pmflush(3), you don't see the messages. the message exists in the void. the void does not text back. 😭

Additional diagnostics may be activated by adding the option pmc to the global debugging specification, as described in pmSetDebug(3). turn the dial up, queen. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

PMAPI(3), QMC(3), pmflush(3), pmLookupDesc(3) and pmprintf(3).


and that's the whole page, bestie πŸ’– this one's a Performance Co-Pilot situation from SGI, and it signs off as QMCDESC(3) β€” go forth and look up your descriptors, you're gonna slay. 🌸✨

πŸ“¦ where this page comes from