One of the sample processors (volume control) demonstrates how to detect (and filter) events that come through it when their rate exceeds a user-defined threshold. Instead of filtering those events, you could simply have the processor produce alerts when the threshold exceeds the detected value. However, like all of the bundled samples it is meant for instructional purposes. Thus it is missing some of the checks to make sure it is not consuming excessive amounts of memory, error checking, and other things that are part of a complete solution.