DevOps-zhuang / copilot-metric-saver

call github copilot usage and seat API, then save fetched data to file or mysql for persistent save, then anlyze it.
2 stars 3 forks source link

Refactor usage metrics handling: rename Metrics to Copilot_Usage, and… #21

Closed DevOps-zhuang closed 12 hours ago

DevOps-zhuang commented 3 days ago

This pull request introduces a new service for handling Copilot metrics storage and updates the existing usage storage service to improve functionality and maintainability. The most important changes include the creation of CopilotMetricsStorageService, updates to CopilotUsageStorageService, and the addition of new storage classes for metrics.

New Service for Metrics Storage:

Updates to Usage Storage Service:

New Storage Classes:

Factory Updates:

Test Updates:

These changes collectively enhance the system's ability to handle metrics and usage data more effectively and provide a clear structure for future extensions.… introduce new metrics as copilot_metrics to reflect github latest copilot API change. and support both files and mysql databases for seat/copilot_usage/copilot_seat API data fetching.