Show / Hide Table of Contents

Class Profiler

Provides static methods for profiling performance in the browser.

Inheritance
System.Object
Profiler
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OpenSilver
Assembly: OpenSilver.dll
Syntax
public static class Profiler

Methods

| Improve this Doc View Source

ConsoleTime(String)

Declaration
public static void ConsoleTime(string label)
Parameters
Type Name Description
System.String label
| Improve this Doc View Source

ConsoleTimeEnd(String)

Declaration
public static void ConsoleTimeEnd(string label)
Parameters
Type Name Description
System.String label
| Improve this Doc View Source

ConsoleTimeLog(String)

Declaration
public static void ConsoleTimeLog(string label)
Parameters
Type Name Description
System.String label
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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()
  • Improve this Doc
  • View Source