Files
gnome-jarvis/daemon/voice-metrics.js
T
2026-09-11 14:09:04 -04:00

10 lines
609 B
JavaScript

export class VoiceMetrics {
constructor() { this.startedAt = Date.now(); this.wakeAccepts = 0; this.wakeRejects = 0; this.feedbackDrops = 0; this.utterances = 0; this.replies = 0; }
wakeAccepted() { this.wakeAccepts += 1; }
wakeRejected() { this.wakeRejects += 1; }
feedbackDrop() { this.feedbackDrops += 1; }
utterance() { this.utterances += 1; }
reply() { this.replies += 1; }
snapshot() { return { uptimeMs: Date.now() - this.startedAt, wakeAccepts: this.wakeAccepts, wakeRejects: this.wakeRejects, feedbackDrops: this.feedbackDrops, utterances: this.utterances, replies: this.replies }; }
}