From 15ea62a5466114812ef9fc2b9e2068bbba770bf8 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 18 Jul 2023 23:56:20 +0000 Subject: [PATCH] Trace all the async things. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4353 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.db.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ssb.db.c b/src/ssb.db.c index f51e9db4..4a767596 100644 --- a/src/ssb.db.c +++ b/src/ssb.db.c @@ -461,12 +461,17 @@ typedef struct _blob_store_work_t static void _tf_ssb_db_blob_store_work(uv_work_t* work) { blob_store_work_t* blob_work = work->data; + tf_trace_t* trace = tf_ssb_get_trace(blob_work->ssb); + tf_trace_begin(trace, "blob_store_work"); tf_ssb_db_blob_store(blob_work->ssb, blob_work->blob, blob_work->size, blob_work->id, sizeof(blob_work->id), &blob_work->is_new); + tf_trace_end(trace); } static void _tf_ssb_db_blob_store_after_work(uv_work_t* work, int status) { blob_store_work_t* blob_work = work->data; + tf_trace_t* trace = tf_ssb_get_trace(blob_work->ssb); + tf_trace_begin(trace, "blob_store_after_work"); if (status != 0) { tf_printf("tf_ssb_db_blob_store_async -> uv_queue_work failed asynchronously: %s\n", uv_strerror(status)); @@ -475,6 +480,7 @@ static void _tf_ssb_db_blob_store_after_work(uv_work_t* work, int status) { blob_work->callback(status == 0 ? blob_work->id : NULL, blob_work->is_new, blob_work->user_data); } + tf_trace_end(trace); tf_free(blob_work); }