Dev Helpers
← Back

Record and look up a mark

Record and look up a mark using Node.js.

Open this example in the interactive library

Source code

import {
  performance,
  createHistogram,
  PerformanceObserver,
} from "node:perf_hooks";
console.log(
  (performance.mark("ready"),
  performance.getEntriesByName("ready")[0].entryType),
);

Sample output

mark