Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ContributorStats model for tracking contributor activity #3208

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

JisanAR03
Copy link
Contributor

Pros of the ContributorStats Model Compared to the Previous Approach:

  1. Improved Query Performance:

    • Aggregated data eliminates the need to process individual event-level rows for each query, significantly speeding up statistics calculations.
  2. Optimized Storage:

    • Storing daily stats for the last 30 days and monthly stats for older data reduces the database size compared to storing all individual events.
  3. Simplified Data Retrieval:

    • Directly querying daily or monthly aggregated rows simplifies frontend logic for displaying contributor activity over different time periods (e.g., 7 days, 30 days, yearly).
  4. Efficient Historical Management:

    • Rolling up old daily stats into monthly data ensures historical trends are preserved without keeping unnecessary day-level details.
  5. Customizable Granularity:

    • The granularity field allows flexible storage for both daily and monthly data in a single table, making it easier to scale or adjust the data retention policy in the future.
  6. Reduced API Dependency:

    • By storing aggregated stats, we avoid frequent or heavy API calls to GitHub for historical data, relying instead on pre-synced local data.
  7. Scalable Design:

    • The model supports efficient handling of large contributor bases and active repositories without the database performance issues of event-level storage.

    @DonnieBLT sir, can you please review this PR ?
    another step for fix create a csv to add all owasp projects to /projects #2972

@JisanAR03 JisanAR03 requested a review from DonnieBLT January 6, 2025 13:29
@DonnieBLT DonnieBLT merged commit 6c7c2ff into OWASP-BLT:main Jan 6, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create a csv to add all owasp projects to /projects
2 participants