Click or drag to resize
Ab4d.SharpEngine logo

RenderingStatistics Class

RenderingStatistics collects various rendering statistics for one rendered frame.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreRenderingStatistics

Namespace: Ab4d.SharpEngine.Core
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public class RenderingStatistics

The RenderingStatistics type exposes the following members.

Constructors
 NameDescription
Public methodRenderingStatistics Constructor
Top
Properties
 NameDescription
Public propertyCommandBuffersRecordedCount Gets the number of times Vulkan primary rendering command buffers were recorded (when only data in the buffers are changed, then a new frame can be rendered without recording a new rendering command buffer).
Public propertyCommandBuffersRecordingTimeMs Gets number of milliseconds that were needed to record all the commands for this frame (calling Draw methods and any needed state change methods).
Public propertyCompleteRenderTimeMs Gets number of milliseconds that were needed to complete the rendering.
Public propertyDescriptorSetChangesCount Gets number of times DescriptorSet were changed in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyDrawCallsCount Gets number of draw calls in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyDrawnIndicesCount Gets number of drawn triangle indices in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyDrawnVerticesCount Gets number of drawn positions in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyElapsedTimeInMs When called during frame rendering (between StartNewFrame and EndFrame calls) the elapsed time in milliseconds from the StartNewFrame call is returned. When called after EndFrame method is called, the TotalRenderTimeMs is returned.
Public propertyFrameCopyTimeMs Gets the time in milliseconds that was spent copying the frame. This can be the time that is spent for copying a shared texture to the texture that is shown by the UI framework. This time is reported by calling ReportFrameCopyTime(Double) method.
Public propertyFrameNumber Gets the frame number for this RenderingStatistics.
Public propertyIndexBuffersChangesCount Gets number of times index buffer was changed in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyOther Gets a Dictionary with string as key and object as value that can be used to store custom rendering statistics. This dictionary is cleared on each start of frame.
Public propertyPipelineChangesCount Gets number of times pipeline was changed in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyPrepareRenderTimeMs Gets number of milliseconds that were needed to prepare the frame to be rendered (clear the buffers, initialize render targets and states, sort rendering layers by material or camera distance and waiting until the previous frame is rendered).
Public propertyPushConstantsChangesCount Gets number of times PushConstants were changed in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyRenderingLayersRecreateCount Gets the number of times RenderingLayers were recreated.
Public propertyStagingUsageTimeMs Gets the time in milliseconds that was spent to process the rendered image that was sent to the user in a staging image or staging buffer.
Public propertyTotalRenderTimeMs Gets number of milliseconds that were needed for this frame to render.
Public propertyUpdatedBuffersCount Gets number of times GPU buffers were updated in this frame. This value can be incremented by calling ReportUpdatedBuffers(Int32, Int64) method.
Public propertyUpdatedBuffersSize Gets size in bytes of all changed GPU buffers that were updated in this frame. This value can be incremented by calling ReportUpdatedBuffers(Int32, Int64) method.
Public propertyUpdateTimeMs Gets number of milliseconds that were needed to update all SceneNodes.
Public propertyVertexBuffersChangesCount Gets number of times vertex buffer was changed in this frame. This value can be incremented by calling ReportOneDrawCall(Int32, Int32, Int32, Int32, Int32, Int32) or ReportDrawCalls(Int32, Int32, Int32, Int32, Int32, Int32, Int32) methods.
Public propertyWaitUntilRenderedTimeMs Gets the waiting time in milliseconds that was spent while waiting for the graphics card to finish rendering.
Top
Methods
 NameDescription
Public methodClone Returns a new RenderingStatistics with the same values as this RenderingStatistics.
Public methodCopy Copies the values from this RenderingStatistics to targetRenderingStatistics.
Public methodEndFrame EndFrame stops the timer.
Public methodReportCommandBuffersRecorded Increases the CommandBuffersRecordedCount. This method is thread safe and can be called from any thread.
Public methodReportDrawCalls Increases the DrawCallsCount by one, DrawnIndicesCount by drawnIndicesCount, DrawnVerticesCount by drawnVerticesCount, VertexBuffersChangesCount by vertexBuffersChangesCount, IndexBuffersChangesCount by indexBuffersChangesCount and DescriptorSetChangesCount by descriptorSetChangesCount. This method is thread safe and can be called from any thread.
Public methodReportFrameCopyTime ReportFrameCopyTime method can be called to report time that is needed to copy the frame by the user.
Public methodReportOneDrawCall Increases the DrawCallsCount by one, DrawnIndicesCount by drawnIndicesCount, DrawnVerticesCount by drawnVerticesCount, VertexBuffersChangesCount by vertexBuffersChangesCount, IndexBuffersChangesCount by indexBuffersChangesCount and DescriptorSetChangesCount by descriptorSetChangesCount. This method is thread safe and can be called from any thread.
Public methodReportPipelineChanges Increases the PipelineChangesCount by the pipelineChangesCount (1 by default). This method is thread safe and can be called from any thread.
Public methodReportUpdatedBuffers Increases the UpdatedBuffersCount by the updatedBuffersCount (1 by default). This method is thread safe and can be called from any thread.
Public methodResetTimerValues Sets all timer values to 0
Public methodStartNewFrame StartNewFrame resets all the values in RenderingStatistics and start timer for new frame.
Top
See Also