Exemplo n.º 1
0
        static Profiler()
        {
            m_Context       = new List <ContextAndTick>();
            m_ThisFrameData = new List <ProfileData>();
            m_AllFrameData  = new List <ProfileData>();

            m_Timer = new HighPerformanceTimer();
            m_Timer.Start();
        }
Exemplo n.º 2
0
        static Profiler()
        {
            m_Context = new List<ContextAndTick>();
            m_ThisFrameData = new List<ProfileData>();
            m_AllFrameData = new List<ProfileData>();

            m_Timer = new HighPerformanceTimer();
            m_Timer.Start();
        }
Exemplo n.º 3
0
 static Profiler()
 {
     m_Context = new List<ContextAndTick>();
     m_ThisFrameData = new List<Tuple<string[], double>>();
     m_AllFrameData = new List<ProfileData>();
     m_TotalTimeData = new ProfileData(null, 0d);
     m_Timer = new HighPerformanceTimer();
     m_Timer.Start();
 }
Exemplo n.º 4
0
 static Profiler()
 {
     m_Context       = new List <ContextAndTick>();
     m_ThisFrameData = new List <Tuple <string[], double> >();
     m_AllFrameData  = new List <ProfileData>();
     m_TotalTimeData = new ProfileData(null, 0d);
     m_Timer         = new HighPerformanceTimer();
     m_Timer.Start();
 }
Exemplo n.º 5
0
        public static void ExitContext(string context_name)
        {
            if (m_Context[m_Context.Count - 1].Name != context_name)
            {
                Tracer.Error("Profiler.ExitProfiledContext: context_name does not match current context.");
            }
            string[] context = new string[m_Context.Count];
            for (int i = 0; i < m_Context.Count; i++)
            {
                context[i] = m_Context[i].Name;
            }

            m_ThisFrameData.Add(new ProfileData(context, HighPerformanceTimer.SecondsFromTicks(m_Timer.ElapsedTicks - m_Context[m_Context.Count - 1].Tick)));
            m_Context.RemoveAt(m_Context.Count - 1);
        }
Exemplo n.º 6
0
 public static void EndFrame()
 {
     LastFrameTimeMS = HighPerformanceTimer.SecondsFromTicks(m_Timer.ElapsedTicks - m_BeginFrameTicks) * 1000d;
     TotalTimeMS    += LastFrameTimeMS;
 }
Exemplo n.º 7
0
 public static void EndFrame()
 {
     LastFrameTimeMS = HighPerformanceTimer.SecondsFromTicks(m_Timer.ElapsedTicks - m_BeginFrameTicks) * 1000d;
     m_TotalTimeData.AddNewHitLength(LastFrameTimeMS);
 }