statistic.h

00001 
00002 /* Copyright (c) 2009, 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/types.h>
00022 #include <eq/base/base.h>
00023 
00024 #include <iostream>
00025 
00026 namespace eq
00027 {
00029     struct Statistic
00030     {
00031         enum Type // Also update string and color table in statistic.cpp
00032         {
00033             NONE = 0,
00034             CHANNEL_CLEAR,
00035             CHANNEL_DRAW,
00036             CHANNEL_DRAW_FINISH,
00037             CHANNEL_ASSEMBLE,
00038             CHANNEL_WAIT_FRAME,
00039             CHANNEL_READBACK,
00040             WINDOW_FINISH,
00041             WINDOW_THROTTLE_FRAMERATE,
00042             WINDOW_SWAP_BARRIER,
00043             WINDOW_SWAP,
00044             PIPE_IDLE,
00045             FRAME_TRANSMIT,
00046             FRAME_COMPRESS,
00047             FRAME_RECEIVE,
00048             CONFIG_START_FRAME,
00049             CONFIG_FINISH_FRAME,
00050             CONFIG_WAIT_FINISH_FRAME,
00051             ALL          // must be last
00052         };
00053 
00054         Type     type;
00055         uint32_t frameNumber;
00056         uint32_t task;
00057         union
00058         {
00059             int64_t  startTime;
00060             int64_t  idleTime;
00061         };
00062         union
00063         {
00064             int64_t  endTime;
00065             int64_t  totalTime;
00066         };
00067         float ratio; // compression ratio
00068         char resourceName[32];
00069 
00070         static const std::string& getName( const Type type );
00071         static const Vector3f& getColor( const Type type );
00072     };
00073 
00074     EQ_EXPORT std::ostream& operator << ( std::ostream&, const Statistic& );
00075 }
00076 
00077 #endif // EQ_STATISTIC_H
00078 
Generated on Mon Aug 10 18:58:41 2009 for Equalizer 0.9 by  doxygen 1.5.8