diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-26 21:10:07 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-26 21:10:07 +0300 |
| commit | 513c70e297059822384140ee7e5939d20fd0bdc1 (patch) | |
| tree | d6619230b54c4956d138c17c43df0fc72bb6f71a | |
| parent | 4a657e44e7111d7d3b9a9ba5e453901e19af2ecb (diff) | |
refactor: move profiling scripts from benchmarks/ to profiling/
- Moved profile_benchmarks.sh, profile_dmap.sh, and profile_quick.sh
to the profiling/ directory where they belong
- Updated Makefile targets to reference new locations
- Fixed profile_dmap.sh to remove outfile clauses since they're not
needed for profiling and were preventing proper execution
- Updated .gitignore to exclude generated files in profiling/
This better separates benchmarking (performance comparison) from
profiling (performance analysis).
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile | 6 | ||||
| -rwxr-xr-x | profiling/profile_benchmarks.sh (renamed from benchmarks/profile_benchmarks.sh) | 0 | ||||
| -rwxr-xr-x | profiling/profile_dmap.sh (renamed from benchmarks/profile_dmap.sh) | 9 | ||||
| -rwxr-xr-x | profiling/profile_quick.sh (renamed from benchmarks/profile_quick.sh) | 0 |
5 files changed, 9 insertions, 8 deletions
@@ -17,6 +17,8 @@ benchmarks/testdata/ /log/ /profiles/ /profiling/*.prof +/profiling/profiles/ +/profiling/testdata/ /testdata/ test_*.log /dtail @@ -153,7 +153,7 @@ profile-dgrep: dgrep profile-testdata # Profile dmap (with MapReduce format data) profile-dmap: dmap @echo "Profiling dmap with MapReduce format..." - @cd benchmarks && ./profile_dmap.sh + @cd profiling && ./profile_dmap.sh # Profile all commands profile-all: profile-dcat profile-dgrep profile-dmap @@ -199,12 +199,12 @@ profile-benchmark: dcat dgrep dmap # Run automated profiling script profile-auto: dcat dgrep dmap @echo "Running automated profiling script..." - cd benchmarks && ./profile_benchmarks.sh + cd profiling && ./profile_benchmarks.sh # Run quick profiling (smaller datasets) profile-quick: dcat dgrep dmap @echo "Running quick profiling..." - cd benchmarks && ./profile_quick.sh + cd profiling && ./profile_quick.sh # Show profiling help profile-help: diff --git a/benchmarks/profile_benchmarks.sh b/profiling/profile_benchmarks.sh index 6be86cd..6be86cd 100755 --- a/benchmarks/profile_benchmarks.sh +++ b/profiling/profile_benchmarks.sh diff --git a/benchmarks/profile_dmap.sh b/profiling/profile_dmap.sh index 4983826..1abf629 100755 --- a/benchmarks/profile_dmap.sh +++ b/profiling/profile_dmap.sh @@ -99,7 +99,7 @@ echo -e "${GREEN}Profiling dmap queries...${NC}" # Query 1: Simple count echo -e "\n${YELLOW}Query: Count by hostname${NC}" -QUERY="from STATS select count(\$line) group by hostname outfile $TEST_DATA_DIR/count_output.csv" +QUERY="from STATS select count(\$line) group by hostname" echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query \"$QUERY\" -files $TEST_DATA_DIR/stats_small.log (will interrupt after 3s)" # Run dmap in background and interrupt after 3 seconds ../dmap -profile -profiledir "$PROFILE_DIR" -plain -cfg none -query "$QUERY" -files "$TEST_DATA_DIR/stats_small.log" 2>&1 | head -10 & @@ -110,7 +110,7 @@ wait $DMAP_PID 2>/dev/null || true # Query 2: Aggregations echo -e "\n${YELLOW}Query: Sum and average${NC}" -QUERY="from STATS select sum(\$goroutines),avg(\$goroutines) group by hostname outfile $TEST_DATA_DIR/sum_avg_output.csv" +QUERY="from STATS select sum(\$goroutines),avg(\$goroutines) group by hostname" echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query \"$QUERY\" -files $TEST_DATA_DIR/stats_small.log (will interrupt after 3s)" ../dmap -profile -profiledir "$PROFILE_DIR" -plain -cfg none -query "$QUERY" -files "$TEST_DATA_DIR/stats_small.log" 2>&1 | head -10 & DMAP_PID=$! @@ -120,7 +120,7 @@ wait $DMAP_PID 2>/dev/null || true # Query 3: Min/Max echo -e "\n${YELLOW}Query: Min and max${NC}" -QUERY="from STATS select min(currentConnections),max(lifetimeConnections) group by hostname outfile $TEST_DATA_DIR/min_max_output.csv" +QUERY="from STATS select min(currentConnections),max(lifetimeConnections) group by hostname" echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query \"$QUERY\" -files $TEST_DATA_DIR/stats_small.log (will interrupt after 3s)" ../dmap -profile -profiledir "$PROFILE_DIR" -plain -cfg none -query "$QUERY" -files "$TEST_DATA_DIR/stats_small.log" 2>&1 | head -10 & DMAP_PID=$! @@ -151,5 +151,4 @@ echo "To analyze profiles in detail:" echo " go tool pprof $PROFILE_DIR/dmap_cpu_*.prof" echo " go tool pprof -alloc_space $PROFILE_DIR/dmap_mem_*.prof" -# Cleanup temporary output files -rm -f "$TEST_DATA_DIR"/*_output.csv
\ No newline at end of file +# No cleanup needed - no output files are created during profiling diff --git a/benchmarks/profile_quick.sh b/profiling/profile_quick.sh index 1aa9425..1aa9425 100755 --- a/benchmarks/profile_quick.sh +++ b/profiling/profile_quick.sh |
