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
172
172
where
173
173
cdfLogLineRate = cdf stdCentiles lineRates
174
174
175
+ hostLogs =
176
+ rlHostLogs
177
+ & Map. elems
178
+
175
179
(,) logObjectsEmitted textLinesEmitted =
176
- rlHostLogs
177
- & Map. toList
178
- & fmap ((hlRawLogObjects &&& hlRawLines) . snd )
180
+ hostLogs
181
+ & fmap (hlRawLogObjects &&& hlRawLines)
179
182
& unzip
183
+
180
184
objLists = rlLogs rl <&> snd
181
185
182
186
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)
185
189
runtimes :: [NominalDiffTime ]
186
190
runtimes = zipWith diffUTCTime losLasts losFirsts
187
191
lineRates = zipWith (/) (textLinesEmitted <&> fromIntegral )
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ data HostLogs a
114
114
, hlLogs :: (JsonLogfile , a )
115
115
, hlFilteredSha256 :: Hash
116
116
, hlProfile :: [ProfileEntry I ]
117
+ , hlRawFirstAt :: Maybe UTCTime
118
+ , hlRawLastAt :: Maybe UTCTime
117
119
}
118
120
deriving (Generic )
119
121
Original file line number Diff line number Diff line change 572
572
then remanifest_reasons+=(" $( red logs modified after manifest) " )
573
573
fi
574
574
575
- echo $( ls 2> /dev/null --sort=time $dir /node-* /* .json $dir /node-* /stdout $run_logs )
576
-
577
575
if test ${# remanifest_reasons[*]} = 0
578
576
then progress " analyse" " log manifest exists and is up to date"
579
577
else progress " analyse" " assembling log manifest: ${remanifest_reasons[*]} "
623
621
624
622
done
625
623
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
626
631
}
627
632
fi
628
633
You can’t perform that action at this time.
0 commit comments