Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 15 years ago

Closed 15 years ago

#308 closed task (invalid)

Performance Evaluation

Reported by: rgrieder Owned by: nobody
Priority: minor Milestone: Version 0.3 Codename: Castor
Component: GeneralFramework Version: 0.2.0
Keywords: Cc:
Referenced By: References:

Description

Our game starts to get serious and with that come performance issues. Therefore we would like to be easily able to measure the time spent in different routines. Of course you can use profilers, but that might not be very easy.

My idea is a GlobalClock class (as Singleton) that gets created by RootGameState and replaces the Clock class. The new Clock class is scheduled for this ticket.
The GlobalClock can then be fed with little delta times that are accumulated over the time. For instance you want to know how much time is spent per tick in a function called fooBar(). You then call something like GlobalClock::getInstance().start("fooBar"); at the beginning and ClobalClock::getInstance().stop("foobBar"); at the end. The class then automatically sums up the time spent in this period.

In order to visualise those times I recommend overlays that display the percentage of every such measure point like "fooBar". We already measure the tick time, so that could be moved into GlobalClock as well. To measure the tick you could just use the name "tick" and further provide startFrame and endFrame to define which times belong to one frame.
For details how to implement average time measure over a certain period, check GSRoot class and move that code into GlobalClock.

Change History (2)

comment:1 Changed 15 years ago by bknecht

Good idea and also a reasonable suggestion with the clock. Monitor would be a good name, or do we use this for something else already?

comment:2 Changed 15 years ago by rgrieder

  • Resolution set to invalid
  • Status changed from new to closed

Changed my mind: Profiling can be done very easily with the right tools. And it can also get very accurate with the right method. There is a short report in the forum: https://forum.orxonox.net/viewtopic.php?t=339 Closing this ticket, since it really doesn't make sense to reinvent the wheel. Nevertheless we still need a more flexible Clock, but that's another ticket.

Note: See TracTickets for help on using tickets.