ApacheBench

 view release on metacpan or  search on metacpan

src/ApacheBench.xs  view on Meta::CPAN


    hv_store(RETVAL, "warnings", 8, newSVpv(registry->warn_and_error, 0), 0);
    hv_store(RETVAL, "total_time", 10,
             newSVnv(timedif(registry->endtime, registry->starttime)), 0);
    hv_store(RETVAL, "bytes_received", 14,
             newSVnv(registry->total_bytes_received), 0);
    hv_store(RETVAL, "started", 7, newSViv(total_started), 0);
    hv_store(RETVAL, "good", 4, newSViv(total_good), 0);
    hv_store(RETVAL, "failed", 6, newSViv(total_failed), 0);

    OUTPUT:
    RETVAL

src/apachebench/xs_util.c  view on Meta::CPAN


    dSP;
    int count;
    SV *res;

    ENTER;
    SAVETMPS;

    PUSHMARK(SP);
    XPUSHs(sv_2mortal(arg1));
    PUTBACK;

    count = call_sv(function_name, G_SCALAR);

    SPAGAIN;

    if (count == 1)
        res = newSVsv(POPs);
    else
        res = &PL_sv_undef;

    PUTBACK;
    FREETMPS;
    LEAVE;

    return res;
}



( run in 0.350 second using v1.01-cache-2.11-cpan-4e96b696675 )