public void CompareProfilerToSameResult()
        {
            var profiler = new SystemProfiler();

            profiler.Log(ProfilingMode.Fps, systemInformation);
            SystemProfilerSection results = profiler.GetProfilingResults(ProfilingMode.Fps);

            Assert.AreEqual(0, results.CompareTo(results));
        }
        public void LogInfo()
        {
            var profiler = new SystemProfiler();

            profiler.Log(ProfilingMode.Fps, systemInformation);
            SystemProfilerSection results = profiler.GetProfilingResults(ProfilingMode.Fps);

            Assert.IsTrue(results.TotalValue > 0.0f);
            Assert.AreEqual(1, results.Calls);
        }
        public void ResetProfilingResult()
        {
            var profiler = new SystemProfiler();

            profiler.Log(ProfilingMode.Fps, systemInformation);
            SystemProfilerSection results = profiler.GetProfilingResults(ProfilingMode.Fps);

            results.Reset();
            Assert.AreEqual(0, results.Calls);
            Assert.AreEqual(0, results.TotalValue);
        }
        public void CompareProfilerToOtherResult()
        {
            var profiler1 = new SystemProfiler();

            profiler1.Log(ProfilingMode.Fps, systemInformation);
            SystemProfilerSection results1 = profiler1.GetProfilingResults(ProfilingMode.Fps);
            var profiler2 = new SystemProfiler();

            profiler2.Log(ProfilingMode.Engine, systemInformation);
            SystemProfilerSection results2 = profiler2.GetProfilingResults(ProfilingMode.Fps);

            Assert.AreNotEqual(0, results1.CompareTo(results2));
        }
Пример #5
0
		private void CreateSections()
		{
			Sections = new SystemProfilerSection[CategoryCount];
			for (int i = 0; i < CategoryCount; i++)
				Sections[i] = new SystemProfilerSection(IndexToProfilingMode(i).ToString());
		}