summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-26 15:50:53 +0300
committerPaul Buetow <paul@buetow.org>2025-06-26 15:50:53 +0300
commitde796a4d70bc5891a6dba5e1050ae265cfddfe36 (patch)
tree35882ab61f26ec6716e2ff3582eb0689570e7630 /benchmarks
parent6491d425b98e62fb75a271bf34ad2686cd4e842c (diff)
fix: improve dmap profiling error handling
Added || true to kill and wait commands in run_profile_dmap() to prevent script failures when processes exit with non-zero codes after receiving SIGINT. This is expected behavior when interrupting dmap. Note: There appears to be a separate issue where dtail commands (dcat, dgrep, dmap) hang when run in serverless mode with file arguments. This needs further investigation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'benchmarks')
-rwxr-xr-xbenchmarks/profile_benchmarks.sh5
-rwxr-xr-xbenchmarks/profile_dmap.sh12
2 files changed, 9 insertions, 8 deletions
diff --git a/benchmarks/profile_benchmarks.sh b/benchmarks/profile_benchmarks.sh
index 976aaf7..1730091 100755
--- a/benchmarks/profile_benchmarks.sh
+++ b/benchmarks/profile_benchmarks.sh
@@ -89,8 +89,9 @@ run_profile_dmap() {
sleep 3
# Send interrupt signal to make it exit cleanly
- kill -INT $pid 2>/dev/null
- wait $pid 2>/dev/null
+ # We expect this to return non-zero, so we ignore the exit code
+ kill -INT $pid 2>/dev/null || true
+ wait $pid 2>/dev/null || true
echo " Completed"
diff --git a/benchmarks/profile_dmap.sh b/benchmarks/profile_dmap.sh
index 904c793..4983826 100755
--- a/benchmarks/profile_dmap.sh
+++ b/benchmarks/profile_dmap.sh
@@ -105,8 +105,8 @@ echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query
../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
-wait $DMAP_PID 2>/dev/null
+kill -INT $DMAP_PID 2>/dev/null || true
+wait $DMAP_PID 2>/dev/null || true
# Query 2: Aggregations
echo -e "\n${YELLOW}Query: Sum and average${NC}"
@@ -115,8 +115,8 @@ echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query
../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
-wait $DMAP_PID 2>/dev/null
+kill -INT $DMAP_PID 2>/dev/null || true
+wait $DMAP_PID 2>/dev/null || true
# Query 3: Min/Max
echo -e "\n${YELLOW}Query: Min and max${NC}"
@@ -125,8 +125,8 @@ echo "Command: ../dmap -profile -profiledir $PROFILE_DIR -plain -cfg none -query
../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
-wait $DMAP_PID 2>/dev/null
+kill -INT $DMAP_PID 2>/dev/null || true
+wait $DMAP_PID 2>/dev/null || true
echo
echo -e "${GREEN}Analyzing dmap profiles...${NC}"