scalpels/scripts/model-save.stp
Kun Huang 272792ef58 add model save tracer
Change-Id: Idf8e264a4328acdca0fa435f6d9b9b346a2152d4
2015-11-04 00:23:47 +08:00

15 lines
301 B
Plaintext
Executable File

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