Module bench_tmp_dir

Source

Structs§

BenchTmpDir
The path to a temporary directory, and [on Linux (because of systems using systemd–Debian from trixie onwards will delete it),] a thread that keeps updating its mtime to prevent deletion. Implements AsRef<Path> and Deref<Target = Path>.

Functions§

bench_tmp_dir
Returns the path to a temporary directory, creating it if necessary and checking ownership if it already exists. The directory is not unique for all processes, but shared for all evobench instances–which is OK both because we only do 1 run at the same time (and take a lock to ensure that), but also because we’re now currently actually also adding the pid to the file paths inside. It is wrapped since it comes with a daemon that keeps updating the directory mtime to prevent deletion by tmp cleaners.
get_fast_and_large_temp_dir_base
Try to find the best place for putting the evobench.log, while avoiding tmp file cleaners like systemd and staying portable. Also returns if the path is pointing to a tmpfs.