#!/usr/bin/stap global count = 0; global old_count = 0; probe python.function.entry { if ((funcname == "call" || funcname == "cast") && isinstr(filename, "oslo_messaging/rpc/client.py") ) { count = count + 1; } } probe timer.ms(1000) { new_count = count - old_count; printf("%d\n", new_count); old_count = count; }