Show / Hide Table of Contents

Class PerfTimer

Simple utility for timing arbitrary logic and listing hotspots

Inheritance
System.Object
PerfTimer
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: LiteCore.Util
Assembly: Couchbase.Lite.dll
Syntax
public static class PerfTimer

Methods

| Improve this Doc View Source

StartEvent(String)

Starts a new performance event

Declaration
[Conditional("PERF_TESTING")]
public static void StartEvent(string name)
Parameters
Type Name Description
System.String name

The name for the event

| Improve this Doc View Source

StartRun()

Starts an overall run (memory measurement)

Declaration
public static void StartRun()
| Improve this Doc View Source

StopEvent(String)

Stops the performance event with the given name and records its time

Declaration
[Conditional("PERF_TESTING")]
public static void StopEvent(string name)
Parameters
Type Name Description
System.String name

The name of the event to stop

| Improve this Doc View Source

WriteStats(Action<String>)

Writes the statistics about all of the recorded performance events using the given handler

Declaration
[Conditional("PERF_TESTING")]
public static void WriteStats(Action<string> handler)
Parameters
Type Name Description
System.Action<System.String> handler

The handler used to write the performance events

  • Improve this Doc
  • View Source
Back to top Generated by DocFX