Resolve "Benchmark the Snapshot code"
These are the results when the current code is run:
BenchmarkSnapshot10MB-4 2000 557676 ns/op
BenchmarkSnapshot100MB-4 200 6556398 ns/op
BenchmarkSnapshot1GB-4 20 64727543 ns/op
BenchmarkSnapshot10GB-4 2 607662104 ns/op
It looks a lot slower than expected but I'm not sure if those results are 100% accurate. In testing builds the modules.SectorSize
is a 1/1000th of the one in a release build. That means that the files contain 1000x the sector metadata than they usually would.
The following are the results for creating a snapshot of a file which only contains an empty staticChunks
slice without any pieces added to it.
BenchmarkSnapshot10MB-4 10000 180062 ns/op
BenchmarkSnapshot100MB-4 1000 1980898 ns/op
BenchmarkSnapshot1GB-4 100 20717949 ns/op
BenchmarkSnapshot10GB-4 5 220090054 ns/op
Closes #3353 (closed)
Edited by Christopher Schinnerl