Keep Zipped Heap Dumps On Objects Growing
class KeepZippedHeapDumpsOnObjectsGrowing(deleteFile: (File) -> Unit = { it.delete() }) : HeapDumpStorageStrategy
Keeps the heap dumps until we're done diffing, then on completion creates a zip for each heap dump if there are growing object, and delete all the source heap dumps. This is useful if you intend to upload the heap dumps on failure in CI and you want to keep disk space, network usage and cloud storage low. Zipped heap dumps are typically 4x smaller so this is worth it, although the trade off is that zipping can add a few seconds per heap dump to the runtime duration of a test.