@botonic/plugin-contentful
Version:
## What Does This Plugin Do?
24 lines (19 loc) • 472 B
text/typescript
import { PerformanceMeasurer } from './performance-measurer'
export class WebPerformanceMeasurer extends PerformanceMeasurer {
constructor() {
super(performance)
}
getEntriesByName(name: string): PerformanceEntry[] {
return this.perf.getEntriesByName(name)
}
end(mark: string, name: string) {
super.end(mark, name)
if (this.enabled) {
this.allProfiled[name] = []
}
}
clear() {
super.clear()
this.perf.clearMarks()
}
}