From 7cae8ed0e420173b17aec11329411d4284de32cd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 3 May 2022 13:48:05 +0200 Subject: ASAP::O: Add profiling bits --- src/im-asapo.c | 3 +++ src/im-sandbox.c | 2 ++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/im-asapo.c b/src/im-asapo.c index f336a735..48a32ee4 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -39,6 +39,7 @@ #include #include +#include #include "im-asapo.h" @@ -262,8 +263,10 @@ void *im_asapo_fetch(struct im_asapo *a, size_t *pdata_size, meta = asapo_new_handle(); data = asapo_new_handle(); + profile_start("asapo-get-next"); asapo_consumer_get_next(a->consumer, a->group_id, &meta, &data, a->stream, &err); + profile_end("asapo-get-next"); if ( asapo_error_get_type(err) == kEndOfStream ) { select_next_stream(a); asapo_free_handle(&err); diff --git a/src/im-sandbox.c b/src/im-sandbox.c index 158da59b..6e4b7fcd 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -476,10 +476,12 @@ static int run_work(const struct index_args *iargs, Stream *st, /* Temporary (?) abuse of "zmq_data", even though * data comes via ASAP::O */ + profile_start("asapo-fetch"); pargs.zmq_data = im_asapo_fetch(asapostuff, &pargs.zmq_data_size, &filename, &event); + profile_end("asapo-fetch"); if ( pargs.zmq_data != NULL ) { ok = 1; -- cgit v1.2.3