Web APIs
performance.clearMeasures()
Remove stored measures by name or all measures when no name is supplied; named marks remain. Example console output: 0 1.
Formal Syntax & Structure
javascript syntaxjavascript
performance.clearMeasures([name])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Measure name, or omit to clear all measures. |
Return Value
undefined
No result value.
Working Example
Example Snippetjavascript
performance.mark("start"); performance.measure("span","start"); performance.clearMeasures("span"); console.log(performance.getEntriesByName("span").length,performance.getEntriesByName("start").length);