Branch Coverage

Event.xs
Criterion Covered Total %
branch 104 222 46.8


line true false branch
53 0 5 PUSHMARK(SP);
54 0 5 XPUSHs(msg);
76 0 19 PUSHMARK(SP);
77 0 19 XPUSHs(msg);
178 0 0 while (entry = hv_iternext(ohv)) {
187 0 0 if (!wa->FALLBACK)
200 0 0 if (!StatsInstalled)
216 0 0 if (pipe(fds) != 0) croak("pipe");
249 0 0 } while(elapse < sec);
378 5 8 pe_unloop(items? ST(0) : &PL_sv_undef);
383 1 0 pe_unloop_all(items? ST(0) : &PL_sv_undef);
389 24 0 if (!svp || !*svp || !SvIOK(*svp))
24 0 if (!svp || !*svp || !SvIOK(*svp))
0 24 if (!svp || !*svp || !SvIOK(*svp))
391 24 0 api.NVtime = INT2PTR(NV(*)(), SvIV(*svp));
418 0 30 if (!AllWatchers.next)
421 3181 30 while (ev) {
422 3 3178 XPUSHs(watcher_2sv(ev));
431 0 1 if (!Idle.prev)
434 0 1 while (ev) {
435 0 0 XPUSHs(watcher_2sv(ev));
444 12 1 for (fx = CurCBFrame; fx >= 0; fx--) {
446 0 12 XPUSHs(watcher_2sv(ev));
447 12 0 if (GIMME_V != G_ARRAY)
1 11 if (GIMME_V != G_ARRAY)
459 0 0 if (items == 1) {
463 0 0 else if (items == 2) {
464 0 0 if (SvNIOK(ST(1))) {
466 0 0 ev->hits += SvIV(ST(1));
470 0 0 if (ev->up != wa)
481 0 21 if (items == 1) maxtm = SvNV(ST(0));
0 0 if (items == 1) maxtm = SvNV(ST(0));
491 2 119 if (!ActiveWatchers)
493 106142 110 while (ExitLevel >= LoopLevel && ActiveWatchers) {
106135 7 while (ExitLevel >= LoopLevel && ActiveWatchers) {
497 94939 11192 FREETMPS;
513 1 3 while (pe_empty_queue(prio));
522 0 0 if (prio < 0 || prio >= PE_QUEUES)
0 0 if (prio < 0 || prio >= PE_QUEUES)
525 0 0 for (xx=0; xx <= prio; xx++)
526 0 0 if (max < QueueTime[xx]) max = QueueTime[xx];
527 0 0 XPUSHs(max? sv_2mortal(newSVnv(max)) : &PL_sv_undef);
0 0 XPUSHs(max? sv_2mortal(newSVnv(max)) : &PL_sv_undef);
535 0 94103 XPUSHs(sv_2mortal(events_mask_2sv(((pe_ioevent*)THIS)->got)));
542 0 3 XPUSHs(((pe_datafulevent*)THIS)->data);
564 0 0 if (--WarnCounter >= 0) warn("'mom' renamed to 'w'");
565 0 0 XPUSHs(watcher_2sv(THIS->up));
570 0 94750 XPUSHs(watcher_2sv(THIS->up));
575 0 3 XPUSHs(sv_2mortal(newSViv(THIS->hits)));
580 0 4 XPUSHs(sv_2mortal(newSViv(THIS->prio)));
591 3818 0 if (THIS->mysv) {
593 3818 0 if (WaCANDESTROY(THIS)) /*mysv*/
3193 625 if (WaCANDESTROY(THIS)) /*mysv*/
3193 0 if (WaCANDESTROY(THIS)) /*mysv*/
602 4 0 if (GIMME_V == G_ARRAY) {
2 2 if (GIMME_V == G_ARRAY) {
604 5 2 while (ev) {
605 0 5 XPUSHs(event_2sv(ev));
609 0 2 XPUSHs(THIS->events.next->self? &PL_sv_yes : &PL_sv_no);
1 1 XPUSHs(THIS->events.next->self? &PL_sv_yes : &PL_sv_no);
626 0 0 if (items == 2) {
627 0 0 if (sv_true(ST(1)))
667 0 1 XPUSHs(sv_2mortal(newSViv(THIS->running)));
673 0 0 XPUSHs(boolSV(WaACTIVE(THIS)));
0 0 XPUSHs(boolSV(WaACTIVE(THIS)));
679 0 0 XPUSHs(boolSV(WaSUSPEND(THIS)));
0 0 XPUSHs(boolSV(WaSUSPEND(THIS)));
685 0 2 XPUSHs(boolSV(WaCANCELLED(THIS)));
1 1 XPUSHs(boolSV(WaCANCELLED(THIS)));
691 3809 3 _watcher_callback(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
698 0 2 _watcher_cbtime(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
705 3818 14 _watcher_desc(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
712 0 1 _watcher_debug(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
719 7553 10 _watcher_priority(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
726 1 1 _watcher_reentrant(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
733 3736 1 _watcher_repeat(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
740 0 1 _watcher_max_cb_tm(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
750 0 0 if (!SvROK(temple)) croak("Bad template");
751 0 0 XPUSHs(watcher_2sv(pe_tied_allocate(gv_stashsv(clname, 1),
758 0 0 _timeable_hard(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
765 0 0 _tied_at(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
772 0 0 _tied_flags(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
782 0 13 if (!SvROK(temple)) croak("Bad template");
783 0 13 XPUSHs(watcher_2sv(pe_idle_allocate(gv_stashsv(clname, 1),
790 0 1 _timeable_hard(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
797 0 1 _idle_max_interval(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
804 0 1 _idle_min_interval(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
814 0 46 XPUSHs(watcher_2sv(pe_timer_allocate(gv_stashsv(clname, 1),
821 44 3 _timer_at(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
828 0 0 _timeable_hard(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
835 41 1 _timer_interval(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
845 0 3743 if (!SvROK(temple)) croak("Bad template");
846 0 3743 XPUSHs(watcher_2sv(pe_io_allocate(gv_stashsv(clname, 1),
853 6 0 _io_poll(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
860 6 94098 _io_handle(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
867 3733 1 _io_timeout(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
874 6 0 _io_timeout_cb(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
884 0 10 XPUSHs(watcher_2sv(pe_var_allocate(gv_stashsv(clname, 1),
891 7 1 _var_variable(THIS, items == 2? ST(1) : 0); /* don't mortalcopy!! */
898 2 0 _var_events(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
908 0 4 XPUSHs(watcher_2sv(pe_signal_allocate(gv_stashsv(clname, 1),
915 1 1 _signal_signal(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
925 0 1 XPUSHs(watcher_2sv(pe_group_allocate(gv_stashsv(clname, 1),
932 1 0 _group_timeout(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
939 13 0 _group_add(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
946 0 0 _group_del(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
956 0 2 XPUSHs(watcher_2sv(pe_generic_allocate(gv_stashsv(clname, 1),
963 6 0 _generic_source(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
973 0 1 if (!SvROK(temple)) croak("Bad template");
974 0 1 XPUSHs(genericsrc_2sv(pe_genericsrc_allocate(gv_stashsv(clname, 1),
988 2 0 pe_genericsrc_event(THIS,