4b97b176bd61235fd5afd89a9b17aee0b2f431fb
This commit adds tooling to measure how many branches the random simulation reaches during execution, which helps understand code coverage and identify untested code paths. Changes: - Add coverage build target to Makefile with --coverage flags - Create measure_coverage.sh script to build, run, and report branch coverage - Add signal handlers (SIGINT/SIGTERM) to main_test.c for clean shutdown - Update clean target to remove coverage files (*.gcda, *.gcno) The script runs the simulation for a specified duration (default 5 seconds), then uses gcov to analyze which branches were executed. In a 3-second run, the simulation reaches approximately 32% of all branches (781/2431). Usage: ./measure_coverage.sh [duration_in_seconds] Example output shows per-file and total branch coverage statistics.
Languages
C
98.4%
Shell
1%
Zig
0.4%
Batchfile
0.2%