XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.XUnit

【DLL】提供方便快捷的测试,无需编写Main方法,可直接添加特性在类或方法上进行测试

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFEExtension.NetCore.XUnit.Attributes;

/// <summary>
/// 将方法标记为由 XFE 基准引擎测量的性能基准。
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public sealed class BenchmarkAttribute : Attribute
{
    /// <summary>
    /// 获取或设置基准在控制台和报告中的自定义显示名称。
    /// </summary>
    public string? Name { get; set; }

    /// <summary>
    /// 获取或设置该方法是否为相同类型、参数组合和作业中的比率基线。
    /// </summary>
    public bool Baseline { get; set; }

    /// <summary>
    /// 获取或设置基准采用的测量策略。
    /// </summary>
    public BenchmarkStrategy Strategy { get; set; } = BenchmarkStrategy.Throughput;
}