Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoProfilingReportGenerator Class Reference

Convenience report generator functionality. More...

#include <Profiler/tools/SoProfilingReportGenerator.h>

Public Types

enum  CallbackResponse { CONTINUE , STOP }
 
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
}
 
enum  DataCategorization { TYPES , NAMES , NODES }
 
typedef CallbackResponse ReportCB(void *userdata, int entrynum, const char *text)
 
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
}
 

Static Public Member Functions

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

Detailed Description

Convenience report generator functionality.

With this static class, you can conveniently produce a profiling data report from an SbProfilingData object.

Since
Coin 3.0

Member Function Documentation

◆ generate()

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.

◆ getDefaultReportPrintCriteria()

SbProfilingReportPrintCriteria * SoProfilingReportGenerator::getDefaultReportPrintCriteria ( DataCategorization category)
static

Returns a default printing criteria object that can be used sensibly with the given profiling data categorization.

◆ getDefaultReportSortCriteria()

SbProfilingReportSortCriteria * SoProfilingReportGenerator::getDefaultReportSortCriteria ( DataCategorization category)
static

Returns a sensible default that can be used for a given profiling data categorization.

◆ getReportPrintCriteria()

SbProfilingReportPrintCriteria * SoProfilingReportGenerator::getReportPrintCriteria ( const SbList< Column > & order)
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. If you force TERMINATE_ARGLIST into the first argument, the text string will be empty.

Always end the argument list with TERMINATE_ARGLIST.

See also
freeCriteria

◆ getReportSortCriteria()

SbProfilingReportSortCriteria * SoProfilingReportGenerator::getReportSortCriteria ( const SbList< 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.

Always end the argument list with TERMINATE_ARGLIST.

See also
freeCriteria

◆ init()

void SoProfilingReportGenerator::init ( void )
static

Allocate mutexes and other such infrastructure constructs needed by the report generator.

◆ stderrCB()

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.

See also
generate

◆ stdoutCB()

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.

See also
generate

The documentation for this class was generated from the following files: