Skip to content

Commit 819b863

Browse files
committed
build: clean up previous benchmark
1 parent a616859 commit 819b863

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/liquid_glass_renderer/example/tool/benchmark.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ if [ ! -f "test_driver/perf_driver.dart" ]; then
6868
exit 1
6969
fi
7070

71+
# Clean up previous benchmark results
72+
print_info "Cleaning up previous benchmark results..."
73+
if [ -d "build" ]; then
74+
EXISTING_FILES=$(find build -name "*.timeline*.json" 2>/dev/null | wc -l)
75+
if [ "$EXISTING_FILES" -gt 0 ]; then
76+
print_info "Removing $EXISTING_FILES existing timeline files..."
77+
find build -name "*.timeline.json" -delete 2>/dev/null || true
78+
find build -name "*.timeline_summary.json" -delete 2>/dev/null || true
79+
print_success "Previous benchmark results cleaned up"
80+
else
81+
print_info "No existing timeline files to clean up"
82+
fi
83+
else
84+
print_info "No build directory found, nothing to clean up"
85+
fi
86+
7187
# Run the benchmark
7288
print_info "Starting performance benchmark tests on $MACOS_DEVICE..."
7389
print_warning "This may take several minutes..."

0 commit comments

Comments
 (0)