Skip to content

Commit

Permalink
Revert last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CeEv committed Jun 18, 2024
1 parent 7edc690 commit 56f0a78
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { PerformanceObserver, PerformanceEntry } from 'node:perf_hooks';
import { Loggable, LoggableMessage } from '../loggable';

interface InfoLogger {
alert(input: Loggable): void;
info(input: Loggable): void;
}

Expand Down Expand Up @@ -51,12 +50,12 @@ let obs: PerformanceObserver | null = null;
*/
export const initilisedPerformanceObserver = (infoLogger: InfoLogger): PerformanceObserver => {
if (obs === null) {
infoLogger.alert(new InitalisePerformanceLoggable());
infoLogger.info(new InitalisePerformanceLoggable());
// eslint-disable-next-line @typescript-eslint/no-unused-vars
obs = new PerformanceObserver((perfObserverList, observer) => {
const entries = perfObserverList.getEntries();
const loggable = new MeasureLoggable(entries);
infoLogger.alert(loggable);
infoLogger.info(loggable);
});
obs.observe({ type: 'measure', buffered: true });
}
Expand Down

0 comments on commit 56f0a78

Please sign in to comment.