Subcommands
dzdk stats services- Service distribution and statisticsdzdk stats usage- Usage statistics and trends
dzdk stats services
Show service distribution, category breakdown, and status statistics.Syntax
Options
Save report to fileOptional. If provided, generates a markdown report in addition to terminal display
Examples
View Service Statistics
Generate and Save Report
Save Report to Custom Location
Statistics Displayed
Overall Statistics Panel
- Total Services: Total count of all services
- Status Distribution:
- Active services (count and percentage)
- Inactive services (count and percentage)
- Unknown status (count and percentage)
Category Distribution Table
A detailed table showing:- Category name
- Count of services in category
- Percentage of total
- Visual bar chart representation
Output Format
Terminal Display:Saved Report Format
When--output is specified, generates a markdown file:
Visual Bar Charts
Categories are displayed with visual bars where:- Each
█character represents 2% of total - Bars are color-coded (magenta in terminal)
- Sorted by count (descending)
dzdk stats usage
Show usage statistics and API endpoint trends.Syntax
Options
Number of days to analyzeSpecifies the time period for usage analysis
Save report to fileOptional. If provided, generates a markdown report
Examples
View Last 30 Days
Analyze Last 7 Days
Generate 90-Day Report
Statistics Displayed
Overall Statistics Panel
- Total Requests: Number of API requests
- Average Response Time: Mean response time in seconds
- Success Rate: Percentage of successful requests
- Error Distribution:
- Timeout errors
- Not found errors (404)
- Server errors (5xx)
- Validation errors
Popular Endpoints Table
Shows the most frequently accessed endpoints:- Endpoint path
- Request count
- Percentage of total requests
- Visual bar chart
Output Format
Terminal Display:Saved Report Format
Progress Indicators
Both stats commands show:- Spinner during data fetching
- Analysis progress bar
- Completion messages
Data Sources
Service Statistics
- Fetches live data from
/servicesendpoint - Analyzes all available services
- Calculates distributions in real-time
Usage Statistics
- Currently uses mock data for demonstration
- In production, would fetch from analytics API
- Tracks endpoint access patterns
Error Handling
No Services Found:Use Cases
Service Statistics
- Monitor service distribution
- Identify category gaps
- Track active vs. inactive services
- Generate reports for stakeholders
- Plan resource allocation
Usage Statistics
- Monitor API health
- Identify popular endpoints
- Track error rates
- Performance monitoring
- Capacity planning
Notes
- Statistics are calculated from live data
- Terminal output uses colored formatting
- Bar charts scale automatically
- Reports are timestamped
- Both stats commands can run without output file
- Saved reports use markdown format for easy viewing