Better perf logging

This commit is contained in:
Paul Chote
2010-09-17 10:02:24 +12:00
parent b94c2fc7c4
commit a3246866fb
3 changed files with 12 additions and 7 deletions

View File

@@ -146,14 +146,13 @@ namespace OpenRA
if (DisableTick)
return;
actors.DoTimed( x => x.Tick(), "expensive actor tick: {0} ({1:0.000} ms)", 0.001 );
actors.Do( x => x.Tick() );
Queries.WithTraitMultiple<ITick>().DoTimed( x =>
{
x.Trait.Tick( x.Actor );
}, "expensive trait tick: {0} ({1:0.000} ms)", 0.001 );
}, "[{2}] Trait: {0} ({1:0.000} ms)", 0.001 );
effects.DoTimed( e => e.Tick( this ), "expensive effect tick: {0} ({1:0.000} ms)", 0.001 );
effects.DoTimed( e => e.Tick( this ), "[{2}] Effect: {0} ({1:0.000} ms)", 0.001 );
Game.viewport.Tick();
while (frameEndActions.Count != 0)
frameEndActions.Dequeue()(this);