Skip to content

Commit

Permalink
fix(sut): increase wake up retries
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-stevan-andjelkovic committed Mar 10, 2022
1 parent 25e229b commit ec14931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/sut/dumblog/src/Dumblog/Journal/Blocker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ blockUntil (Blocker b) key = do

wakeUp :: forall a. Blocker a -> Int -> a -> IO Bool
wakeUp (Blocker b) key response = do
mmv <- go 10
mmv <- go 100
case mmv of
Nothing -> pure False
Just mv -> do
Expand Down
15 changes: 8 additions & 7 deletions src/sut/dumblog/src/Dumblog/Metrics/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module Dumblog.Metrics.Main where

import Data.Maybe (fromMaybe)
import Control.Monad (forever)
import Control.Concurrent (threadDelay)
import Text.Printf (printf)
Expand All @@ -25,13 +26,13 @@ metricsMain = forever $ do
m9999 <- percentile metrics ServiceTime 99.99
mMax <- percentile metrics ServiceTime 100
putStrLn "Service time:"
putStrLn (maybe "N/A" (printf " min %10.2f µs") mMin)
putStrLn (maybe "N/A" (printf " med %10.2f µs") mMed)
putStrLn (maybe "N/A" (printf " 90 %10.2f µs") m90)
putStrLn (maybe "N/A" (printf " 99 %10.2f µs") m99)
putStrLn (maybe "N/A" (printf " 99.9 %10.2f µs") m999)
putStrLn (maybe "N/A" (printf " 99.99 %10.2f µs") m9999)
putStrLn (maybe "N/A" (printf " max %10.2f µs") mMax)
printf " min %10.2f µs\n" (fromMaybe 0 mMin)
printf " med %10.2f µs\n" (fromMaybe 0 mMed)
printf " 90 %10.2f µs\n" (fromMaybe 0 m90)
printf " 99 %10.2f µs\n" (fromMaybe 0 m99)
printf " 99.9 %10.2f µs\n" (fromMaybe 0 m999)
printf " 99.99 %10.2f µs\n" (fromMaybe 0 m9999)
printf " max %10.2f µs\n" (fromMaybe 0 mMax)
cnt <- count metrics ServiceTime
putStrLn (printf " count %10d" cnt)
threadDelay 1_000_000
Expand Down

0 comments on commit ec14931

Please sign in to comment.