Data Structures | Macros | Enumerations | Enumerator | Functions
Render Statistics API

Render statistics querying and operation. More...

Macros

#define AiProfileBlock(...)   AiProfileBlockRAII Ai_profile_block(__VA_ARGS__)
 Macro to measure total time spent in a code block. More...
 

Enumerations

enum  AtStatsMode { AI_STATS_MODE_OVERWRITE , AI_STATS_MODE_APPEND }
 Output mode for structured statistics. More...
 

Functions

AI_API AtStatsMode AiStatsGetMode ()
 Get the mode for outputting structured statistics. More...
 
AI_API const char * AiStatsGetFileName ()
 Get the filename of the structured stats output. More...
 
AI_API void AiStatsSetMode (AtStatsMode mode)
 Set the file mode for outputting structured statistics. More...
 
AI_API void AiStatsSetFileName (const char *filename)
 Set the output file that will contain structured stats from this session's renders. More...
 
AI_API void AiProfileSetFileName (const char *filename)
 JSON file to which profiling traces should be written to. More...
 
AI_API AtString AiProfileGetFileName ()
 Get the JSON filename to which profiling traces will be written to. More...
 
 AiProfileBlockRAII::AiProfileBlockRAII (const char *name, const AtNode *node=NULL)
 
 AiProfileBlockRAII::AiProfileBlockRAII (const AtNode *node)
 

Detailed Description

Render statistics querying and operation.

Macro Definition Documentation

◆ AiProfileBlock

#define AiProfileBlock (   ...)    AiProfileBlockRAII Ai_profile_block(__VA_ARGS__)

Macro to measure total time spent in a code block.

It can be given either a descriptive string literal, an AtNode that should be associated with this measurement, or both.

Example usages:

void foo(AtNode* node)
{
// ... do work
while (some_expression)
{
AiProfileBlock("foo worker", node);
// ... do work
}
}
void bar()
{
AiProfileBlock(__func__);
// ... do work
}
#define AiProfileBlock(...)
Macro to measure total time spent in a code block.
Definition: ai_stats.h:69
This represents a node in Arnold.

Enumeration Type Documentation

◆ AtStatsMode

Output mode for structured statistics.

Enumerator
AI_STATS_MODE_OVERWRITE 

Overwrite the file if it exists

AI_STATS_MODE_APPEND 

Append data to existing statistics file.

Function Documentation

◆ AiStatsGetMode()

AI_API AtStatsMode AiStatsGetMode ( )

Get the mode for outputting structured statistics.

Returns
the file mode, either overwrite or append to an existing file

◆ AiStatsGetFileName()

AI_API const char * AiStatsGetFileName ( )

Get the filename of the structured stats output.

Returns
the filename of the stats output, will be NULL for disabled stats output

◆ AiStatsSetMode()

AI_API void AiStatsSetMode ( AtStatsMode  mode)

Set the file mode for outputting structured statistics.

The default is to append to the file.

Parameters
modeThe file mode, either overwrite or append to an existing file

◆ AiStatsSetFileName()

AI_API void AiStatsSetFileName ( const char *  filename)

Set the output file that will contain structured stats from this session's renders.

Parameters
filenameThe path of the JSON file where the statistics will be written. If empty or NULL it will disable stats output.

◆ AiProfileSetFileName()

AI_API void AiProfileSetFileName ( const char *  filename)

JSON file to which profiling traces should be written to.

This is written in the Trace Event format which is viewable in Google Chrome at chrome://tracing/ . Setting to NULL will disable output.

◆ AiProfileGetFileName()

AI_API AtString AiProfileGetFileName ( )

Get the JSON filename to which profiling traces will be written to.

See also
AiProfileSetFileName()

© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com