Class PerfTimer
Simple utility for timing arbitrary logic and listing hotspots
Inheritance
System.Object
PerfTimer
Namespace: LiteCore.Util
Assembly: Couchbase.Lite.dll
Syntax
public static class PerfTimer : object
Methods
| Improve this Doc View SourceStartEvent(String)
Starts a new performance event
Declaration
public static void StartEvent(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name for the event |
StartRun()
Starts an overall run (memory measurement)
Declaration
public static void StartRun()
StopEvent(String)
Stops the performance event with the given name and records its time
Declaration
public static void StopEvent(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the event to stop |
WriteStats(Action<String>)
Writes the statistics about all of the recorded performance events using the given handler
Declaration
public static void WriteStats(Action<string> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<System. |
handler | The handler used to write the performance events |