This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

engine.profiler Functions

Profiler functions allow using counters in your code in the following manner:

Source code(UnigineScript)
begin("my_counter");
// ...code to profile...
end();

Counters can be nested.

Profiler Class

Members


void begin (const char * name, const Math::vec4 & color)

Starts a counter with a given name.

Arguments

  • const char * name - Name of the counter.
  • const Math::vec4 & color - Color of the graph.

float end ()

Stops the last activated counter and returns its value.

Return value

Value of the counter in milliseconds.

int isEnabled ()

Returns a value indicating if the profiler is enabled.

Return value

1 if the profiler is enabled; otherwise, 0.

void setValue (const char * name, const char * units, int value, int max_value, float * arg5)

Updates the counter settings.

Arguments

  • const char * name - Name of the counter.
  • const char * units - Counter units.
  • int value - Value of the counter (int or float).
  • int max_value - Counter maximum value.
  • float * arg5 - Color of the graph.

float getValue (const char * name)

Returns a value of the specified counter.

Arguments

  • const char * name - The name of the counter.

Return value

Value of the counter in milliseconds.

void begin (const char * name)

Starts a counter with a given name.

Arguments

  • const char * name - Name of the counter.

void setEnabled (int enabled)

Arguments

  • int enabled

void setValue (const char * name, const char * units, float value, float max_value, float * arg5)

Updates the counter settings.

Arguments

  • const char * name - Name of the counter.
  • const char * units - Counter units.
  • float value - Value of the counter (int or float).
  • float max_value - Counter maximum value.
  • float * arg5 - Color of the graph.
Last update: 2017-07-03
Build: ()