AI Impact: Add GraphQL API for AI Acceptance Rate
What does this MR do and why?
It adds GraphQL API for 2 new fields for Code Suggestions.
-
codeSuggestionsShownCount- total number of code suggestions shown to code contributors in given timeframe -
codeSuggestionsAcceptedCount- total number of code suggestions accepted by code contributors in given timeframe
With these 2 metrics we can easily calculate Acceptance Rate on frontend.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Setup clickhouse
- Enable analytics in clickhouse via
Gitlab::CurrentSettings.current_application_settings.update(use_clickhouse_for_analytics: true)Rails console command. - Seed data via
FILTER=ai_usage_stats bundle exec rake db:seed_futerminal ocmmand - Use
http://127.0.0.1:3000/-/graphql-explorerto verify that the data is properly shown. See screenshot above for example query
Related to #456088 (closed)
Edited by Pavel Shutsin
