diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-26 21:54:29 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-26 21:54:29 +0300 |
| commit | 45613574ddfc6203ca31388ee7f6c60423f1cbd2 (patch) | |
| tree | 603888f06861a927118fae0b4741df3faaa3155f /profiling/profile_dmap.sh | |
| parent | 62d9774b4c2f776de60e8231fa6b8378d8afef4d (diff) | |
fix: update Makefile clean target and fix dmap profiling behavior
- Updated 'make clean' to also remove all .tmp and .prof files in the repo
- Fixed dmap profiling scripts to let dmap complete naturally instead of
killing it after a timeout (dmap terminates when input is fully processed)
- Removed the special run_profile_dmap function as it's no longer needed
- Updated all profiling scripts to reflect that dmap has a natural exit point
Thanks for the correction - dmap does indeed terminate after processing
all data from the source file, so the timeout/kill approach was unnecessary.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'profiling/profile_dmap.sh')
| -rwxr-xr-x | profiling/profile_dmap.sh | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/profiling/profile_dmap.sh b/profiling/profile_dmap.sh index 1abf629..03402e1 100755 --- a/profiling/profile_dmap.sh +++ b/profiling/profile_dmap.sh @@ -100,33 +100,21 @@ 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" -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 & -DMAP_PID=$! -sleep 3 -kill -INT $DMAP_PID 2>/dev/null || true -wait $DMAP_PID 2>/dev/null || true +echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query \"$QUERY\" -files $TEST_DATA_DIR/stats_small.log" +# Run dmap and let it complete naturally +../dmap -profile -profiledir "$PROFILE_DIR" -plain -cfg none -query "$QUERY" -files "$TEST_DATA_DIR/stats_small.log" 2>&1 | head -10 # Query 2: Aggregations echo -e "\n${YELLOW}Query: Sum and average${NC}" 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=$! -sleep 3 -kill -INT $DMAP_PID 2>/dev/null || true -wait $DMAP_PID 2>/dev/null || true +echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query \"$QUERY\" -files $TEST_DATA_DIR/stats_small.log" +../dmap -profile -profiledir "$PROFILE_DIR" -plain -cfg none -query "$QUERY" -files "$TEST_DATA_DIR/stats_small.log" 2>&1 | head -10 # Query 3: Min/Max echo -e "\n${YELLOW}Query: Min and max${NC}" 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=$! -sleep 3 -kill -INT $DMAP_PID 2>/dev/null || true -wait $DMAP_PID 2>/dev/null || true +echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query \"$QUERY\" -files $TEST_DATA_DIR/stats_small.log" +../dmap -profile -profiledir "$PROFILE_DIR" -plain -cfg none -query "$QUERY" -files "$TEST_DATA_DIR/stats_small.log" 2>&1 | head -10 echo echo -e "${GREEN}Analyzing dmap profiles...${NC}" |
