Benchmarking methods helpful for debugging. This library is mostly
succeeded by the console
SDK
Methods
-
require("ko/benchmark").accumulate(name, duration)
-
Accumulate the number of calls and duration for this name.
Parameters:
Name Type Description name
String duration
Int -
require("ko/benchmark").addEvent(name)
-
Reports an event occurred (at the current time).
Parameters:
Name Type Description name
String -
require("ko/benchmark").addEventAtTime(name, t)
-
Reports an event occurred at the given time.
Parameters:
Name Type Description name
String t
Int -
require("ko/benchmark").addTiming(name, duration)
-
Reports that the given event took the given time duration.
Parameters:
Name Type Description name
String duration
Int -
require("ko/benchmark").display()
-
Dump current benchmark results to stdout.
-
require("ko/benchmark").endTiming(name)
-
Records the end time for the given event name. Must have a matching startTiming call.
Parameters:
Name Type Description name
String -
require("ko/benchmark").startTiming(name)
-
Records the start time for the given event name.
Parameters:
Name Type Description name
String