benchdiff icon indicating copy to clipboard operation
benchdiff copied to clipboard

Interrupting benchmark run persists partial cache file

Open FiloSottile opened this issue 4 years ago • 2 comments

I stated a benchdiff run, and then realized I had gotten it wrong and stopped it with ^C.

When I reran it, it said "skipping benchmark for ref "HEAD^" because output file exists" although the file in the cache was just a couple lines from the first benchmark.

Instead, the output should go to a temporary file and only get moved to the cache upon success.

FiloSottile avatar Sep 22 '21 13:09 FiloSottile

Relatedly, interrupting a run also leaves behind a git worktree. It would be nice if the signal was caught and a cleanup step run anyway.

FiloSottile avatar Sep 22 '21 13:09 FiloSottile

Thanks. I haven't run across this before, probably because I typically use --force-base.

The next few weeks are busy for me, so I don't think I will have time to get to this for a while. If you can identify a fix, I can make time for a PR review. Otherwise it may be a while before this is fixed.

WillAbides avatar Sep 22 '21 14:09 WillAbides