Add infos into target window
[ryzomcore.git] / ryzom / server / src / frontend_service / fe_stat.cpp
blob6115ca565b018bce5126bad536a3e6bf83547b14
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "stdpch.h"
21 #include "fe_stat.h"
23 // Fix the stupid Visual 6 Warning
24 void foo_fe_stat_cpp() {};
26 #ifdef MEASURE_FRONTEND_TABLES
28 #include <nel/misc/debug.h>
29 #include "game_share/tick_event_handler.h"
30 //#include <sstream>
32 using namespace std;
33 using namespace NLMISC;
37 * setGameTick
39 void TEventPerSeenEntityCounterFrame::setGameTick()
41 Tick = CTickEventHandler::getGameCycle();
46 * display
48 void TEventPerSeenEntityCounterFrame::display( bool withvalue )
50 //std::stringstream ss;
51 string str;
52 //ss << (int)Tick;
53 str += NLMISC::toString(Tick);
54 sint i;
55 for ( i=0; i!=250; ++i )
57 //ss << "\t" << SeenEntities[i];
58 str += "\t" + NLMISC::toString(SeenEntities[i]);
60 if( withvalue )
62 //ss << "\t" << Value;
63 str += "\t" + NLMISC::toString(Value);
65 InfoLog->displayRawNL( "%s", str.c_str() );
70 * displayAll (static)
72 void TEventPerSeenEntityCounterFrame::displayAll( const char *name, std::vector<TEventPerSeenEntityCounterFrame>& vect, bool withvalue )
74 InfoLog->displayRawNL( "%s:", name );
75 std::vector<TEventPerSeenEntityCounterFrame>::iterator icv;
76 for ( icv=vect.begin(); icv!=vect.end(); ++icv )
78 (*icv).display( withvalue );
80 vect.clear();
83 TEventPerSeenEntityCounterFrame PropRecvrCntFrame1, PropRecvrCntFrame2,
84 DistCntFrame,
85 DeltaCntFrame,
86 PrioCntFrame,
87 PosSentCntFrame;
89 std::vector<TEventPerSeenEntityCounterFrame> PropRecvrCntClt1,
90 DistCntClt1,
91 DeltaCntClt1,
92 PrioCntClt1,
93 PosSentCntClt1;
96 #endif