Overview
Insights collect and analyze data from:- Build runs: Duration, success rate, file compilation times
- Cache operations: Hit rates, download/upload times
- Test runs: Pass/fail rates, test duration, flaky tests
- Bundle sizes: App size trends, asset analysis
- CAS operations: Content-addressable storage metrics
Prerequisites
- Authenticate with Tuist Cloud
- Configure your project:
Config.swift
Build Insights
Build Duration Trends
Track how build times change over time:- Total build duration: End-to-end build time
- Clean vs incremental: Compare different build types
- Per-target duration: Identify slow-building targets
- File compilation time: Find slow-compiling files
Build Success Rate
Monitor build reliability:- Success vs failure rate over time
- Most common build errors
- Error frequency by target
- CI vs local build success rates
Compilation Metrics
Analyze what takes time during compilation:- Swift compilation: Files and targets
- C/Obj-C compilation: Header processing time
- Linking: Final binary linking duration
- Asset compilation: Asset catalog processing
Build Comparison
Compare builds across:- Branches: Compare feature branches to main
- Time periods: Week-over-week, month-over-month
- Developers: Team member performance
- CI providers: Different CI systems
Cache Insights
Cache Hit Rate
Track cache effectiveness:- Overall hit rate: Percentage of cache hits
- Per-target hit rate: Which targets cache well
- Hit rate trends: How cache performance changes
- Miss reasons: Why cache misses occur
Cache Operations
Monitor cache usage:- Upload frequency: How often artifacts are uploaded
- Download volume: Amount of data downloaded
- Storage usage: Total cache storage consumed
- Bandwidth usage: Network traffic patterns
Time Savings
Quantify cache benefits:Cache by Configuration
Compare cache performance across:- Debug vs Release configurations
- Simulator vs Device builds
- Different cache profiles
Test Insights
Test Execution Trends
Track test performance:- Test duration: Total and per-test time
- Test count: Number of tests over time
- Pass/fail rate: Test reliability
- Skipped tests: Tests marked as skipped
Flaky Test Detection
Identify unreliable tests:- Tests with inconsistent results
- Flakiness percentage
- Impact on CI reliability
- Recommended fixes
Test Coverage Trends
Monitor code coverage:- Overall coverage percentage
- Coverage by target
- Coverage trends over time
- Uncovered files and functions
Slow Tests
Find performance bottlenecks:- Slowest test cases
- Tests with increasing duration
- Test timeout failures
- Recommended parallelization
Bundle Insights
Learn more about Bundle Analysis
Detailed bundle size tracking and optimization recommendations
Size Trends
Track app bundle size:- Total app size: Download and install sizes
- Size per release: Version-over-version changes
- Size by platform: iOS, macOS, visionOS, etc.
- Size regressions: Unexpected size increases
Asset Analysis
Break down what contributes to app size:- Images and assets: Asset catalog size
- Frameworks: Embedded framework sizes
- Resources: Localization, fonts, etc.
- Binaries: Executable and library sizes
Command Events
Track CLI usage across your team:- Most used commands: Which commands are run frequently
- Command duration: How long commands take
- Error rates: Which commands fail most often
- User adoption: Team members using Tuist
Command Analytics
View metrics for:tuist generatetuist buildtuist testtuist cache warmtuist share
Environment Metrics
Development Environment
Track environment diversity:- Xcode versions: Which versions are in use
- macOS versions: OS distribution
- Hardware: Mac models and specs
- CI providers: Which CI systems are used
Build Matrix
See which configurations are tested:- iOS versions
- Device types
- Build configurations (Debug/Release)
- Architectures (arm64, x86_64)
CI/CD Insights
CI Build Performance
Analyze CI-specific metrics:- CI build duration: Total pipeline time
- Queue time: Time waiting for CI resources
- Cache effectiveness in CI: CI-specific cache hit rate
- Parallelization: How well tests parallelize
CI Provider Comparison
Compare different CI systems:- GitHub Actions vs GitLab CI
- Build times by provider
- Success rates
- Cost efficiency
CI Optimization Recommendations
Get suggestions for:- Improving cache hit rates
- Parallelizing builds and tests
- Reducing dependency installation time
- Optimizing test distribution
CAS Insights
Content-Addressable Storage
When using Xcode’s build system with CAS:- CAS hit rate: Successful content reuse
- Upload/download volume: Data transferred
- Deduplication savings: Storage efficiency
- Operation duration: CAS performance
CAS Output Types
Break down by output type:- Swift modules
- Object files
- dSYM files
- Documentation
Web Dashboard
Access the Insights dashboard:Dashboard Features
- Interactive charts: Filter and drill down into data
- Date range selection: View specific time periods
- Export capabilities: Download data as CSV
- Share reports: Generate shareable links
- Custom views: Save frequently used filters
Key Metrics at a Glance
The dashboard homepage shows:- Recent build trends
- Cache hit rate
- Test pass rate
- Bundle size changes
- Active developers
Insights API
Query insights data programmatically:- Build custom dashboards
- Integrate with monitoring tools
- Create automated alerts
- Generate reports
Optimization Recommendations
Based on collected data, Tuist provides recommendations:Build Optimization
- Slow targets: Targets to modularize or optimize
- Compilation bottlenecks: Files to refactor
- Dependency issues: Unnecessary dependencies
Cache Optimization
- Low cache hit targets: Targets with frequent cache misses
- Configuration issues: Settings causing invalidation
- Opportunities: Targets that would benefit from caching
Test Optimization
- Flaky tests: Tests to fix or quarantine
- Slow tests: Tests to speed up or parallelize
- Test distribution: Better test parallelization strategies
Notifications and Alerts
Configure alerts for important events:Config.swift
- Slack
- Webhooks
Privacy and Data Retention
What Data is Collected
Insights collect:- Build and test metrics (duration, status)
- Cache operation data (hit/miss, size)
- File paths and target names
- Git metadata (branch, commit SHA)
- Environment data (Xcode version, OS version)
What is NOT Collected
- Source code content
- File contents
- Compiled binaries (except metadata)
- User credentials
- Proprietary business logic
Data Retention
- Raw event data: 90 days
- Aggregated metrics: Indefinitely
- Build artifacts: Configurable (default 30 days)
Data Export
Export your insights data:Advanced Analytics
Custom Queries
Run custom queries on your data:Data Warehouse Integration
Export data to your data warehouse:- BigQuery
- Snowflake
- Redshift
- Custom data lakes
Best Practices
Review insights weekly
Review insights weekly
Set aside time each week to review trends and identify optimization opportunities.
Set up alerts for regressions
Set up alerts for regressions
Configure notifications for build time increases, cache hit rate drops, or test failures.
Share insights with the team
Share insights with the team
Track improvements over time
Track improvements over time
After optimizations, monitor metrics to verify improvements.
Troubleshooting
Missing Data
If insights aren’t showing:- Verify authentication:
tuist auth whoami - Check project configuration in
Config.swift - Ensure commands are running with cloud enabled
Incorrect Metrics
If data seems wrong:- Verify system time is correct
- Check for duplicate builds in CI
- Review git metadata accuracy
Dashboard Performance
If the dashboard is slow:- Reduce date range
- Filter by specific targets or tests
- Use aggregated views instead of raw data
Next Steps
Bundle Analysis
Deep dive into app bundle size optimization
Cache Service
Improve cache hit rates based on insights