feat(core): implement detailed statistics aggregation infrastructure#155
Merged
feat(core): implement detailed statistics aggregation infrastructure#155
Conversation
Implement data collection infrastructure for dashboard visualizations with language breakdown, component type tracking, and monorepo support. **New Features:** - StatsAggregator class with streaming O(1) aggregation - Language-specific stats (TypeScript, JavaScript, Go, Markdown) - Component type counting (function, class, interface, type, variable) - Package/monorepo detection infrastructure - TypeScript vs JavaScript distinction based on file extension **Types Added:** - SupportedLanguage type - LanguageStats interface (files, components, lines) - PackageStats interface (name, path, languages) - DetailedIndexStats extending IndexStats **Changes:** - Extended IndexStats with optional byLanguage, byComponentType, byPackage - Fixed TypeScript scanner to detect .ts vs .js based on extension - Integrated StatsAggregator into index() and update() methods - All stats backward compatible (optional fields) **Testing:** - 14 unit tests for StatsAggregator (all passing) - 6 integration tests for detailed stats (all passing) - Performance: <5% overhead (10k documents in <100ms) - 508 total core tests passing Related: #146 (Data Collection Infrastructure) Part of Epic #145 (Dashboard & Visualization System)
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements data collection infrastructure for dashboard visualizations (#146) as part of the Dashboard & Visualization System epic (#145).
Key Features:
Changes
New Components
StatsAggregatorclass - Efficient streaming stats collectionDetailedIndexStatsinterface - Extends IndexStats with optional breakdowns.tsvs.js)Type System
SupportedLanguagetypeLanguageStatsinterface (files, components, lines)PackageStatsinterface (name, path, languages)Integration
RepositoryIndexer.index()RepositoryIndexer.update()DetailedIndexStatswith language and component breakdownsTest Plan
✅ 20 new tests added (all passing)
StatsAggregator✅ 508 total core tests passing
✅ Performance verified:
Test Coverage
Backward Compatibility
✅ Fully backward compatible
byLanguage?,byComponentType?,byPackage?)Related Issues