xref: /aosp_15_r20/external/bcc/examples/tracing/biolatpcts_example.txt (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1*387f9dfdSAndroid Build Coastguard WorkerDemonstrations of biolatpcts.py, the Linux eBPF/bcc version.
2*387f9dfdSAndroid Build Coastguard Worker
3*387f9dfdSAndroid Build Coastguard Worker
4*387f9dfdSAndroid Build Coastguard WorkerThis traces block I/O and uses layered percpu arrays to bucket the completion
5*387f9dfdSAndroid Build Coastguard Workerlatencies. Latency percentiles are calculated periodically from the buckets.
6*387f9dfdSAndroid Build Coastguard Worker
7*387f9dfdSAndroid Build Coastguard Worker# ./biolatpcts.py
8*387f9dfdSAndroid Build Coastguard Workerp50=595.0us p75=685.0us p90=1500.0us p99=2500.0us
9*387f9dfdSAndroid Build Coastguard Workerp50=55.0us p75=95.0us p90=305.0us p99=2500.0us
10*387f9dfdSAndroid Build Coastguard Workerp50=385.0us p75=655.0us p90=1500.0us p99=2500.0us
11*387f9dfdSAndroid Build Coastguard Worker[...]
12*387f9dfdSAndroid Build Coastguard Worker
13*387f9dfdSAndroid Build Coastguard WorkerThe latency is measured from I/O request to the device, to the device
14*387f9dfdSAndroid Build Coastguard Workercompletion. This excludes latency spent queued in the OS.
15*387f9dfdSAndroid Build Coastguard Worker
16*387f9dfdSAndroid Build Coastguard WorkerThis is a simplified example to demonstrate the calculation of latency
17*387f9dfdSAndroid Build Coastguard Workerpercentiles. See tools/biolatpcts.py for the full utility.
18