Branch Coverage

lib/Event/Stats.xs
Criterion Covered Total %
branch 62 130 47.6


line true false branch
33 1 7319 if (!sn->live) return;
67 400 20 for (xx=0; xx < PE_STAT_I1; xx++) {
73 400 20 for (xx=0; xx < PE_STAT_I2; xx++) {
112 0 18 if (sec <= 1)
114 18 0 if (sec <= PE_STAT_SECONDS * PE_STAT_I1) {
116 90 18 for (xx=0; xx <= (sec-1) / PE_STAT_SECONDS; xx++) {
125 0 0 if (sec <= PE_STAT_SECONDS * PE_STAT_I1 * PE_STAT_I2) {
127 0 0 for (xx=0; xx <= (sec-1) / (PE_STAT_SECONDS*PE_STAT_I1); xx++) {
143 0 16 if (st->xsec == 0) {
149 0 0 for (xx=0; xx < PE_STAT_I1; xx++) {
171 10 3 while (ev) {
172 3 7 if (!ev->stats) {
191 7240 79 if (frame == -1) {
196 4 75 if (frame >= RefTimes) {
198 4 0 if (!RefTime) {
199 0 4 Newz(0, RefTime, cnt, snap);
202 0 0 Renew(RefTime, cnt, snap);
203 0 0 for (xx=RefTimes; xx < cnt; xx++)
212 52 27 if (EnforceMaxCBTime && max_tm)
52 0 if (EnforceMaxCBTime && max_tm)
219 2 1 if (EnforceMaxCBTime)
227 51 3 if (EnforceMaxCBTime && sn->max_tm)
51 0 if (EnforceMaxCBTime && sn->max_tm)
236 3391 3926 if (EnforceMaxCBTime)
238 77 7240 if (wa && !wa->stats) {
8 69 if (wa && !wa->stats) {
243 77 7240 pe_stat_record(wa? wa->stats : &idleStats, sn->elapse);
250 1 1 if (EnforceMaxCBTime)
254 1 1 if (!wa->stats) {
274 0 4 if (Stats < 0)
276 0 4 if (!(!prev ^ !Stats))
278 4 0 if (Stats) {
282 8 4 while (ev) {
283 0 8 if (ev->stats)
290 4 0 if (!RollTimer)
318 0 4 I_EVENT_API(HvNAME(stash));
4 0 I_EVENT_API(HvNAME(stash));
0 4 I_EVENT_API(HvNAME(stash));
0 0 I_EVENT_API(HvNAME(stash));
0 0 I_EVENT_API(HvNAME(stash));
0 0 I_EVENT_API(HvNAME(stash));
0 0 I_EVENT_API(HvNAME(stash));
0 0 I_EVENT_API(HvNAME(stash));
0 0 I_EVENT_API(HvNAME(stash));
326 0 0 XPUSHs(boolSV(EnforceMaxCBTime));
0 0 XPUSHs(boolSV(EnforceMaxCBTime));
334 0 1 XPUSHs(boolSV(EnforceMaxCBTime));
0 1 XPUSHs(boolSV(EnforceMaxCBTime));
335 1 0 if (!EnforceMaxCBTime ^ !yes)
336 1 0 use_stats(yes? 1:-1);
338 0 1 if (!yes) alarm(0);
345 0 0 if (sec <= 0)
347 0 0 else if (sec < PE_STAT_SECONDS * PE_STAT_I1)
350 0 0 else if (sec < PE_STAT_SECONDS * PE_STAT_I1 * PE_STAT_I2)
366 0 0 if (!Stats) croak("Event::Stats are not enabled");
368 0 0 XPUSHs(sv_2mortal(newSViv(ran)));
369 0 0 XPUSHs(sv_2mortal(newSViv(die)));
370 0 0 XPUSHs(sv_2mortal(newSVnv(elapse)));
379 0 0 if (!Stats) croak("Event::Stats are not enabled");
381 0 0 XPUSHs(sv_2mortal(newSVnv(elapse)));
405 0 21 if (!Stats)
408 18 3 if (THIS->stats)
412 0 21 XPUSHs(sv_2mortal(newSViv(ran)));
413 0 21 XPUSHs(sv_2mortal(newSViv(die)));
414 0 21 XPUSHs(sv_2mortal(newSVnv(elapse)));