Skip to content

Commit

Permalink
Add a separate emitter with time stamp for profiling.
Browse files Browse the repository at this point in the history
  • Loading branch information
thealmarty committed Jul 20, 2021
1 parent c88ecef commit aabf207
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -474,7 +474,17 @@ spendBudgetCek = let (CekBudgetSpender spend) = ?cekBudgetSpender in spend
emitCek :: GivenCekEmitter s => String -> CekM uni fun s ()
emitCek str =
let mayLogsRef = ?cekEmitter
withTime = str ++ (show $ unsafePerformIO getCurrentTime)
in case mayLogsRef of
Nothing -> pure ()
Just logsRef -> CekCarryingM $ modifySTRef logsRef (`DList.snoc` str)

emitCekWithTime :: GivenCekEmitter s => String -> CekM uni fun s ()
emitCekWithTime str =
let mayLogsRef = ?cekEmitter
withTime =
"[" ++
(show $ unsafePerformIO getCurrentTime) ++
"]" ++ str
in case mayLogsRef of
Nothing -> pure ()
Just logsRef ->
Expand Down

0 comments on commit aabf207

Please sign in to comment.