silentbicycle / theft

property-based testing for C: generate input to find obscure bugs, then reduce to minimal failing input
ISC License
611 stars 31 forks source link

Tracking shrinking time #15

Open silentbicycle opened 7 years ago

silentbicycle commented 7 years ago

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);.