Equalizer  2.1.0
Parallel Rendering Framework
statistic.h
1 
2 /* Copyright (c) 2009-2017, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQ_FABRIC_STATISTIC_H
19 #define EQ_FABRIC_STATISTIC_H
20 
21 #include <eq/fabric/api.h>
22 #include <eq/fabric/event.h> // base class
23 #include <eq/fabric/types.h>
24 #include <iostream>
25 #include <lunchbox/bitOperation.h> // inline template specialization
26 
27 namespace eq
28 {
29 namespace fabric
30 {
40 struct Statistic : public Event
41 {
43  enum Type // Also update string and color table in statistic.cpp
44  {
45  NONE = 0,
56 
59 
68 
70  ALL // must be last
71  };
72 
74  uint32_t frameNumber;
75  uint32_t task;
76  uint32_t plugins[2];
77 
78  int64_t startTime;
79  int64_t endTime;
80  int64_t idleTime;
81  int64_t totalTime;
82 
83  float ratio;
84  float currentFPS;
85  float averageFPS;
86  float pad;
87 
88  char resourceName[32];
89 
91  EQFABRIC_API static const std::string& getName(const Type type);
93  EQFABRIC_API static const Vector3f& getColor(const Type type);
94 };
95 
97 EQFABRIC_API std::ostream& operator<<(std::ostream&, const Statistic::Type&);
98 
100 EQFABRIC_API std::ostream& operator<<(std::ostream&, const Statistic&);
101 }
102 }
103 
104 #endif // EQ_FABRIC_STATISTIC_H
Base event structure to report window system and other events.
Definition: event.h:36
Sampling of synchronization time during Config::finishFrame.
Definition: statistic.h:69
Sampling of Channel::frameReadback.
Definition: statistic.h:51
uint32_t plugins[2]
color,depth plugins (readback, compression)
Definition: statistic.h:76
Sampling of waiting for a send token from the receiver.
Definition: statistic.h:57
Defines export visibility macros for library EqualizerFabric.
Sampling of Channel::frameDrawFinish.
Definition: statistic.h:48
Sampling of Channel::frameClear.
Definition: statistic.h:46
Sampling of Channel::frameViewFinish.
Definition: statistic.h:53
Sampling of Config::startFrame.
Definition: statistic.h:66
Sampling of Window::finish before a swap barrier.
Definition: statistic.h:58
int64_t startTime
Absolute start time of the operation.
Definition: statistic.h:78
Sampling of Frame::waitReady.
Definition: statistic.h:50
static EQFABRIC_API const std::string & getName(const Type type)
Translate the Type to a string representation.
Sampling of frame compression.
Definition: statistic.h:55
static EQFABRIC_API const Vector3f & getColor(const Type type)
Translate the Type to a color value.
Type
The type of the statistics event.
Definition: statistic.h:43
uint32_t frameNumber
The frame during when the sampling happened.
Definition: statistic.h:74
Sampling of frame decompression.
Definition: statistic.h:65
float currentFPS
FPS of last frame (WINDOW_FPS)
Definition: statistic.h:84
Sampling of swap barrier block.
Definition: statistic.h:61
Type type
The type of statistic.
Definition: statistic.h:73
Sampling of Channel::frameDraw.
Definition: statistic.h:47
The Equalizer client library.
Definition: eq/agl/types.h:23
int64_t totalTime
Total time of a pipe frame (PIPE_IDLE)
Definition: statistic.h:81
char resourceName[32]
A non-unique name of the originator.
Definition: statistic.h:88
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
Definition: axisEvent.h:49
Sampling of Window::swapBuffers.
Definition: statistic.h:62
int64_t idleTime
Absolute idle time of PIPE_IDLE.
Definition: statistic.h:80
float ratio
compression ratio (transfer, compression)
Definition: statistic.h:83
Sampling of throttling of framerate_equalizer.
Definition: statistic.h:60
float averageFPS
Weighted sum averaging of FPS (WINDOW_FPS)
Definition: statistic.h:85
A statistics event.
Definition: statistic.h:40
int64_t endTime
Absolute end time of the operation.
Definition: statistic.h:79
Sampling of async readback.
Definition: statistic.h:52
Sampling of Config::finishFrame.
Definition: statistic.h:67
Sampling of Channel::frameAssemble.
Definition: statistic.h:49
Framerate sampling.
Definition: statistic.h:63
Sampling of frame transmission.
Definition: statistic.h:54
Pipe thread idle ratio.
Definition: statistic.h:64