/*!
 * Custom elements for Nanopore-Digital Web applications
 */
import { Build } from "@stencil/core";
const measurePerf = false;
export function perMark(name, end = false) {
    if (Build.isDev) {
        if (!performance || !measurePerf)
            return;
        if (end) {
            performance?.mark('end' + name);
            performance?.measure(name, 'start' + name, 'end' + name);
            const entries = performance?.getEntriesByName(name);
            console.info(entries[entries.length ? entries.length - 1 : 0]);
        }
        else {
            performance?.mark('start' + name);
        }
    }
}
