WayrApp Backend & Ecosystem Documentation - v1.0.0
    Preparing search index...
    • Query Performance Monitoring Decorator for Educational Platform Operations

      TypeScript decorator that automatically monitors database query performance for educational platform operations. Helps identify slow queries that could impact the learning experience without requiring manual instrumentation.

      Educational Platform Focus:

      • Course loading and content delivery performance
      • User progress tracking and analytics speed
      • Exercise retrieval and submission efficiency
      • Search and discovery operation timing

      Community Benefits:

      • Automatic detection of performance issues
      • Detailed logging for troubleshooting
      • Proactive identification of optimization opportunities
      • Zero-overhead monitoring for production use

      Usage Pattern: Apply to repository methods and service operations that interact with the database to automatically track their performance impact on the community's learning experience.

      Parameters

      • target: any

        The class containing the method to monitor

      • propertyName: string

        The name of the method being monitored

      • descriptor: PropertyDescriptor

        The method descriptor for decoration

      Returns PropertyDescriptor

      Modified descriptor with performance monitoring

      class CourseRepository {
      async findCoursesByLanguage(language: string) {
      return await this.prisma.course.findMany({ where: { target_language: language } });
      }
      }