# ProfilerCounterDescriptor

> Provides a descriptor for a Profiler counter.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Profiling.Editor](/engine/6000.3/script-reference/unity/profiling/editor.md)
* **Assembly:** UnityEditor

```csharp
public readonly struct ProfilerCounterDescriptor
```

## Remarks

Used to describe a [Profiler Counter](https://docs.unity3d.com/Packages/com.unity.profiling.core@latest/index.html?subfolder=/api/Unity.Profiling.ProfilerCounter-1.html) or [Profiler Counter Value](https://docs.unity3d.com/Packages/com.unity.profiling.core@latest/index.html?subfolder=/api/Unity.Profiling.ProfilerCounterValue-1.html), often within a [ProfilerModule](/engine/6000.3/script-reference/unity/profiling/editor/profilermodule.md) or [ProfilerModuleViewController](/engine/6000.3/script-reference/unity/profiling/editor/profilermoduleviewcontroller.md).

```csharp
using System;
using Unity.Profiling;
using Unity.Profiling.Editor;

[Serializable]
[ProfilerModuleMetadata("Garbage Collection")]
public class GarbageCollectionProfilerModule : ProfilerModule
{
    static readonly ProfilerCounterDescriptor[] k_ChartCounters = new ProfilerCounterDescriptor[]
    {
        new ProfilerCounterDescriptor("GC Reserved Memory", ProfilerCategory.Memory),
        new ProfilerCounterDescriptor("GC Used Memory", ProfilerCategory.Memory),
        new ProfilerCounterDescriptor("GC Allocated In Frame", ProfilerCategory.Memory),
    };

    public GarbageCollectionProfilerModule() : base(k_ChartCounters) {}
}
```

Additional Resources: [ProfilerModule](/engine/6000.3/script-reference/unity/profiling/editor/profilermodule.md), [ProfilerModuleViewController](/engine/6000.3/script-reference/unity/profiling/editor/profilermoduleviewcontroller.md).

## Constructors

| Constructor                                                                                                                                                                                                                | Description                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ProfilerCounterDescriptor(System.String,System.String)](/engine/6000.3/script-reference/unity/profiling/editor/profilercounterdescriptor/ctor.md#profilercounterdescriptor\(string-string\))                              | Initializes and returns an instance of [ProfilerCounterDescriptor](/engine/6000.3/script-reference/unity/profiling/editor/profilercounterdescriptor.md). |
| [ProfilerCounterDescriptor(System.String,Unity.Profiling.ProfilerCategory)](/engine/6000.3/script-reference/unity/profiling/editor/profilercounterdescriptor/ctor.md#profilercounterdescriptor\(string-profilercategory\)) | Initializes and returns an instance of [ProfilerCounterDescriptor](/engine/6000.3/script-reference/unity/profiling/editor/profilercounterdescriptor.md). |

## Properties

| Property                                                                                                         | Description                                          |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [CategoryName](/engine/6000.3/script-reference/unity/profiling/editor/profilercounterdescriptor/categoryname.md) | The category name of the described Profiler counter. |
| [Name](/engine/6000.3/script-reference/unity/profiling/editor/profilercounterdescriptor/name.md)                 | The name of the described Profiler counter.          |
