summaryrefslogtreecommitdiff
path: root/tests/src/GC/Performance/Framework/Metrics/CollectGCMetricsAttribute.cs
blob: 19b92f489b03e54fa1d6059b1d9ae4296c40a364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.Xunit.Performance.Sdk;
using System;

namespace GCPerfTestFramework.Metrics
{
    /// <summary>
    /// This attribute marks a xunit-performance test artifact as requiring GC metrics. When this attribute adorns
    /// a test artifact, xunit-performance creates an instance of <see cref="GCMetricDiscoverer"/> and uses
    /// it to populate the list of metrics provided for that artifact.
    /// </summary>
    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
#if WINDOWS
    [PerformanceMetricDiscoverer("GCPerfTestFramework.Metrics.GCMetricDiscoverer", "Framework")]
#endif
    public class CollectGCMetricsAttribute : 
        Attribute
#if WINDOWS
        , IPerformanceMetricAttribute
#endif
    {
    }
}