private bool onRuntimeProfileStart(BenchmarkRuntimeProfileEvents.RuntimeProfileStart startEvent) { profiling = true; pollRate = startEvent.PollRate; memProfiling = startEvent.PollMemory; frameCount = 0; Disney.Kelowna.Common.Performance performance = Service.Get <Disney.Kelowna.Common.Performance>(); performance.AutomaticMemorySampling = false; performance.ResetMetrics(); logger.Print("Runtime Profiling Starting. Profiling Memory = " + memProfiling); return(false); }
public void Run(BenchmarkRuntimeProfileEvents.RuntimeProfileStart profileStartEvent, Action <int> onFinishDelegate) { logger = new BenchmarkLogger("Stage:" + base.name); Service.Get <EventDispatcher>().DispatchEvent(profileStartEvent); this.onFinishDelegate = onFinishDelegate; try { setup(); performBenchmark(); } catch (Exception ex) { logger.Log("EXCEPTION: " + ex.Message); onFinish(1); } }