Class Profiler
Provides static methods for profiling performance in the browser.
Inheritance
Inherited Members
Namespace: OpenSilver
Assembly: OpenSilver.dll
Syntax
public static class Profiler
Methods
| Improve this Doc View SourceConsoleTime(String)
Declaration
public static void ConsoleTime(string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | label |
ConsoleTimeEnd(String)
Declaration
public static void ConsoleTimeEnd(string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | label |
ConsoleTimeLog(String)
Declaration
public static void ConsoleTimeLog(string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | label |
StartMeasuringTime()
Allows measuring the cumulative time between the start and the end of the measure. It returns a number that you need to pass to the "StopMeasuringTime()" method.
Declaration
public static long StartMeasuringTime()
Returns
Type | Description |
---|---|
System.Int64 | A number that you need to pass to the "StopMeasuringTime()" method. |
StopMeasuringTime(String, Int64)
Allows measuring the time between the start and the end of the measure. The result is "accrued", meaning that it is cumulative if executed multiple times. You can see the result by calling "ViewProfilerResults()" from the browser console.
Declaration
public static void StopMeasuringTime(string measureDescription, long numberReturnedByTheStartMeasuringTimeMethod)
Parameters
Type | Name | Description |
---|---|---|
System.String | measureDescription | An arbitrary text to describe the measure. |
System.Int64 | numberReturnedByTheStartMeasuringTimeMethod | The number returned by the call to "StartMeasuringTime()". It is used to calculate the time elapsed between the start and the end of the measure. |
ViewProfilerResults()
Shows the measures obtained so far in the Output window of Visual Studio if in the Simulator, in the browser's developer tools' console if in the Browser.
Declaration
public static void ViewProfilerResults()