Struct perf.Instance
Performs time measurements and stores measurement data.
public struct perf.Instance : IDisposable
Remarks
Static functions of perf class use a single static variable of this type to perform measurements. Use a variable of this type instead when you want to have multiple independent measurements. See perf.local. Variables of this type usually are used as local (in single function), but also can be used anywhere (class fields, unmanaged memory). This type is a struct (value type), and not small (184 bytes). Don't use it as a function parameter without ref. To share a variable between functions use a field in your class. Don't need to dispose variables of this type. The perf.Instance.Dispose function just calls perf.Instance.NW.
Namespace: Au
Assembly: Au.dll
Properties
Name | Description |
---|---|
Incremental | See perf.incremental. |
TimeTotal | Gets the number of microseconds between perf.Instance.First and the last perf.Instance.Next. |
Methods
Name | Description |
---|---|
Dispose() | Calls perf.Instance.NW, which calls perf.Instance.Next and perf.Instance.Write. |
First() | |
NW(char) | Calls perf.Instance.Next and perf.Instance.Write. |
Next(char) | |
ToArray() | Return array of time values collected by calling perf.Instance.First and perf.Instance.Next. Each element is the number of microseconds of each code execution between calling First and each Next. |
ToString() | Formats a string from time values collected by calling perf.Instance.First and perf.Instance.Next. The string contains the number of microseconds of each code execution between calling First and each Next. |
Write() | Formats a string from time values collected by calling perf.Instance.First and perf.Instance.Next, and shows it in the output. The string contains the number of microseconds of each code execution between calling First and each Next. |