Ejemplo n.º 1
0
        private void OnEnable()
        {
            PlayerConnection.instance.Register(UnityProfilerLiteKun.kMsgSendEditorToPlayer, OnMessageEvent);
#if UNITY_2020_2_OR_NEWER
            mSystemMemoryRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "System Used Memory");
            mGcMemoryRecorder     = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "GC Reserved Memory");

            mAudioClipCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "AudioClip Count");

            mDynamicBathcedDrawCallsCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Dynamic Batched Draw Calls Count");
            mDynamicBatchesCountRecorder          = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Dynamic Batches Count");

            mStaticBatchedDrawCallsCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Static Batched Draw Calls Count");
            mStaticBatchesCountRecorder          = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Static Batches Count");

            mInstancedBatchedDrawCallsCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Instanced Batched Draw Calls Count");
            mInstancedBatchesCountRecorder          = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Instanced Batches Count");

            mDrawCallsCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Draw Calls Count");
            mBatchesCountRecorder   = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Batches Count");

            mTrianglesCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Triangles Count");
            mVerticesCountRecorder  = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Vertices Count");

            mSetPassCallsCountRecorder         = ProfilerRecorder.StartNew(ProfilerCategory.Render, "SetPass Calls Count");
            mShadowCastersCountRecorder        = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Shadow Casters Count");
            mVisibleSkinnedMeshesCountRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Visible Skinned Meshes Count");
#endif
        }
Ejemplo n.º 2
0
 void OnEnable()
 {
     meshMemoryRecorder     = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Mesh Memory");
     textureMemoryRecorder  = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Texture Memory");
     mainThreadTimeRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "Main Thread", 30);
     VerticesRecorder       = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Vertices Count");
 }
Ejemplo n.º 3
0
        private void OnEnable()
        {
            timer = Time.unscaledTime;

            mainThreadRecorder       = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "Main Thread", 15);
            totalMemoryUsedRecorder  = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Total Used Memory");
            gcReservedMemoryRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "GC Reserved Memory");
            totalDrawCallsRecorder   = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Draw Calls Count");
        }
Ejemplo n.º 4
0
 void OnEnable()
 {
     systemMemoryRecorder   = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "System Used Memory");
     gcMemoryRecorder       = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "GC Reserved Memory");
     vidMemoryRecorder      = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Video Used Memory");
     mainThreadTimeRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "Main Thread", 15);
     drawCallsRecorder      = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Draw Calls Count");
     updateTimer1Recorder   = ProfilerRecorder.StartNew(m_profileTimer1);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Starts the profiler.
 /// </summary>
 public static void Begin()
 {
     managedReserved = ProfilerRecorder.StartNew(ProfilerCategory.Memory,
                                                 "GC Reserved Memory");
     managedUsed = ProfilerRecorder.StartNew(ProfilerCategory.Memory,
                                             "GC Used Memory");
     totalUsed = ProfilerRecorder.StartNew(ProfilerCategory.Memory,
                                           "Total Used Memory");
     systemUsed = ProfilerRecorder.StartNew(ProfilerCategory.Memory,
                                            "System Used Memory");
     lastManagedUsed = 0L;
     gcCount         = 0;
 }
Ejemplo n.º 6
0
 private void OnEnable()
 {
     systemMemoryRec = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "System Used Memory");
     MainThreadRec   = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "Main Thread", 15);
     GPUThreadRec    = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "GPU ms");
 }
Ejemplo n.º 7
0
 void OnEnable()
 {
     totalMemoryRecorder         = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Total Used Memory");
     totalReservedMemoryRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Total Reserved Memory");
     mainThreadTimeRecorder      = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "Main Thread", 30);
 }
Ejemplo n.º 8
0
 void OnEnable()
 {
     _systemMemoryRecorder   = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "System Used Memory");
     _gcMemoryRecorder       = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "GC Reserved Memory");
     _mainThreadTimeRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Internal, "Main Thread", 15);
 }
 public MemoryProfiler()
 {
     TotalMemoryRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "Total Used Memory", 1, ProfilerRecorderOptions.Default | ProfilerRecorderOptions.StartImmediately);
     GCMemoryRecorder    = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "GC Used Memory", 1, ProfilerRecorderOptions.Default | ProfilerRecorderOptions.StartImmediately);
     GCAllocRecorder     = ProfilerRecorder.StartNew(ProfilerCategory.Memory, "GC Allocated In Frame", 1, ProfilerRecorderOptions.Default | ProfilerRecorderOptions.StartImmediately);
 }