sudo bpftrace -p "$PID" -e '
// —— TCPDirect ——
uprobe:/lib/x86_64-linux-gnu/libonload_zf.so.1:zft_send_single {
@zf_start[tid] = nsecs;
}
uretprobe:/lib/x86_64-linux-gnu/libonload_zf.so.1:zft_send_single /@zf_start[tid]/ {
$lat = nsecs - @zf_start[tid];
@h_zft = hist($lat / 1000);
delete(@zf_start[tid]);
}
'
So basically what WHITOUT OVERLAPS and FOR PORTION OF do.
The system time is also interesting in the context of financial data and backtesting, as companies might republish a statement with corrections, and it would help tracking why the system made a decision at a given time.
This bridges the gap to something like xtdb.