scalpels/scripts/rpc-count.stp
Kun Huang c009cff9a4 add rpc count tracer
Change-Id: Ied86a60dad36661736a47ac4fa6d42f609582c9d
2015-11-04 23:57:42 +08:00

15 lines
323 B
Plaintext
Executable File

#!/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;
}