Start listening for performance counters. Note that you must attach the returned PerformanceObserver to some long-lived object like the window; there's some kind of bug that causes PerformanceObservers to be incorrectly garbage-collected even if they're still attached and observing.
If given, stats will be logged directly to the given stats logger. If absent, stats will be sent to the performance_background receiver using messaging.
Decorator for performance measuring. If performance is enabled, wraps the function call with performance marks and a measure that can be used for profiling. The mark's ownerName will be the name of the containing class and the functionName will be the name of the function. For example:
class Foo {
Like the @measured decorator, but properly handles async functions by chaining a resolution onto the promise that marks completion when the function resolves its promise.
Pretty-prints a pile of performance samples of type measure (others won't work because they have duration zero or undefined) as a horizontal ASCII histogram. Useful if you just want basic statistics about performance and don't want to spend a bunch of time mucking about in python or julia.
A very small example of what you'll get:
0 #### 125 ########## 250 ############### 375 ###### 500 ##
A set of samples to plot.
The number of bins to divide the samples into.
The width of the chart.
Configuration for filtering performance samples.