Nez.Analysis TimeRuler in C# (CSharp): 2 esempi trovati. Questi sono i migliori esempi reali in C# (CSharp) per Nez.Analysis.TimeRuler, estratti da progetti open source. Li puoi valutare, per aiutarci a migliorare la qualità dei nostri esempi.
Correlati
Related in langs
Realtime CPU measuring tool
You can visually find bottle neck, and know how much you can put more CPU jobs by using this tool. Because of this is real time profile, you can find glitches in the game too. TimeRuler provide the following features: * Up to 8 bars (Configurable) * Change colors for each markers * Marker logging. * It won't even generate BeginMark/EndMark method calls when you got rid of the DEBUG constant. * It supports up to 32 (Configurable) nested BeginMark method calls. * Multithreaded safe * Automatically changes display frames based on frame duration. How to use: call timerRuler.StartFrame in top of the Game.Update method. Then, surround the code that you want measure by BeginMark and EndMark. timeRuler.BeginMark( "Update", Color.Blue ); // process that you want to measure. timerRuler.EndMark( "Update" ); Also, you can specify bar index of marker (default value is 0) timeRuler.BeginMark( 1, "Update", Color.Blue ); All profiling methods has CondionalAttribute with "DEBUG". If you not specified "DEBUG" constant, it doesn't even generate method calls for BeginMark/EndMark. So, don't forget remove "DEBUG" constant when you release your game.