Skip to content

Commit

Permalink
[ #4457 ] Added a separate benchmarking "phase" for compaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
nad committed Feb 20, 2020
1 parent 693bd11 commit 24d7750
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/full/Agda/Benchmarking.hs
Expand Up @@ -60,6 +60,8 @@ data Phase
-- ^ Subphase for 'Termination'.
| ModuleName
-- ^ Subphase for 'Import'.
| Compaction
-- ^ Subphase for 'Deserialization': compacting interfaces.
| BuildInterface
-- ^ Subphase for 'Serialization'.
| Sort
Expand Down
3 changes: 2 additions & 1 deletion src/full/Agda/TypeChecking/Serialise.hs
Expand Up @@ -193,7 +193,8 @@ decode s = do
-- "Compact" the interfaces (without breaking sharing) to
-- reduce the amount of memory that is traversed by the
-- garbage collector.
(liftIO (Just . C.getCompact <$> C.compactWithSharing x))
(Bench.billTo [Bench.Deserialization, Bench.Compaction] $
liftIO (Just . C.getCompact <$> C.compactWithSharing x))
#endif
(return (Just x))
Left err -> do
Expand Down

0 comments on commit 24d7750

Please sign in to comment.