File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -172,16 +172,20 @@ computeSummary sumAnalysisTime
172172 where
173173 cdfLogLineRate = cdf stdCentiles lineRates
174174
175+ hostLogs =
176+ rlHostLogs
177+ & Map. elems
178+
175179 (,) logObjectsEmitted textLinesEmitted =
176- rlHostLogs
177- & Map. toList
178- & fmap ((hlRawLogObjects &&& hlRawLines) . snd )
180+ hostLogs
181+ & fmap (hlRawLogObjects &&& hlRawLines)
179182 & unzip
183+
180184 objLists = rlLogs rl <&> snd
181185
182186 losFirsts , losLasts :: [UTCTime ]
183- losFirsts = objLists <&> loAt . Prelude. head
184- losLasts = objLists <&> loAt . Prelude. last
187+ losFirsts = hostLogs <&> ( \ HostLogs {hlLogs, hlRawFirstAt} -> fromMaybe ( loAt $ Prelude. head $ snd hlLogs) hlRawFirstAt)
188+ losLasts = hostLogs <&> ( \ HostLogs {hlLogs, hlRawLastAt} -> fromMaybe ( loAt $ Prelude. last $ snd hlLogs) hlRawLastAt)
185189 runtimes :: [NominalDiffTime ]
186190 runtimes = zipWith diffUTCTime losLasts losFirsts
187191 lineRates = zipWith (/) (textLinesEmitted <&> fromIntegral )
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ data HostLogs a
114114 , hlLogs :: (JsonLogfile , a )
115115 , hlFilteredSha256 :: Hash
116116 , hlProfile :: [ProfileEntry I ]
117+ , hlRawFirstAt :: Maybe UTCTime
118+ , hlRawLastAt :: Maybe UTCTime
117119 }
118120 deriving (Generic )
119121
Original file line number Diff line number Diff line change 572572 then remanifest_reasons+=(" $( red logs modified after manifest) " )
573573 fi
574574
575- echo $( ls 2> /dev/null --sort=time $dir /node-* /* .json $dir /node-* /stdout $run_logs )
576-
577575 if test ${# remanifest_reasons[*]} = 0
578576 then progress " analyse" " log manifest exists and is up to date"
579577 else progress " analyse" " assembling log manifest: ${remanifest_reasons[*]} "
623621
624622 done
625623 wait
624+
625+ for mach in $( jq_tolist ' .rlHostLogs | keys' $run_logs )
626+ do jq_fmutate " $run_logs " '
627+ .rlHostLogs["' " $mach " ' "].hlRawFirstAt = ' " $( cat $adir /logs-$mach .flt.json | head -n1 | jq .at) " '
628+ | .rlHostLogs["' " $mach " ' "].hlRawLastAt = ' " $( cat $adir /logs-$mach .flt.json | tail -n1 | jq .at) " '
629+ '
630+ done
626631 }
627632 fi
628633
You can’t perform that action at this time.
0 commit comments