Skip to content

Commit 6536e03

Browse files
mpickeringBodigrim
authored andcommitted
Add benchmark for deserialising TarIndex
This improves from: deserialise index: OK 10.0 ms ± 246 μs to: deserialise index: OK 527 μs ± 43 μs Due to the previous commit
1 parent af3d0c7 commit 6536e03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bench/Main.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ benchmarks =
3030

3131
, env loadTarEntries $ \entries ->
3232
bench "unpack" (nfIO $ withSystemTempDirectory "tar-bench" $ \baseDir -> Tar.unpack baseDir entries)
33+
34+
, env (fmap TarIndex.serialise loadTarIndex) $ \tarfile ->
35+
bench "deserialise index" (nf TarIndex.deserialise tarfile)
3336
]
3437

3538
loadTarFile :: IO BS.ByteString

0 commit comments

Comments
 (0)