PMIEND(3)

πŸ’– PMIEND β€” bestie, it's time to wrap it UP πŸ’–

okay so this is the pmiEnd page from the Library Functions Manual, and it's literally the "we're done here, pack your bags" function for a LOGIMPORT archive. it's giving closing time at the function. ✨


🌸 NAME 🌸

pmiEnd β€” finish up a LOGIMPORT archive πŸŽ€


πŸ’… C SYNOPSIS πŸ’…

#include <pcp/pmapi.h>
#include <pcp/import.h>

int pmiEnd(void);

cc ... -lpcp_import -lpcp

πŸ¦‹ Perl SYNOPSIS πŸ¦‹

use PCP::LogImport;

pmiEnd();

🌈 Python SYNOPSIS 🌈

from pcp import pmi

log.pmiEnd()

✨ DESCRIPTION ✨

so. this is part of the Performance Co-Pilot Log Import API (peep LOGIMPORT(3) for the whole saga, iykyk). what pmiEnd does is close the current context, which forces the trailer records to be written to the PCP archive files, and then those files get closed. periodt. πŸ’…

like, the trailer records NEED to go in, bestie β€” that's the whole point. no trailer, no completed archive.

in normal operations (aka when you're being a well-behaved main character), an application would include a call to pmiEnd at the end of processing for each context that was created with a call to pmiStart(3). every single one. no skipping. πŸ™ˆ

not me forgetting to call pmiEnd and leaving my archive half-finished... couldn't be me... 😭

πŸ’€ DIAGNOSTICS πŸ’€

pmiEnd returns zero on success. slay. βœ…

if it doesn't, you get a negative value, and you can turn that into an actual error message by calling pmiErrStr(3). go get your little explanation, you deserve it. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


Performance Co-Pilot wrote this one, bestie β€” mwah, tysm, no cap. πŸŽ€πŸ’– that's the whole page, go forth and close your contexts properly. ⭐

πŸ“¦ where this page comes from