Equalizer logo
Collage logo
GPU-SD logo

Statistics Interface

Author: eilemann@gmail.com
State:

This document describes the first evolution of the statistics interface. With new requirements, for example load balancing, this interface will evolve much further.

Specification

Statistics are measured in milliseconds since the configuration was initialized. On each node, the global configuration clock is reset at the same time by the server during Config::init. Each statistic event records the originator's (channel, window or config) unique identifier.

Statistics are enabled per entity using an attribute hint. The hint determines how precise the gathered statistics are. When set to fastest, the per-frame clock is sampled directly when the event occurs. When set to nicest, all OpenGL commands will be finished before sampling certain events, which incurs a performance penalty. The default setting is fastest in release builds, and nicest in debug builds.

The events are processed by the channel's and window's processEvent. The default implementation sends these events to the config. The default implementation of Config::handleEvent sorts the received events per frame and per originator. When a frame has been finished, the events are pushed to the local (app-)node for visualization.

File Format

  global
  {
      EQ_CHANNEL_IATTR_HINT_STATISTICS    off | fastest [on] | nicest
  }
  channel
  {
      attributes
      {
          hint_statistics     off | fastest [on] | nicest
      }
  }

API

New Types

  struct StatEvent 
  {
  public:
      enum Type
      {
          CHANNEL_CLEAR,
          CHANNEL_DRAW,
          CHANNEL_ASSEMBLE,
          CHANNEL_READBACK,
          CHANNEL_TRANSMIT,
          CHANNEL_COMPRESS,
          TYPE_ALL          // must be last
      };

      Type     type;
      uint32_t objectType;
      uint32_t objectID;
      float    startTime;
      float    endTime;
  };

New Functions

  float Pipe::getFrameTime() const;
  void  Pipe::addStatEvent( const StatEvent& event );