forked from off-topic/apps.apple.com
init commit
This commit is contained in:
17
shared/metrics-8/src/recorder/void.ts
Normal file
17
shared/metrics-8/src/recorder/void.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user