Exemple #1
0
        /// <inheritdoc />
        public override void Update()
        {
            var stats = ProfilingTools.Stats;

            _mainChart.AddSample(stats.UpdateTimeMs);

            // Gather CPU events
            var data = ProfilingTools.GetEventsCPU();

            _events.Add(data);

            // Update timeline if using the last frame
            if (_mainChart.SelectedSampleIndex == -1)
            {
                var viewRange = GetEventsViewRange();
                UpdateTimeline(ref viewRange);
                UpdateTable(ref viewRange);
            }
        }
Exemple #2
0
        /// <inheritdoc />
        public override void Update()
        {
            // Gather GPU events
            var data = ProfilingTools.GetEventsGPU();

            _events.Add(data);

            // Peek draw time
            float drawTime = ProfilingTools.Stats.DrawTimeMs;

            if (data != null && data.Length > 0)
            {
                drawTime = data[0].Time;
            }
            _mainChart.AddSample(drawTime);

            // Update timeline if using the last frame
            if (_mainChart.SelectedSampleIndex == -1)
            {
                UpdateTimeline();
                UpdateTable();
            }
        }
Exemple #3
0
 /// <summary>
 /// Gets the collected GPU events by the profiler from local or remote session.
 /// </summary>
 /// <returns>Buffer with rendering events.</returns>
 public           EventGPU[] GetEventsGPU()
 {
     return(_gpuEvents ?? (_gpuEvents = ProfilingTools.GetEventsGPU()));
 }
Exemple #4
0
 /// <summary>
 /// Gets the collected CPU events by the profiler from local or remote session.
 /// </summary>
 /// <returns>Buffer with events per thread.</returns>
 public           ThreadStats[] GetEventsCPU()
 {
     return(_cpuEvents ?? (_cpuEvents = ProfilingTools.GetEventsCPU()));
 }