id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,i_links,o_links 308,Performance Evaluation,rgrieder,nobody,"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. [[br]] [[br]] 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 [#306 ticket].[[br]] 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. [[br]] [[br]] 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. [[br]] For details how to implement average time measure over a certain period, check GSRoot class and move that code into GlobalClock.",task,closed,minor,Version 0.3 Codename: Castor,GeneralFramework,0.2.0,invalid,,,,