File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,6 +226,13 @@ let private checkLedgerAgeSLA (percentiles: (Peer * float * float) list) (target
226226 let tHi = tf * 1.20
227227 let p99Max = tf * 2.0
228228 let mutable ok = true
229+ let formatDeviation value =
230+ let deviation = ( value - tf) / tf * 100.0
231+
232+ if deviation >= 0.0 then
233+ sprintf " +%.1f %%" deviation
234+ else
235+ sprintf " %.1f %%" deviation
229236
230237 for peer, p75, p99 in percentiles do
231238 let peerOk = p75 >= tLo && p75 < tHi && p99 <= p99Max
@@ -240,6 +247,18 @@ let private checkLedgerAgeSLA (percentiles: (Peer * float * float) list) (target
240247
241248 if not peerOk then ok <- false
242249
250+ if not percentiles.IsEmpty then
251+ let avgP75 = percentiles |> List.averageBy ( fun ( _ , p75 , _ ) -> p75)
252+ let avgP99 = percentiles |> List.averageBy ( fun ( _ , _ , p99 ) -> p99)
253+
254+ LogInfo
255+ " all peers T=%d ms avg-p75=%.0f (%s vs target) avg-p99=%.0f (%s vs target)"
256+ targetMs
257+ avgP75
258+ ( formatDeviation avgP75)
259+ avgP99
260+ ( formatDeviation avgP99)
261+
243262 ok
244263
245264let minBlockTimeTest ( context : MissionContext ) ( baseLoadGen : LoadGen ) ( setupCfg : LoadGen option ) =
You can’t perform that action at this time.
0 commit comments