fix metrics gathering
This commit is contained in:
1 parent
b6266a160e
commit
1bb248de1b
7 files changed
+274
-223
No files matched your search
+2
-6
@@ -10,7 +10,7 @@ import { MetricsTrackerService } from '../../../../services/metrics-tracker.serv
|
||||
templateUrl: './demographics-feedback.component.html',
|
||||
styleUrls: ['./demographics-feedback.component.css']
|
||||
})
|
||||
export class DemographicsFeedbackComponent implements OnInit, OnDestroy {
|
||||
export class DemographicsFeedbackComponent implements OnInit {
|
||||
private metricsService = inject(MetricsTrackerService);
|
||||
|
||||
@Output() testComplete = new EventEmitter<void>();
|
||||
@@ -88,7 +88,7 @@ export class DemographicsFeedbackComponent implements OnInit, OnDestroy {
|
||||
submittedAt: new Date().toISOString()
|
||||
};
|
||||
|
||||
this.metricsService.sendMetricsToServer('FullTestSuite', formData).subscribe({
|
||||
this.metricsService.sendMetricsToServer(formData).subscribe({
|
||||
next: () => {
|
||||
this.isSubmitting = false;
|
||||
this.isSubmitted = true;
|
||||
@@ -123,8 +123,4 @@ export class DemographicsFeedbackComponent implements OnInit, OnDestroy {
|
||||
|
||||
return score * 2.5;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.metricsService.resetMetrics();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -48,7 +48,7 @@ export class SpatialPositionAssessmentComponent implements AfterViewInit, OnDest
|
||||
mv.addEventListener('ar-status', (e: any) => {
|
||||
if (e.detail.status === 'session-started') {
|
||||
setTimeout(() => this.captureAnchor(), 500);
|
||||
this.metricsService.startTracking(mv);
|
||||
this.metricsService.startTracking(mv, "position");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+2
-3
@@ -49,8 +49,8 @@ export class SpatialStabilityAssessmentComponent implements AfterViewInit, OnDes
|
||||
const mv = this.modelViewerRef.nativeElement;
|
||||
mv.addEventListener('ar-status', (event: any) => {
|
||||
if (event.detail.status === 'session-started' && !this.isModelPlaced) {
|
||||
setTimeout(() => this.getInitialAnchor(), 1000);
|
||||
this.metricsService.startTracking(mv);
|
||||
setTimeout(() => this.getInitialAnchor(), 500);
|
||||
this.metricsService.startTracking(mv, "stability");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -155,7 +155,6 @@ export class SpatialStabilityAssessmentComponent implements AfterViewInit, OnDes
|
||||
clearInterval(this.countdownInterval);
|
||||
this.countdownInterval = null;
|
||||
}
|
||||
this.metricsService.resetMetrics();
|
||||
}
|
||||
|
||||
finishAssessment() {
|
||||
|
||||
+2
-1
@@ -58,7 +58,8 @@ export class TextLegibilityAssessmentComponent implements AfterViewInit, OnDestr
|
||||
const mv = this.modelViewerRef.nativeElement;
|
||||
mv.addEventListener('ar-status', (event: any) => {
|
||||
if (event.detail.status === 'session-started') {
|
||||
this.metricsService.startTracking(mv);
|
||||
console.log('AR session started. Delaying startTracking call to ensure session is ready.');
|
||||
this.metricsService.startTracking(mv, "text-legibility");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user