38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# perf-test.sh - Run comprehensive performance tests for Claude
|
|
|
|
echo "Running comprehensive performance tests for Claude..."
|
|
|
|
# Create results directory if it doesn't exist
|
|
mkdir -p .claude/results
|
|
|
|
# Run unit tests
|
|
echo "Running unit tests..."
|
|
go test -v ./... | tee .claude/results/unit-tests.log
|
|
|
|
# Run integration tests
|
|
echo "Running integration tests..."
|
|
go test -v ./test/integration/... | tee .claude/results/integration-tests.log
|
|
|
|
# Run benchmarks
|
|
echo "Running benchmarks..."
|
|
go test -bench=. -benchmem ./... | tee .claude/results/benchmarks.log
|
|
|
|
# Run benchmarks with CPU profiling
|
|
echo "Running benchmarks with CPU profiling..."
|
|
go test -bench=. -cpuprofile=.claude/results/cpu.prof ./... | tee .claude/results/cpu-bench.log
|
|
|
|
# Run benchmarks with memory profiling
|
|
echo "Running benchmarks with memory profiling..."
|
|
go test -bench=. -memprofile=.claude/results/mem.prof ./... | tee .claude/results/mem-bench.log
|
|
|
|
# Check for errors
|
|
if [ $? -eq 0 ]; then
|
|
echo "All performance tests completed successfully!"
|
|
echo "Results saved to .claude/results/"
|
|
else
|
|
echo "Some performance tests failed!"
|
|
echo "Check .claude/results/ for details"
|
|
exit 1
|
|
fi |