Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 2.9 KB

File metadata and controls

59 lines (40 loc) · 2.9 KB

Response to Maintainer's Questions on PR 6c (Queries Performance Tracking)

Context

This is PR 6 out of 7 planned PRs for the performance tracking feature. A significant amount of infrastructure work has already been completed in previous PRs:

  • ✅ Performance tracking infrastructure (PerformanceTracker, withQueryMetrics, executeWithMetrics)
  • ✅ Redis cache service implementation (RedisCacheService)
  • ✅ Fastify performance plugin integration
  • ✅ Server-Timing headers and /metrics/perf endpoint

Response to Questions

1. "Why is only one file being modified?"

Actually, 54 query files are modified in this PR. However, only 3 files are currently using the standardized executeWithMetrics helper:

  • src/graphql/types/Query/user.ts
  • src/graphql/types/Query/event.ts
  • src/graphql/types/Query/organizations.ts

The other query files (like organization.ts) are using the manual ctx.perf?.time() pattern. This PR focuses on adding performance tracking instrumentation to query resolvers, and the standardized helper was introduced to ensure consistency.

Note: The PR shows 4138 files changed because it was merged with develop, which includes many unrelated changes from other contributors.

2. "None of the files mentioned in the issue have been modified"

Could you please clarify which specific files the issue mentions? This will help ensure we're addressing the correct scope for PR 6c.

Based on the commit message, this PR was intended to:

  • Add performance tracking to query resolvers using withQueryMetrics/executeWithMetrics
  • Update user.ts, event.ts, and organizations.ts to use the standardized helper
  • Add comprehensive test coverage

3. "Was the issue opened too early? There is a redis dependency that isn't complete"

The Redis dependency is already complete from previous PRs:

  • RedisCacheService is fully implemented with all required methods (get, set, del, clearByPattern, mget, mset)
  • Redis integration is working via @fastify/redis plugin
  • Cache service is registered in src/fastifyPlugins/cacheService.ts
  • Graceful degradation is implemented (noop cache if Redis unavailable)

The Redis implementation was completed in earlier PRs as part of the infrastructure setup, so PR 6c can proceed with adding query performance tracking.

Current Status

Files using standardized helper (executeWithMetrics):

  • src/graphql/types/Query/user.ts
  • src/graphql/types/Query/event.ts
  • src/graphql/types/Query/organizations.ts

Files using manual pattern (should be updated?):

  • src/graphql/types/Query/organization.ts (uses ctx.perf?.time() directly)

Next Steps

  1. Please clarify which files the issue specifically mentions for PR 6c
  2. Should we update organization.ts to use executeWithMetrics for consistency?
  3. Are there other query files that should be updated in this PR?

Thank you for the review!