| ProfilerSetFormat Method |
Namespace: DigitalRune.DiagnosticsAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax public static void SetFormat(
string name,
double scale,
string description
)
Public Shared Sub SetFormat (
name As String,
scale As Double,
description As String
)
public:
static void SetFormat(
String^ name,
double scale,
String^ description
)
static member SetFormat :
name : string *
scale : float *
description : string -> unit
Parameters
- name
- Type: SystemString
The name of the ProfilerData. - scale
- Type: SystemDouble
The scale. - description
- Type: SystemString
The description.
Remarks
This method allows to specify additional data that is used in the DumpAll and
Dump methods.
All ProfilerData instances with the same name use the same formatting data
(across threads). The data values are multiplied with the scale and the
description is added to the dump output.
Examples
Here, the profiler data of the method "Foo" is scaled, so that the values are in µs. A
description is set so that the user knows the unit of the displayed values.
Profiler.SetFormat("Foo", 1e6f, "[µs]");
See Also