add profiling of event frequencies (kind of)