SoProfilin...tGenerator(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸŽ€ SoProfilingReportGenerator β€” Library Functions Manual πŸŽ€

okay bestie, welcome to the Library Functions Manual for SoProfilingReportGenerator (yes that's the name, it's giving "long title, big brain"). Let's get into it ✨


πŸ’… NAME πŸ’…

SoProfilingReportGenerator β€” convenience report generator functionality. That's it, that's the whole vibe. 🫢


✨ SYNOPSIS ✨

#include <Profiler/tools/SoProfilingReportGenerator.h>

🌈 Public Types 🌈

so here's the full menu of types, no skipping, we're eating the whole plate:

  • enum Constants { TERMINATE_ARGLIST = -1 } β€” the "okay I'm done talking" sentinel, it's literally -1.
  • enum Column { NAME, TYPE, COUNT, TIME_SECS, TIME_SECS_MAX, TIME_SECS_AVG, TIME_MSECS, TIME_MSECS_MAX, TIME_MSECS_AVG, TIME_PERCENT, TIME_PERCENT_MAX, TIME_PERCENT_AVG, MEM_BYTES, MEM_KILOBYTES, GFX_MEM_BYTES, GFX_MEM_KILOBYTES } β€” all the columns you can ask for, every single one, iconic list honestly.
  • enum SortOrder { TIME_ASC, TIME_DES, TIME_MAX_ASC, TIME_MAX_DES, TIME_AVG_ASC, TIME_AVG_DES, COUNT_ASC, COUNT_DES, ALPHANUMERIC_ASC, ALPHANUMERIC_DES, MEM_ASC, MEM_DES, GFX_MEM_ASC, GFX_MEM_DES } β€” how you want things sorted. yes DES not DESC, that's the name, we respect it πŸ’œ
  • enum DataCategorization { TYPES, NAMES, NODES } β€” how you wanna group your data.
  • enum CallbackResponse { CONTINUE, STOP } β€” what your callback says back: keep going, or stop right there.
  • typedef CallbackResponse ReportCB(void *userdata, int entrynum, const char *text) β€” the callback shape, memorise it bestie.

πŸ¦‹ Static Public Member Functions πŸ¦‹

  • static void init (void)
  • static SbProfilingReportSortCriteria * getReportSortCriteria (SortOrder order,...)
  • static SbProfilingReportSortCriteria * getDefaultReportSortCriteria (DataCategorization category)
  • static SbProfilingReportPrintCriteria * getReportPrintCriteria (Column col,...)
  • static SbProfilingReportPrintCriteria * getDefaultReportPrintCriteria (DataCategorization category)
  • static void freeCriteria (SbProfilingReportSortCriteria *criteria)
  • static void freeCriteria (SbProfilingReportPrintCriteria *criteria)
  • static void generate (const SbProfilingData &data, DataCategorization categorization, SbProfilingReportSortCriteria *sort, SbProfilingReportPrintCriteria *print, int count, SbBool addheader, ReportCB *reportcallback, void *userdata)
  • static CallbackResponse stdoutCB (void *userdata, int entrynum, const char *text)
  • static CallbackResponse stderrCB (void *userdata, int entrynum, const char *text)

🌸 Detailed Description 🌸

Convenience report generator functionality. (yes, same sentence as NAME, it said it twice, we don't judge πŸ’–)

With this static class, you can conveniently produce a profiling data report from an SbProfilingData object. that's the whole point, no cap.

Since: Coin 3.0 πŸ‘‘


πŸ”₯ Member Function Documentation πŸ”₯

void SoProfilingReportGenerator::init (void ) [static]

Allocate mutexes and other such infrastructure constructs needed by the report generator. basically it's setting up the little behind-the-scenes machinery so the generator can do its thing 🧚

SbProfilingReportSortCriteria * SoProfilingReportGenerator::getReportSortCriteria (SortOrder order, ...) [static]

Returns a sorting criteria setting object that will make generate() sort the results based on the given argument list in that left-to-right priority order. so first arg = biggest priority, and it just keeps going down the list like a group chat where the first person to text wins 🫢

⚠️ Always end the argument list with TERMINATE_ARGLIST. fr fr, do not forget it.

See also: freeCriteria

SbProfilingReportSortCriteria * SoProfilingReportGenerator::getDefaultReportSortCriteria (DataCategorization category) [static]

Returns a sensible default that can be used for a given profiling data categorization. you give it the category, it gives you something reasonable back. lowkey the easiest route πŸ’…

SbProfilingReportPrintCriteria * SoProfilingReportGenerator::getReportPrintCriteria (Column col, ...) [static]

Returns a printing criteria setting object that will make generate() send a formatted string as the text argument based on the given argument list. and listen: if you force TERMINATE_ARGLIST into the first argument, the text string will be empty. like, nothing. a void. a ghost πŸ‘» (that's literally what the manpage says, I'm not making this up)

⚠️ Always end the argument list with TERMINATE_ARGLIST. (the recurring theme of this entire page, honestly)

See also: freeCriteria

SbProfilingReportPrintCriteria * SoProfilingReportGenerator::getDefaultReportPrintCriteria (DataCategorization category) [static]

Returns a default printing criteria object that can be used sensibly with the given profiling data categorization. the "just give me something that works" option, we love her 🌈

void SoProfilingReportGenerator::generate (const SbProfilingData & data, DataCategorization categorization, SbProfilingReportSortCriteria * sort, SbProfilingReportPrintCriteria * print, int count, SbBool addheader, ReportCB * reportcallback, void * userdata) [static]

Generate a sorted, formatted report, by calling a callback until the number of entries are exhausted or the callback returns STOP. this is the main character function right here πŸ‘‘ it just keeps calling your callback until there's nothing left or you say stop.

SoProfilingReportGenerator::CallbackResponse SoProfilingReportGenerator::stdoutCB (void * userdata, int entryidx, const char * text) [static]

Ready-made callback that can be used with generate() to print to stdout. already-built, already-cute, just plug it in πŸ“

See also: generate

SoProfilingReportGenerator::CallbackResponse SoProfilingReportGenerator::stderrCB (void * userdata, int entryidx, const char * text) [static]

Ready-made callback that can be used with generate() to print to stderr. same energy as the one above but it goes to stderr instead, pick your fave πŸ’œ

See also: generate


πŸ’€ Author πŸ’€

Generated automatically by Doxygen for Coin from the source code. yeah it wasn't a human, it was Doxygen, we still appreciate the effort πŸ™ˆ


okay that's the whole page, you ate that bestie πŸ’…βœ¨ and for the cute sign-off: this gorgeous thing came from Coin, Version 3.1.3 β€” periodt, no cap, go profile something πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from