moar gauge changes
::
=. metrics.state metrics.-
=. live.state live.-
- ::
resend-lost
::
^- $: [found=? metrics=pump-metrics]
::
++ num-retry-slots
^- @ud
- (max 1 (div max-live 10))
+ max-live
:: +on-skipped-packet: adjust metrics based on a misordered ack
::
++ on-skipped-packet
^- pump-metrics
::
%_ metrics
- max-live (max 1 (div max-live 2))
skipped +(skipped)
==
:: +on-ack: adjust metrics based on a packet getting acknowledged
|= sent-packet-state
^- pump-metrics
::
+ =? metrics (gth skipped 0)
+ ~& %skipped^skipped
+ %_ metrics
+ skipped 0
+ max-live (max 1 (div max-live 2))
+ ==
+ ::
%_ metrics
- num-live (dec (max 1 num-live))
+ num-live (dec num-live)
max-live +(max-live)
rtt (smooth-rtt-since sent-date)
==
