Class MeasureTime
Provides a diagnostic utility for measuring performance.
Inheritance
System.Object
MeasureTime
Implements
System.IDisposable
Namespace: Syncfusion.Windows.Diagnostics
Assembly: Syncfusion.GridCommon.WPF.dll
Syntax
public class MeasureTime : Object, IDisposable
Examples
The following example display a message box with performance info.
private void button1_Click(object sender, System.EventArgs e)
{
using (Syncfusion.Windows.Diagnostics.MeasureTime.Measure("gridControl1.TopRowIndex = 500000"))
{
this.gridControl1.TopRowIndex = 5000000;
}
MessageBox.Show(Syncfusion.Windows.Diagnostics.MeasureTime.DumpTimes());
}
Properties
TickCount
Returns the time since Reset in microseconds.
Declaration
public long TickCount { get; }
Property Value
Type |
---|
System.Int64 |
Methods
Dispose()
Ends the code block that should be measured and increments the associated performance counter.
Declaration
public void Dispose()
DumpTimes()
Prints all performance counters into a string and sorts it by ids. All counters will be reset afterwards.
Declaration
public static string DumpTimes()
Returns
Type |
---|
System.String |
Measure(String)
Insert this before a code block that should be measured.
Declaration
public static MeasureTime Measure(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
Returns
Type |
---|
MeasureTime |
Implements
System.IDisposable