---
title: "init(rawValue:)"
framework: metal
role: symbol
role_heading: Initializer
path: "metal/mtlcommoncounter/init(rawvalue:)"
---

# init(rawValue:)

Creates a common counter name from a raw value.

## Declaration

```swift
init(rawValue: String)
```

## Parameters

- `rawValue`: The name of a common counter as a string.

## Discussion

Discussion Use of the MTLCommonCounter type’s static properties, such as timestamp, computeKernelInvocations, or totalCycles instead of creating a common counter instance yourself with this initializer.
