Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

ModelInferenceProfiler 类

Provides performance profiling capabilities for model inference tasks. 为模型推理任务提供性能分析功能。

Definition

命名空间: DeploySharp.Common
程序集: DeploySharp (在 DeploySharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public class ModelInferenceProfiler
Inheritance
Object    ModelInferenceProfiler

备注

This class maintains a rolling window of inference time records and provides methods to analyze the performance characteristics over time. 此类维护一个滚动窗口的推理时间记录,并提供分析随时间变化的性能特征的方法。

构造函数

ModelInferenceProfiler Initializes a new instance of ModelInferenceProfiler. 初始化ModelInferenceProfiler类的新实例。

方法

EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(继承自 Object。)
GetAverageFPS Gets average frames per second (FPS), skipping the first record if multiple exist. 获取平均每秒帧数(FPS),如果有多次记录则跳过第一次。
GetAverageInferenceTime Gets average inference time, skipping the first record if multiple exist. 获取平均推理时间,如果有多次记录则跳过第一次。
GetAveragePostprocessTime Gets average postprocessing time, skipping the first record if multiple exist. 获取平均后处理时间,如果有多次记录则跳过第一次。
GetAveragePreprocessTime Gets average preprocessing time, skipping the first record if multiple exist. 获取平均预处理时间,如果有多次记录则跳过第一次。
GetAverageTotalTime Gets average total processing time, skipping the first record if multiple exist. 获取平均总处理时间,如果有多次记录则跳过第一次。
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
MemberwiseCloneCreates a shallow copy of the current Object.
(继承自 Object。)
PrintAllRecords Prints and returns detailed timing information for all records. 打印并返回所有记录的详细时间信息。
PrintStatistics Prints and returns statistical summary of recorded timings. 打印并返回记录时间的统计摘要。
Record(ModelInferenceTimeRecord) Records timing information using an existing ModelInferenceTimeRecord. 使用现有的ModelInferenceTimeRecord记录时间信息。
Record(Single, Single, Single) Records timing information for an inference operation. 记录一次推理操作的时间信息。
ToStringReturns a string that represents the current object.
(继承自 Object。)

字段

参见