le: false,
    value: getEntries,
  },
  getEntriesByName: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: getEntriesByName,
  },
  getEntriesByType: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: getEntriesByType,
  },
  mark: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: mark,
  },
  measure: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: measure,
  },
  nodeTiming: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: nodeTiming,
  },
  // In the browser, this function is not public.  However, it must be used inside fetch
  // which is a Node.js dependency, not a internal module
  markResourceTiming: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: markResourceTiming,
  },
  now: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: now,
  },
  setResourceTimingBufferSize: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: setResourceTimingBufferSize,
  },
  timerify: {
    __proto__: null,
    configurable: true,
    enumerable: false,
    value: timerify,
  },
  timeOrigin: {
    __proto__: null,
    configurable: true,
    enumerable: true,
    get() {
      const value = getTimeOriginTimestamp();
      ObjectDefineProperty(Performance.prototype, 'timeOrigin', {
        __proto__: null,
        value,
      });
      return value;
    },
    set(value) {
      ObjectDefineProperty(Performance.prototype, 'timeOrigin', {
        __proto__: null,
        value,
      });
    },
  },
  toJSON: {
    __proto__: null,
    configurable: true,
    enumerable: true,
    value: toJSON,
  },
});

const performance = new InternalPerformance();

function dispatchBufferFull(type) {
  const event = new Event(type, {
    [kTrustEvent]: true,
  });
  performance.dispatchEvent(event);
}
setDispatchBufferFull(dispatchBufferFull);

module.exports = {
  Performance,
  performance,
};
