Description

Metadata

Name

Value

Properties

Label

Description

Type

Script Name

Records

Contains records storing the execution time for individual node tasks.

records

Overview

Profiling the time spent executing nodes in the K-3D Visualization Pipeline can be tricky - because the pipeline is demand-driven it is impractical for an external caller to know how much time is spent executing a node versus how much time is spent executing the node's inputs. PipelineProfiler addresses this by collecting data from individual nodes as they are executed. The data is stored as a collection of "records" that contain information about which node was executing, which sub-task within the node was executing and for how-long, automatically adjusted to eliminate time spent executing in a node's inputs. This data can be retrieved from PipelineProfiler using its "records" property.

PipelineProfiler data will typically be accessed from a Python script. The records are available in Python as a dict that maps each pipeline node to a dict. This second dict maps sub-tasks (identified using strings) to their execution time in seconds. Using this data, a caller can:

Caveats

Note that PipelineProfiler only retains the most-recent execution time for each node/task pair.

Note that the ordering of records in the data is arbitrary.

Keep caching in-mind when profiling nodes. In particular, remember that most nodes cache their output until an input changes - executing a node multiple times will return misleadingly-short execution times.

When profiling rendering code, consider the caching that takes-place to create display lists and/or vertex buffer objects. In this case you will get misleadingly-long execution times the first-time a data set is rendered.