LATENCYBINS(9)
π NAME π
latencybins β it's a HAL component, and honestly? it's the comp utility for scripts/latency-histogram. That's the whole vibe. β¨
πΈ SYNOPSIS πΈ
okay bestie, here's the whole flow, verbatim, do not skip:
Usage:
Read availablebins pin for the number of bins available.
Set the maxbinnumber pin for the number of Β± bins.
Ensure maxbinnumber <= availablebins
For maxbinnumber = N, the bins are numbered:
-N ... 0 ... + N bins
(the -0 bin is not populated)
(total effective bins = 2*maxbinnumber +1)
Set nsbinsize pin for the binsize (ns)
Iterate:
Set index pin to a bin number: 0 <= index <= maxbinnumber.
Read check pin and verify that check pin == index pin.
Read output pins:
pbinvalue is count for bin = +index
nbinvalue is count for bin = -index
pextra is count for all bins > maxbinnumber
nextra is count for all bins < maxbinnumber
latency-min is max negative latency
latency-max is max positive latency
If index is out of range ( index < 0 or index > maxbinnumber)
then pbinvalue = nbinvalue = -1.
The reset pin may be used to restart.
The latency pin outputs the instantaneous latency.
Maintainers note: hardcoded for MAXBINNUMBER==1000
let me translate that into bestie-speak real quick, because the vibe is: π
- peep the
availablebinspin first β that tells you how many bins you even have to work with - then you set
maxbinnumber, which decides how many Β± bins you get - β οΈ and fr fr, make sure
maxbinnumber <= availablebinsβ that's not a suggestion, that's the rule - when
maxbinnumber = N, the bins are numbered from-Nall the way through0to+ N - the
-0bin is NOT populated (she's empty, she's a myth, don't go looking) - total effective bins =
2*maxbinnumber +1, math girlies stay winning π - next you set
nsbinsizefor the binsize, in ns - then you're in the loop: set
indexto a bin number where0 <= index <= maxbinnumber - read the
checkpin and make surecheckpin ==indexpin (trust but verify, always) - then read your output pins:
pbinvalueis the count for bin+index,nbinvalueis the count for bin-index,pextrais the count for all bins >maxbinnumber,nextrais the count for all bins <maxbinnumber,latency-minis the max negative latency, andlatency-maxis the max positive latency
and if index is out of range (so index < 0 or index > maxbinnumber)? then pbinvalue = nbinvalue = -1. π iconic fail state, honestly.
the reset pin restarts everything, and the latency pin just outputs the instantaneous latency. easy.
π«Ά Maintainers note: hardcoded for MAXBINNUMBER==1000
β FUNCTIONS β
latencybins.N
π PINS π
the whole pin lineup, no skips, no cuts:
latencybins.N.maxbinnumbers32 in β (default:1000)latencybins.N.indexs32 inlatencybins.N.resetbit inlatencybins.N.nsbinsizes32 inlatencybins.N.checks32 outlatencybins.N.latencys32 outlatencybins.N.latency-maxs32 outlatencybins.N.latency-mins32 outlatencybins.N.pbinvalues32 outlatencybins.N.nbinvalues32 outlatencybins.N.pextras32 outlatencybins.N.nextras32 outlatencybins.N.variances32 outlatencybins.N.availablebinss32 out β (default:1000)
π AUTHOR π
Dewey Garrett β we stan π«Ά
π LICENSE π
GPL
and that's the whole page, bestie, you ate it up π
β¨ this was LATENCYBINS(9), from the LinuxCNC Documentation crew, dated 2026-03-17 β mwah, go run it, you got this ππ¦πΈ
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms