The shrink hooks' info structs should probably also track time spent shrinking so far (in milliseconds).
A shrink_pre hook that halts shrinking after 10 minutes should be only a few lines of code, and shouldn't need to track time in the hook env itself.
A callback could be provided that prints a timestamp and the shrink success/failure counts every 10 seconds. (Should that be the default for shrink_post?)
Where available, the time tracking should use clock_gettime(CLOCK_MONOTONIC, &time);.
The shrink hooks' info structs should probably also track time spent shrinking so far (in milliseconds).
A
shrink_pre
hook that halts shrinking after 10 minutes should be only a few lines of code, and shouldn't need to track time in the hook env itself.A callback could be provided that prints a timestamp and the shrink success/failure counts every 10 seconds. (Should that be the default for
shrink_post
?)Where available, the time tracking should use
clock_gettime(CLOCK_MONOTONIC, &time);
.