Skip to content

Latest commit

 

History

History

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

TraceEvents

constructor()

Call new TraceEvents() to create a new TraceEvents object to track the PerformanceEntry objects.

destroy()

Call traceEvents.destroy() when there is no more use of the TraceEvents object.

getEvents()

Call traceEvents.getEvents() to get the PerformanceEntry objects in the Trace Event Format:

[
  {
    "name": "B",
    "cat": "measure",
    "ph": "X",
    "pid": 1,
    "ts": 34509,
    "dur": 1004141
  },
  {
    "name": "A",
    "cat": "measure",
    "ph": "X",
    "pid": 1,
    "ts": 33837,
    "dur": 2002098
  }
]

trackRequires(bool) (only available in CommonJS)

Call trackRequires(true) to enable tracking require()s and call trackRequires(false) to disable tracking require()s.