Compare commits

..

No commits in common. "a2f268d374982c3987b154bae66bfffb1e383e3b" and "c036dea7f9f91a03f3d068ac9cb3a827961c5db4" have entirely different histories.

2 changed files with 4 additions and 6 deletions

View file

@ -59,7 +59,7 @@ readConfig = do
, confIP = toHostAddress6 . read $ ipString , confIP = toHostAddress6 . read $ ipString
, confDhtPort = read portString , confDhtPort = read portString
, confBootstrapNodes = confBootstrapNodes' , confBootstrapNodes = confBootstrapNodes'
, confStabiliseInterval = 80 * 10^6 , confStabiliseInterval = 60 * 10^6
, confBootstrapSamplingInterval = 180 * 10^6 `div` speedup , confBootstrapSamplingInterval = 180 * 10^6 `div` speedup
, confMaxLookupCacheAge = 300 / fromIntegral speedup , confMaxLookupCacheAge = 300 / fromIntegral speedup
, confJoinAttemptsInterval = 60 * 10^6 `div` speedup , confJoinAttemptsInterval = 60 * 10^6 `div` speedup
@ -69,7 +69,7 @@ readConfig = do
, confRequestRetries = 3 , confRequestRetries = 3
} }
sConf = ServiceConf sConf = ServiceConf
{ confSubscriptionExpiryTime = 12*3600 / fromIntegral speedup { confSubscriptionExpiryTime = fromIntegral 12*3600 / fromIntegral speedup
, confServicePort = read servicePortString , confServicePort = read servicePortString
, confServiceHost = confDomainString , confServiceHost = confDomainString
, confLogfilePath = "../simulationData/logs/" <> confDomainString <> ".log" , confLogfilePath = "../simulationData/logs/" <> confDomainString <> ".log"

View file

@ -100,7 +100,6 @@ instance DHT d => Service PostService d where
statsQueue' <- newTQueueIO statsQueue' <- newTQueueIO
loadStats' <- newTVarIO emptyStats loadStats' <- newTVarIO emptyStats
loggingFile <- openFile (confLogfilePath conf) WriteMode loggingFile <- openFile (confLogfilePath conf) WriteMode
hSetBuffering loggingFile LineBuffering
let let
thisService = PostService thisService = PostService
{ serviceConf = conf { serviceConf = conf
@ -122,7 +121,7 @@ instance DHT d => Service PostService d where
-- log a start message, this also truncates existing files -- log a start message, this also truncates existing files
TxtI.hPutStrLn loggingFile $ Txt.unlines TxtI.hPutStrLn loggingFile $ Txt.unlines
[ "# Starting mock relay implementation" [ "# Starting mock relay implementation"
, "#time stamp ; relay receive rate ;relay delivery rate ;instance publish rate ;instance fetch rate ;total subscriptions" , "#relay receive rate ;relay delivery rate ;instance publish rate ;instance fetch rate ;total subscriptions"
] ]
-- Run 'concurrently_' from another thread to be able to return the -- Run 'concurrently_' from another thread to be able to return the
-- 'PostService'. -- 'PostService'.
@ -842,8 +841,7 @@ evaluateStatsThread serv statsAcc = getPOSIXTime >>= loop
-- later: current (reported) load, target load -- later: current (reported) load, target load
subscriberSum <- sumSubscribers subscriberSum <- sumSubscribers
TxtI.hPutStrLn (logFileHandle serv) $ TxtI.hPutStrLn (logFileHandle serv) $
format (fixed 9 % ";" % fixed 20 % ";" % fixed 20 % ";" % fixed 20 % ";" % fixed 20 % ";" % int ) format (fixed 20 % ";" % fixed 20 % ";" % fixed 20 % ";" % fixed 20 % ";" % int )
(realToFrac now :: Double)
(sum . relayReceiveRates $ rateStats) (sum . relayReceiveRates $ rateStats)
(sum . relayDeliveryRates $ rateStats) (sum . relayDeliveryRates $ rateStats)
(postPublishRate rateStats) (postPublishRate rateStats)