first commit

This commit is contained in:
Hussar
2026-04-12 16:43:45 +01:00
commit 9213df4828
79 changed files with 2204 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class MetricsService {
private readonly counters = new Map<string, number>();
increment(name: string, by = 1): void {
this.counters.set(name, (this.counters.get(name) ?? 0) + by);
}
snapshot(): Record<string, number> {
return Object.fromEntries(this.counters.entries());
}
}