init(limitingToCurrentThread:)
Creates a CPU metric that optionally records data only for the current thread.
Declaration
init(limitingToCurrentThread limitToCurrentThread: Bool)Parameters
- limitToCurrentThread:
A Boolean value that specifies whether to limit the recording of data for this metric to the current thread only.
Discussion
If limitToCurrentThread is true, the returned metric only records data related to CPU use on the current thread. In a single-threaded context, a thread-limited metric provides lower variance and greater precision than a whole-process metric.