Equalizer  1.4.1
statistic.h
00001 
00002 /* Copyright (c) 2009-2012, 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_ASYNC_READBACK, 
00049             CHANNEL_VIEW_FINISH, 
00050             CHANNEL_FRAME_TRANSMIT, 
00051             CHANNEL_FRAME_COMPRESS, 
00052 
00053             CHANNEL_FRAME_WAIT_SENDTOKEN,
00054             WINDOW_FINISH, 
00055 
00056             WINDOW_THROTTLE_FRAMERATE,
00057             WINDOW_SWAP_BARRIER, 
00058             WINDOW_SWAP, 
00059             WINDOW_FPS, 
00060             PIPE_IDLE, 
00061             NODE_FRAME_DECOMPRESS, 
00062             CONFIG_START_FRAME, 
00063             CONFIG_FINISH_FRAME, 
00064 
00065             CONFIG_WAIT_FINISH_FRAME,
00066             ALL          // must be last
00067         };
00068 
00069         Type type; 
00070         uint32_t frameNumber; 
00071         uint32_t task; 
00072         uint32_t plugins[2]; 
00073         float ratio; 
00074         
00075         union
00076         {
00077             int64_t  startTime; 
00078             int64_t  idleTime;  
00079             float    currentFPS; 
00080         };
00081         union
00082         {
00083             int64_t  endTime;    
00084             int64_t  totalTime;  
00085             float    averageFPS; 
00086         };
00087 
00088         char resourceName[32]; 
00089 
00091         static const std::string& getName( const Type type );
00093         static const Vector3f& getColor( const Type type );
00094     };
00095 
00097     EQ_API std::ostream& operator << ( std::ostream&, const Statistic::Type& );
00098 
00100     EQ_API std::ostream& operator << ( std::ostream&, const Statistic& );
00101 }
00102 
00103 #endif // EQ_STATISTIC_H
00104 
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1