[OpenSIPS-Users] benchmark bm_start_timer / bm_log_timer across async functions

Jeff Pyle jeff at ugnd.org
Tue Sep 18 21:51:07 EDT 2018


Never mind.  It helps if you bm_start_timer() and bm_stop_timer() with the
same name!



- Jeff

On Tue, Sep 18, 2018 at 5:54 PM Jeff Pyle <jeff at ugnd.org> wrote:

> Hello,
>
> On 2.4.2 I'm running bm_start_timer("db_query_time") right before I call
> async(avp_db_query()), and bm_log_timer("db_query_time") first thing in the
> resume route.  The results are strange:
>
> benchmark (timer db_query_time [1]): 1537307242867591 [
> msgs/total/min/max/avg - LR:
> 1/1537307242867591/4294967295/1537307242867591/1537307242867591.000000 |
> GB: 1/1537307242867591/4294967295/1537307242867591/1537307242867591.000000]
> benchmark (timer db_query_time [1]): 1537307278764967 [
> msgs/total/min/max/avg - LR:
> 1/1537307278764967/4294967295/1537307278764967/1537307278764967.000000 |
> GB: 2/3074614521632558/4294967295/1537307278764967/1537307260816279.000000]
> benchmark (timer db_query_time [1]): 1537307283581219 [
> msgs/total/min/max/avg - LR:
> 1/1537307283581219/4294967295/1537307283581219/1537307283581219.000000 |
> GB: 3/4611921805213777/4294967295/1537307283581219/1537307268404592.250000]
>
> This is with granularity=1 for testing where the actual DB delay was
> probably 40-50ms.  I'm thinking I can't run timers across async functions?
> Or...?
>
>
> Regards,
> Jeff
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180918/b9c7fc7a/attachment.html>


More information about the Users mailing list