Equalizer
1.2.1
|
00001 00002 /* Copyright (c) 2009-2011, Stefan Eilemann <eile@equalizergraphics.com> 00003 * 00004 * This library is free software; you can redistribute it and/or modify it under 00005 * the terms of the GNU Lesser General Public License version 2.1 as published 00006 * by the Free Software Foundation. 00007 * 00008 * This library is distributed in the hope that it will be useful, but WITHOUT 00009 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00010 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00011 * details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public License 00014 * along with this library; if not, write to the Free Software Foundation, Inc., 00015 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00016 */ 00017 00018 #ifndef EQ_STATISTIC_H 00019 #define EQ_STATISTIC_H 00020 00021 #include <eq/client/api.h> 00022 #include <eq/client/types.h> 00023 00024 #include <iostream> 00025 00026 namespace eq 00027 { 00036 struct Statistic 00037 { 00039 enum Type // Also update string and color table in statistic.cpp 00040 { 00041 NONE = 0, 00042 CHANNEL_CLEAR, 00043 CHANNEL_DRAW, 00044 CHANNEL_DRAW_FINISH, 00045 CHANNEL_ASSEMBLE, 00046 CHANNEL_FRAME_WAIT_READY, 00047 CHANNEL_READBACK, 00048 CHANNEL_VIEW_FINISH, 00049 CHANNEL_FRAME_TRANSMIT, 00050 CHANNEL_FRAME_COMPRESS, 00051 00052 CHANNEL_FRAME_WAIT_SENDTOKEN, 00053 WINDOW_FINISH, 00054 00055 WINDOW_THROTTLE_FRAMERATE, 00056 WINDOW_SWAP_BARRIER, 00057 WINDOW_SWAP, 00058 WINDOW_FPS, 00059 PIPE_IDLE, 00060 NODE_FRAME_DECOMPRESS, 00061 CONFIG_START_FRAME, 00062 CONFIG_FINISH_FRAME, 00063 00064 CONFIG_WAIT_FINISH_FRAME, 00065 ALL // must be last 00066 }; 00067 00068 Type type; 00069 uint32_t frameNumber; 00070 uint32_t task; 00071 uint32_t plugins[2]; 00072 float ratio; 00073 00074 union 00075 { 00076 int64_t startTime; 00077 int64_t idleTime; 00078 float currentFPS; 00079 }; 00080 union 00081 { 00082 int64_t endTime; 00083 int64_t totalTime; 00084 float averageFPS; 00085 }; 00086 00087 char resourceName[32]; 00088 00090 static const std::string& getName( const Type type ); 00092 static const Vector3f& getColor( const Type type ); 00093 }; 00094 00096 EQ_API std::ostream& operator << ( std::ostream&, const Statistic::Type& ); 00098 EQ_API std::ostream& operator << ( std::ostream&, const Statistic& ); 00099 } 00100 00101 #endif // EQ_STATISTIC_H 00102