Web APIs

performance.clearMeasures()

Try the free JavaScript compiler

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

NameTypeDescription
namestringMeasure 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);
JavaScript Reference