PMUNREGISTERDERIVED(3)

πŸ¦‹ PMUNREGISTERDERIVED(3) πŸ¦‹

okay bestie, we're in the Library Functions Manual section, and today's main character is pmUnregisterDerived πŸ’…


✨ NAME ✨

pmUnregisterDerived β€” unregister a derived metric πŸŽ€


🌸 C SYNOPSIS 🌸

#include <pcp/pmapi.h>

int pmUnregisterDerived(char *name);

cc ... -lpcp

πŸ’– DESCRIPTION πŸ’–

so first, a lil lore drop πŸ“–βœ¨ Derived metrics are literally the glow-up of the Performance Metrics Name Space (PMNS) β€” they let you add brand new metrics defined on the PCP client-side, using expressions built on top of the performance metrics you already have. it's giving "new metric, who dis" πŸ”₯

now, there's two flavours, and you gotta know which is which:

and what does pmUnregisterDerived do? it removes the definition of the derived metric name from the set of global derived metrics and from every active PMAPI context. so it's not a subtle lil removal, bestie β€” it's a full βœ‚οΈ bye-bye across the board. she ate and left no crumbs πŸ’€


πŸ”₯ DIAGNOSTICS πŸ”₯

On success, pmUnregisterDerived returns a value greater than or equal to zero, being the number of contexts from which name was removed. so if it says 3, that's three contexts that just got the memo πŸ“¬βœ¨

Otherwise, pmUnregisterDerived returns a PMAPI error, and the application should call pmErrStr(3) to retrieve the corresponding error message. like, go get your error translation bestie, pmErrStr(3) has you 🫢

ngl, a negative return here is not a vibe check you want to fail β€” handle it, don't ignore it 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, periodt πŸ’œ this one came straight out of Performance Co-Pilot (the source/version vibe is all theirs, no date stamped on the footer, just the PCP name, iykyk) β€” go forth and unregister responsibly, my love πŸŒˆπŸ¦‹β­

πŸ“¦ where this page comes from