Example #1
0
        public static void UpdatePostFrame(bool willContinue)
        {
#if ENABLE_PROFILER
            ProfilerStats.CalculateStatsSnapshot();
#endif

#if ENABLE_PROFILER
            mainMarker.End();
            rootMarker.End();
#endif

#if ENABLE_PLAYERCONNECTION
            Connection.TransmitAndReceive();
#endif

#if ENABLE_PROFILER
            if (willContinue)
            {
                ProfilerProtocolSession.SendNewFrame();
                rootMarker.Begin();
                mainMarker.Begin();
            }
#endif

            TempMemoryScope.ExitScope();
        }
Example #2
0
        public static void UpdatePreFrame()
        {
            TempMemoryScope.EnterScope();

            if (firstFrame)
            {
#if ENABLE_PROFILER
                ProfilerProtocolSession.SendNewFrame();
                rootMarker.Begin();
                mainMarker.Begin();
#endif
                firstFrame = false;
            }
        }
        public unsafe void TestNewFrameInThreadStreamNotSessionStream()
        {
            Assert.Zero(ProfilerProtocolSession.streamSession.buffer->m_BufferList->TotalBytes);

            ProfilerTestFixture.ReceiveConnectMessage();

            int sessionBytes = ProfilerProtocolSession.streamSession.buffer->m_BufferList->TotalBytes;

            Assert.NotZero(sessionBytes);
            Assert.Zero(ProfilerProtocolThread.Stream.buffer->m_BufferList->TotalBytes);

            ProfilerProtocolSession.SendNewFrame();

            Assert.NotZero(ProfilerProtocolThread.Stream.buffer->m_BufferList->TotalBytes);
            Assert.AreEqual(ProfilerProtocolSession.streamSession.buffer->m_BufferList->TotalBytes, sessionBytes);
        }