Radium Engine  1.5.0
FrameTimerData.cpp
1 #include <Gui/TimerData/FrameTimerData.hpp>
2 
3 namespace Ra {
4 void FrameTimerData::print( std::ostream& ostream ) const {
5 
6  long totalTime = Ra::Core::Utils::getIntervalMicro( frameStart, frameEnd );
7 
8  ostream << "frame " << numFrame << ": " << totalTime << "\n";
9  ostream << "{"
10  << "\n";
11  {
12  long taStart = Ra::Core::Utils::getIntervalMicro( frameStart, tasksStart );
13  long taEnd = Ra::Core::Utils::getIntervalMicro( frameStart, tasksEnd );
14 
15  long reStart = Ra::Core::Utils::getIntervalMicro( frameStart, renderData.renderStart );
16  long reEnd = Ra::Core::Utils::getIntervalMicro( frameStart, renderData.renderEnd );
17  ostream << "\ttasks: " << taStart << " " << taEnd << " " << taEnd - taStart << "\n";
18  ostream << "\t{"
19  << "\n";
20  for ( const auto& tData : taskData ) {
21  long tadaStart = Ra::Core::Utils::getIntervalMicro( frameStart, tData.start );
22  long tadaEnd = Ra::Core::Utils::getIntervalMicro( frameStart, tData.end );
23  ostream << "\t\t" << tData.taskName << "(" << tData.threadId << "): " << tadaStart
24  << " " << tadaEnd << " " << tadaEnd - tadaStart << "\n";
25  }
26  ostream << "\t}"
27  << "\n";
28  ostream << "\trender: " << reStart << " " << reEnd << " " << reEnd - reStart << "\n";
29  }
30  ostream << "}"
31  << "\n";
32  ostream << std::endl;
33 }
34 } // namespace Ra
Definition: Cage.cpp:3