displayStats displays validation statistics
(result *output.ValidationResult)
| 347 | |
| 348 | // displayStats displays validation statistics |
| 349 | func (v *Validator) displayStats(result *output.ValidationResult) { |
| 350 | fmt.Fprintf(v.Out, "\n📊 Validation Statistics:\n") |
| 351 | fmt.Fprintf(v.Out, " Files processed: %d\n", result.TotalFiles) |
| 352 | fmt.Fprintf(v.Out, " Valid files: %d\n", result.ValidFiles) |
| 353 | fmt.Fprintf(v.Out, " Invalid files: %d\n", result.InvalidFiles) |
| 354 | fmt.Fprintf(v.Out, " Total size: %s\n", formatBytes(result.TotalBytes)) |
| 355 | fmt.Fprintf(v.Out, " Duration: %v\n", result.Duration) |
| 356 | |
| 357 | if result.TotalFiles > 0 && result.Duration.Seconds() > 0 { |
| 358 | fmt.Fprintf(v.Out, " Throughput: %.1f files/sec\n", float64(result.TotalFiles)/result.Duration.Seconds()) |
| 359 | } |
| 360 | |
| 361 | if result.TotalBytes > 0 && result.Duration.Seconds() > 0 { |
| 362 | fmt.Fprintf(v.Out, " Speed: %s/sec\n", formatBytes(int64(float64(result.TotalBytes)/result.Duration.Seconds()))) |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | // formatBytes formats bytes into human-readable format |
| 367 | func formatBytes(bytes int64) string { |