Implement benchmark tests for the FileManager module to measure and improve its performance.
Key areas to benchmark:
- File scanning operations (recursive and non-recursive)
- File filtering operations
- File size calculations
- Concurrent file operations
Technical details:
- Create a new directory:
internal/tests/benchmark/filemanager/
- Implement benchmark tests using Go's testing package
- Focus on measuring:
- Operation time (ns/op)
- Memory allocations (B/op)
- Number of allocations (allocs/op)
Example structure:
func BenchmarkFileScanner_ScanFilesRecursively(b *testing.B) {
// Setup test data
// Run benchmark
// Measure performance
}
Implement benchmark tests for the FileManager module to measure and improve its performance.
Key areas to benchmark:
Technical details:
internal/tests/benchmark/filemanager/Example structure: