We have already discussed, to an extent, what latencies (delays) are and how to measure scheduling latency in the companion guide Linux Kernel Programming - Chapter 11, The CPU Scheduler – Part 2, under the Latency and its measurement section. Here, we'll look at more aspects of system latencies and their measurement.
As you already know, procfs is a rich source of information; we've already seen that both the number of hardirqs and softirqs that are generated per CPU core can be viewed via the /proc/interrupts and /proc/softirqs (pseudo) files. Similar information is available via /proc/stat.