Log any alarm we call more than 10,000 times a second (probably indicates a bug)

This commit is contained in:
Jeremy Lakeman 2013-11-27 12:27:15 +10:30
parent 844afcff0e
commit 62cd8c7555

View File

@ -168,8 +168,8 @@ int fd_showstats()
while(stats!=NULL){ while(stats!=NULL){
/* If a function spends more than 1 second in any /* If a function spends more than 1 second in any
notionally 3 second period, then dob on it */ notionally 3 second period, then dob on it */
if (stats->total_time>1000 if ((stats->total_time>1000 || stats->calls > 10000)
&&strcmp(stats->name,"Idle (in poll)")) && strcmp(stats->name,"Idle (in poll)"))
fd_showstat(&total,stats); fd_showstat(&total,stats);
stats = stats->_next; stats = stats->_next;
} }