mirror of
https://github.com/rxliuli/apps.apple.com.git
synced 2026-03-22 22:57:38 +01:00
18 lines
524 B
TypeScript
18 lines
524 B
TypeScript
import type { MetricsEventRecorder } from '@jet/engine';
|
|
import type { LintedMetricsEvent } from '@jet/environment/types/metrics';
|
|
import type { Opt } from '@jet/environment/types/optional';
|
|
|
|
export class VoidEventRecorder implements MetricsEventRecorder {
|
|
private recorded: number = 0;
|
|
|
|
record(_event: LintedMetricsEvent, _topic: Opt<string>): void {
|
|
this.recorded++;
|
|
}
|
|
|
|
async flush(): Promise<number> {
|
|
const { recorded } = this;
|
|
this.recorded = 0;
|
|
return recorded;
|
|
}
|
|
}
|