1 // Copyright (c) 2017 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <Graphic3d_FrameStats.hxx>
16 #include <Graphic3d_CView.hxx>
18 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_FrameStats, Standard_Transient)
23 static std::ostream& formatCounter (std::ostream& theStream,
24 Standard_Integer theWidth,
25 const char* thePrefix,
26 Standard_Size theValue,
27 const char* thePostfix = NULL)
29 if (thePrefix != NULL)
31 theStream << thePrefix;
33 theStream << std::setfill(' ') << std::setw (theWidth);
34 if (theValue >= 1000000000)
36 Standard_Real aValM = Standard_Real(theValue) / 1000000000.0;
37 theStream << std::fixed << std::setprecision (1) << aValM << "G";
39 else if (theValue >= 1000000)
41 Standard_Real aValM = Standard_Real(theValue) / 1000000.0;
42 theStream << std::fixed << std::setprecision (1) << aValM << "M";
44 else if (theValue >= 1000)
46 Standard_Real aValK = Standard_Real(theValue) / 1000.0;
47 theStream << std::fixed << std::setprecision (1) << aValK << "k";
51 theStream << theValue;
53 if (thePostfix != NULL)
55 theStream << thePostfix;
60 //! Format memory counter.
61 static std::ostream& formatBytes (std::ostream& theStream,
62 Standard_Integer theWidth,
63 const char* thePrefix,
64 Standard_Size theValue,
65 const char* thePostfix = NULL)
67 if (thePrefix != NULL)
69 theStream << thePrefix;
71 theStream << std::setfill(' ') << std::setw (theWidth);
72 if (theValue >= 1024 * 1024 * 1024)
74 Standard_Real aValM = Standard_Real(theValue) / (1024.0 * 1024.0 * 1024.0);
75 theStream << std::fixed << std::setprecision (1) << aValM << " GiB";
77 else if (theValue >= 1024 * 1024)
79 Standard_Real aValM = Standard_Real(theValue) / (1024.0 * 1024.0);
80 theStream << std::fixed << std::setprecision (1) << aValM << " MiB";
82 else if (theValue >= 1024)
84 Standard_Real aValK = Standard_Real(theValue) / 1024.0;
85 theStream << std::fixed << std::setprecision (1) << aValK << " KiB";
89 theStream << theValue << " B";
91 if (thePostfix != NULL)
93 theStream << thePostfix;
98 static const Standard_Real THE_SECONDS_IN_HOUR = 3600.0;
99 static const Standard_Real THE_SECONDS_IN_MINUTE = 60.0;
100 static const Standard_Real THE_SECOND_IN_HOUR = 1.0 / THE_SECONDS_IN_HOUR;
101 static const Standard_Real THE_SECOND_IN_MINUTE = 1.0 / THE_SECONDS_IN_MINUTE;
104 static std::ostream& formatTime (std::ostream& theStream,
105 Standard_Integer theWidth,
106 const char* thePrefix,
107 Standard_Real theSeconds,
108 const char* thePostfix = NULL)
110 if (thePrefix != NULL)
112 theStream << thePrefix;
115 Standard_Real aSecIn = theSeconds;
116 unsigned int aHours = (unsigned int )(aSecIn * THE_SECOND_IN_HOUR);
117 aSecIn -= Standard_Real(aHours) * THE_SECONDS_IN_HOUR;
118 unsigned int aMinutes = (unsigned int )(aSecIn * THE_SECOND_IN_MINUTE);
119 aSecIn -= Standard_Real(aMinutes) * THE_SECONDS_IN_MINUTE;
120 unsigned int aSeconds = (unsigned int )aSecIn;
121 aSecIn -= Standard_Real(aSeconds);
122 Standard_Real aMilliSeconds = 1000.0 * aSecIn;
125 theStream << std::setfill(' ') << std::setw (theWidth);
128 Sprintf (aBuffer, "%02u:%02u:%02u", aHours, aMinutes, aSeconds);
129 theStream << aBuffer;
131 else if (aMinutes > 0)
133 Sprintf (aBuffer, "%02u:%02u", aMinutes, aSeconds);
134 theStream << aBuffer;
136 else if (aSeconds > 0)
138 Sprintf (aBuffer, "%2u s", aSeconds);
139 theStream << aBuffer;
143 theStream << std::fixed << std::setprecision (1) << aMilliSeconds << " ms";
146 if (thePostfix != NULL)
148 theStream << thePostfix;
153 //! Add key-value pair to the dictionary.
154 static void addInfo (TColStd_IndexedDataMapOfStringString& theDict,
155 const TCollection_AsciiString& theKey,
156 const char* theValue)
158 TCollection_AsciiString aValue (theValue != NULL ? theValue : "");
159 theDict.ChangeFromIndex (theDict.Add (theKey, aValue)) = aValue;
162 //! Add key-value pair to the dictionary.
163 static void addInfo (TColStd_IndexedDataMapOfStringString& theDict,
164 const TCollection_AsciiString& theKey,
165 const Standard_Real theValue)
168 Sprintf (aTmp, "%.1g", theValue);
169 addInfo (theDict, theKey, aTmp);
172 //! Add key-value pair to the dictionary.
173 static void addInfo (TColStd_IndexedDataMapOfStringString& theDict,
174 const TCollection_AsciiString& theKey,
175 const Standard_Size theValue)
178 Sprintf (aTmp, "%zu", theValue);
179 addInfo (theDict, theKey, aTmp);
183 static void addTimeInfo (TColStd_IndexedDataMapOfStringString& theDict,
184 const TCollection_AsciiString& theKey,
185 Standard_Real theSeconds)
187 Standard_Real aSecIn = theSeconds;
188 unsigned int aHours = (unsigned int )(aSecIn * THE_SECOND_IN_HOUR);
189 aSecIn -= Standard_Real(aHours) * THE_SECONDS_IN_HOUR;
190 unsigned int aMinutes = (unsigned int )(aSecIn * THE_SECOND_IN_MINUTE);
191 aSecIn -= Standard_Real(aMinutes) * THE_SECONDS_IN_MINUTE;
192 unsigned int aSeconds = (unsigned int )aSecIn;
193 aSecIn -= Standard_Real(aSeconds);
194 Standard_Real aMilliSeconds = 1000.0 * aSecIn;
199 Sprintf (aBuffer, "%02u:%02u:%02u", aHours, aMinutes, aSeconds);
201 else if (aMinutes > 0)
203 Sprintf (aBuffer, "%02u:%02u", aMinutes, aSeconds);
205 else if (aSeconds > 0)
207 Sprintf (aBuffer, "%2u", aSeconds);
211 addInfo (theDict, theKey, aMilliSeconds);
215 addInfo (theDict, theKey, aBuffer);
219 // =======================================================================
220 // function : Graphic3d_FrameStats
222 // =======================================================================
223 Graphic3d_FrameStats::Graphic3d_FrameStats()
224 : myFpsTimer (Standard_True),
225 myFrameStartTime (0.0),
226 myFrameDuration (0.0),
227 myUpdateInterval (1.0),
230 myLastFrameIndex (0),
231 myIsLongLineFormat (Standard_False)
236 // =======================================================================
237 // function : ~Graphic3d_FrameStats
239 // =======================================================================
240 Graphic3d_FrameStats::~Graphic3d_FrameStats()
245 // =======================================================================
246 // function : FormatStats
248 // =======================================================================
249 TCollection_AsciiString Graphic3d_FrameStats::FormatStats (Graphic3d_RenderingParams::PerfCounters theFlags) const
251 const Standard_Integer aValWidth = 5;
252 std::stringstream aBuf;
253 const Standard_Boolean isCompact = theFlags == Graphic3d_RenderingParams::PerfCounters_FrameRate; // only FPS is displayed
254 const Graphic3d_FrameStatsData& aStats = LastDataFrame();
255 if (myIsLongLineFormat
256 && (theFlags & Graphic3d_RenderingParams::PerfCounters_FrameRate) != 0
257 && (theFlags & Graphic3d_RenderingParams::PerfCounters_CPU) != 0)
259 aBuf << "FPS: " << std::setfill(' ') << std::setw (isCompact ? aValWidth : 9) << std::fixed << std::setprecision (1) << aStats.FrameRate()
260 << " [CPU: " << std::setfill(' ') << std::setw (isCompact ? aValWidth : 10) << std::fixed << std::setprecision (1) << aStats.FrameRateCpu() << "]\n";
264 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_FrameRate) != 0)
266 aBuf << "FPS: " << std::setfill(' ') << std::setw (isCompact ? aValWidth : aValWidth + 3) << std::fixed << std::setprecision (1) << aStats.FrameRate() << "\n";
268 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_CPU) != 0)
270 aBuf << "CPU FPS: " << std::setfill(' ') << std::setw (isCompact ? aValWidth : aValWidth + 3) << std::fixed << std::setprecision (1) << aStats.FrameRateCpu() << "\n";
273 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Layers) != 0)
275 if (myIsLongLineFormat)
277 formatCounter (aBuf, aValWidth, "Layers: ", aStats[Graphic3d_FrameStatsCounter_NbLayers]);
278 if (HasCulledLayers())
280 formatCounter (aBuf, aValWidth, " [rendered: ", aStats[Graphic3d_FrameStatsCounter_NbLayersNotCulled], "]");
286 formatCounter (aBuf, aValWidth + 3, "Layers: ", aStats[Graphic3d_FrameStatsCounter_NbLayers], "\n");
289 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Structures) != 0)
291 if (myIsLongLineFormat)
293 formatCounter (aBuf, aValWidth, "Structs: ", aStats[Graphic3d_FrameStatsCounter_NbStructs]);
294 if (HasCulledStructs())
296 formatCounter (aBuf, aValWidth, " [rendered: ", aStats[Graphic3d_FrameStatsCounter_NbStructsNotCulled], "]");
302 formatCounter (aBuf, aValWidth + 3, "Structs: ", aStats[Graphic3d_FrameStatsCounter_NbStructs], "\n");
305 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Groups) != 0
306 || (theFlags & Graphic3d_RenderingParams::PerfCounters_GroupArrays) != 0
307 || (theFlags & Graphic3d_RenderingParams::PerfCounters_Triangles) != 0
308 || (theFlags & Graphic3d_RenderingParams::PerfCounters_Points) != 0
309 || (!myIsLongLineFormat
310 && ((theFlags & Graphic3d_RenderingParams::PerfCounters_Structures) != 0
311 || (theFlags & Graphic3d_RenderingParams::PerfCounters_Layers) != 0)))
313 aBuf << "Rendered\n";
315 if (!myIsLongLineFormat
316 && (theFlags & Graphic3d_RenderingParams::PerfCounters_Layers) != 0)
318 formatCounter (aBuf, aValWidth, " Layers: ", aStats[Graphic3d_FrameStatsCounter_NbLayersNotCulled], "\n");
320 if (!myIsLongLineFormat
321 && (theFlags & Graphic3d_RenderingParams::PerfCounters_Structures) != 0)
323 formatCounter (aBuf, aValWidth, " Structs: ", aStats[Graphic3d_FrameStatsCounter_NbStructsNotCulled], "\n");
325 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Groups) != 0)
327 formatCounter (aBuf, aValWidth, " Groups: ", aStats[Graphic3d_FrameStatsCounter_NbGroupsNotCulled], "\n");
329 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_GroupArrays) != 0)
331 formatCounter (aBuf, aValWidth, " Arrays: ", aStats[Graphic3d_FrameStatsCounter_NbElemsNotCulled], "\n");
332 formatCounter (aBuf, aValWidth, " [fill]: ", aStats[Graphic3d_FrameStatsCounter_NbElemsFillNotCulled], "\n");
333 formatCounter (aBuf, aValWidth, " [line]: ", aStats[Graphic3d_FrameStatsCounter_NbElemsLineNotCulled], "\n");
334 formatCounter (aBuf, aValWidth, " [point]: ", aStats[Graphic3d_FrameStatsCounter_NbElemsPointNotCulled], "\n");
335 formatCounter (aBuf, aValWidth, " [text]: ", aStats[Graphic3d_FrameStatsCounter_NbElemsTextNotCulled], "\n");
337 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Triangles) != 0)
339 formatCounter (aBuf, aValWidth, " Triangles: ", aStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled], "\n");
341 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Points) != 0)
343 formatCounter (aBuf, aValWidth, " Points: ", aStats[Graphic3d_FrameStatsCounter_NbPointsNotCulled], "\n");
345 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_EstimMem) != 0)
347 aBuf << "GPU Memory\n";
348 formatBytes (aBuf, aValWidth, " Geometry: ", aStats[Graphic3d_FrameStatsCounter_EstimatedBytesGeom], "\n");
349 formatBytes (aBuf, aValWidth, " Textures: ", aStats[Graphic3d_FrameStatsCounter_EstimatedBytesTextures], "\n");
350 formatBytes (aBuf, aValWidth, " Frames: ", aStats[Graphic3d_FrameStatsCounter_EstimatedBytesFbos], "\n");
353 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_FrameTime) != 0)
355 aBuf << "Timers Average\n";
356 formatTime (aBuf, aValWidth, " Elapsed Frame: ", aStats[Graphic3d_FrameStatsTimer_ElapsedFrame], "\n");
357 formatTime (aBuf, aValWidth, " CPU Frame: ", aStats[Graphic3d_FrameStatsTimer_CpuFrame], "\n");
358 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuPicking] > 0.0)
360 formatTime (aBuf, aValWidth, " CPU Picking: ", aStats[Graphic3d_FrameStatsTimer_CpuPicking], "\n");
362 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuCulling] > 0.0)
364 formatTime (aBuf, aValWidth, " CPU Culling: ", aStats[Graphic3d_FrameStatsTimer_CpuCulling], "\n");
366 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuDynamics])
368 formatTime (aBuf, aValWidth, " CPU Dynamics: ", aStats[Graphic3d_FrameStatsTimer_CpuDynamics], "\n");
370 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_FrameTimeMax) != 0)
372 aBuf << "Timers Max\n";
373 formatTime (aBuf, aValWidth, " CPU Frame: ", myCountersMax[Graphic3d_FrameStatsTimer_CpuFrame], "\n");
374 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuPicking] > 0.0)
376 formatTime (aBuf, aValWidth, " CPU Picking: ", myCountersMax[Graphic3d_FrameStatsTimer_CpuPicking], "\n");
378 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuCulling] > 0.0)
380 formatTime (aBuf, aValWidth, " CPU Culling: ", myCountersMax[Graphic3d_FrameStatsTimer_CpuCulling], "\n");
382 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuDynamics])
384 formatTime (aBuf, aValWidth, " CPU Dynamics: ", myCountersMax[Graphic3d_FrameStatsTimer_CpuDynamics], "\n");
389 return TCollection_AsciiString (aBuf.str().c_str());
392 // =======================================================================
393 // function : FormatStats
395 // =======================================================================
396 void Graphic3d_FrameStats::FormatStats (TColStd_IndexedDataMapOfStringString& theDict,
397 Graphic3d_RenderingParams::PerfCounters theFlags) const
399 const Graphic3d_FrameStatsData& aStats = LastDataFrame();
400 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_FrameRate) != 0)
402 addInfo (theDict, "FPS", aStats.FrameRate());
404 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_CPU) != 0)
406 addInfo (theDict, "CPU FPS", aStats.FrameRateCpu());
408 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Layers) != 0)
410 addInfo (theDict, "Layers", aStats[Graphic3d_FrameStatsCounter_NbLayers]);
411 if (HasCulledLayers())
413 addInfo (theDict, "Rendered layers", aStats[Graphic3d_FrameStatsCounter_NbLayersNotCulled]);
416 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Structures) != 0)
418 addInfo (theDict, "Structs", aStats[Graphic3d_FrameStatsCounter_NbStructs]);
419 if (HasCulledStructs())
421 addInfo (theDict, "Rendered structs", aStats[Graphic3d_FrameStatsCounter_NbStructsNotCulled]);
424 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Groups) != 0)
426 addInfo (theDict, "Rendered groups", aStats[Graphic3d_FrameStatsCounter_NbGroupsNotCulled]);
428 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_GroupArrays) != 0)
430 addInfo (theDict, "Rendered arrays", aStats[Graphic3d_FrameStatsCounter_NbElemsNotCulled]);
431 addInfo (theDict, "Rendered [fill] arrays", aStats[Graphic3d_FrameStatsCounter_NbElemsFillNotCulled]);
432 addInfo (theDict, "Rendered [line] arrays", aStats[Graphic3d_FrameStatsCounter_NbElemsLineNotCulled]);
433 addInfo (theDict, "Rendered [point] arrays", aStats[Graphic3d_FrameStatsCounter_NbElemsPointNotCulled]);
434 addInfo (theDict, "Rendered [text] arrays", aStats[Graphic3d_FrameStatsCounter_NbElemsTextNotCulled]);
436 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Triangles) != 0)
438 addInfo (theDict, "Rendered triangles", aStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled]);
440 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Points) != 0)
442 addInfo (theDict, "Rendered points", aStats[Graphic3d_FrameStatsCounter_NbPointsNotCulled]);
444 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_EstimMem) != 0)
446 addInfo (theDict, "GPU Memory [geometry]", aStats[Graphic3d_FrameStatsCounter_EstimatedBytesGeom]);
447 addInfo (theDict, "GPU Memory [textures]", aStats[Graphic3d_FrameStatsCounter_EstimatedBytesTextures]);
448 addInfo (theDict, "GPU Memory [frames]", aStats[Graphic3d_FrameStatsCounter_EstimatedBytesFbos]);
451 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_FrameTime) != 0)
453 addTimeInfo (theDict, "Elapsed Frame (average)", aStats[Graphic3d_FrameStatsTimer_ElapsedFrame]);
454 addTimeInfo (theDict, "CPU Frame (average)", aStats[Graphic3d_FrameStatsTimer_CpuFrame]);
455 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuPicking] > 0.0)
457 addTimeInfo (theDict, "CPU Picking (average)", aStats[Graphic3d_FrameStatsTimer_CpuPicking]);
459 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuCulling] > 0.0)
461 addTimeInfo (theDict, "CPU Culling (average)", aStats[Graphic3d_FrameStatsTimer_CpuCulling]);
463 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuDynamics])
465 addTimeInfo (theDict, "CPU Dynamics (average)", aStats[Graphic3d_FrameStatsTimer_CpuDynamics]);
467 if ((theFlags & Graphic3d_RenderingParams::PerfCounters_FrameTimeMax) != 0)
469 addTimeInfo (theDict, "CPU Frame (max)", myCountersMax[Graphic3d_FrameStatsTimer_CpuFrame]);
470 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuPicking] > 0.0)
472 addTimeInfo (theDict, "CPU Picking (max)", myCountersMax[Graphic3d_FrameStatsTimer_CpuPicking]);
474 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuCulling] > 0.0)
476 addTimeInfo (theDict, "CPU Culling (max)", myCountersMax[Graphic3d_FrameStatsTimer_CpuCulling]);
478 if (myCountersMax[Graphic3d_FrameStatsTimer_CpuDynamics])
480 addTimeInfo (theDict, "CPU Dynamics (max)", myCountersMax[Graphic3d_FrameStatsTimer_CpuDynamics]);
486 // =======================================================================
487 // function : FrameStart
489 // =======================================================================
490 void Graphic3d_FrameStats::FrameStart (const Handle(Graphic3d_CView)& theView,
491 bool theIsImmediateOnly)
493 const Graphic3d_RenderingParams::PerfCounters aBits = !theView.IsNull()
494 ? theView->RenderingParams().CollectedStats
495 : Graphic3d_RenderingParams::PerfCounters_NONE;
496 if (theIsImmediateOnly
497 && (aBits & Graphic3d_RenderingParams::PerfCounters_SkipImmediate) != 0)
502 const Standard_Integer aNbFrames = Max (!theView.IsNull()
503 ? theView->RenderingParams().StatsNbFrames
505 if (myCounters.Size() != aNbFrames)
507 myCounters.Resize (0, aNbFrames - 1, false);
508 myCounters.Init (Graphic3d_FrameStatsData());
509 myLastFrameIndex = myCounters.Upper();
512 // reset values at the end of frame (after data has been flushed),
513 // so that application can put some counters (like picking time) before FrameStart().
514 //myCountersTmp.Reset();
516 myFrameStartTime = myFpsTimer.ElapsedTime();
517 if (!myFpsTimer.IsStarted())
525 // =======================================================================
526 // function : FrameEnd
528 // =======================================================================
529 void Graphic3d_FrameStats::FrameEnd (const Handle(Graphic3d_CView)& theView,
530 bool theIsImmediateOnly)
532 const Graphic3d_RenderingParams::PerfCounters aBits = !theView.IsNull()
533 ? theView->RenderingParams().CollectedStats
534 : Graphic3d_RenderingParams::PerfCounters_NONE;
535 if (theIsImmediateOnly
536 && (aBits & Graphic3d_RenderingParams::PerfCounters_SkipImmediate) != 0)
541 const double aTime = myFpsTimer.ElapsedTime();
542 myFrameDuration = aTime - myFrameStartTime;
544 if (!theView.IsNull())
546 myUpdateInterval = theView->RenderingParams().StatsUpdateInterval;
549 if (aTime < myUpdateInterval)
551 myCountersTmp.FlushTimers (myFpsFrameCount, false);
555 if (aTime > gp::Resolution())
559 const double aCpuSec = myFpsTimer.UserTimeCPU();
561 myCountersTmp[Graphic3d_FrameStatsTimer_ElapsedFrame] = aTime;
562 myCountersTmp[Graphic3d_FrameStatsTimer_CpuFrame] = aCpuSec;
563 myCountersTmp.ChangeFrameRate() = double(myFpsFrameCount) / aTime;
564 myCountersTmp.ChangeFrameRateCpu() = aCpuSec > gp::Resolution()
565 ? double(myFpsFrameCount) / aCpuSec
567 myCountersTmp.FlushTimers (myFpsFrameCount, true);
568 myCountersMax.FillMax (myCountersTmp);
574 // update structure counters
575 if (theView.IsNull())
577 myCounters.SetValue (myLastFrameIndex, myCountersTmp);
578 myCountersTmp.Reset();
582 updateStatistics (theView, theIsImmediateOnly);
584 if (++myLastFrameIndex > myCounters.Upper())
586 myLastFrameIndex = myCounters.Lower();
588 myCounters.SetValue (myLastFrameIndex, myCountersTmp);
589 myCountersTmp.Reset();