1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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/>.
20 #include "nel/misc/types_nl.h"
22 #include <nel/misc/rgba.h>
23 #include <nel/misc/time_nl.h>
31 * Graph class for network statistics
32 * \author Vianney Lecroart, Olivier Cado
33 * \author Nevrax France
40 float X
, Y
, Width
, Height
;
41 NLMISC::CRGBA BackColor
;
47 std::deque
<float> Values
;
49 NLMISC::TTime Quantum
;
51 NLMISC::TTime CurrentQuantumStart
;
61 /// Constructor (CGraph::init() must have been called before)
62 CGraph (std::string name
,
63 float x
, float y
, float width
, float height
,
64 NLMISC::CRGBA backColor
,
65 NLMISC::TTime quantum
,
67 bool lineMode
= false)
68 : Name(name
), X(x
), Y(y
), Width(width
), Height(height
), BackColor(backColor
), Quantum(quantum
),
69 MaxValue(maxValue
), Peak(0.0f
), LineMode(lineMode
), PrevY(y
)
71 CurrentQuantumStart
= (uint64
) (1000 * NLMISC::CTime::ticksToSecond(NLMISC::CTime::getPerformanceTime()));
75 void addOneValue (float value
= 0.0f
);
78 void addValue (float value
);
80 static bool DisplayAverageValue
;