[tracker/miner-fs-limit-requests: 2/3] libtracker-miner: Improve traces in processing pool



commit 894a0c8e5e3d28d022752055cd77ee6d149e077c
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Mar 15 14:18:17 2011 +0100

    libtracker-miner: Improve traces in processing pool

 .../tracker-miner-fs-processing-pool.c             |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs-processing-pool.c b/src/libtracker-miner/tracker-miner-fs-processing-pool.c
index 5ddec99..1e50b67 100644
--- a/src/libtracker-miner/tracker-miner-fs-processing-pool.c
+++ b/src/libtracker-miner/tracker-miner-fs-processing-pool.c
@@ -366,6 +366,10 @@ pool_status_trace_timeout_cb (gpointer data)
 			l = g_list_next (l);
 		}
 	}
+	trace ("(Processing Pool %s) Requests being currently processed: %u (max: %u)",
+	       G_OBJECT_TYPE_NAME (pool->miner),
+	       pool->n_requests,
+	       pool->limit_n_requests);
 	return TRUE;
 }
 #endif /* PROCESSING_POOL_ENABLE_TRACE */
@@ -596,9 +600,6 @@ tracker_processing_pool_sparql_update_cb (GObject      *object,
 
 	task = user_data;
 	pool = task->pool;
-	trace ("(Processing Pool) Finished update of task %p for file '%s'",
-	       task,
-	       task->file_uri);
 
 	/* If we had reached the limit of requests, flush next as this request is
 	 * just finished */
@@ -607,6 +608,12 @@ tracker_processing_pool_sparql_update_cb (GObject      *object,
 	/* Request finished */
 	pool->n_requests--;
 
+	trace ("(Processing Pool) Finished update of task %p for file '%s' "
+	       "(%u requests pending)",
+	       task,
+	       task->file_uri,
+	       pool->n_requests);
+
 	tracker_sparql_connection_update_finish (TRACKER_SPARQL_CONNECTION (object), result, &error);
 
 	/* Before calling user-provided callback, REMOVE the task from the pool;
@@ -643,8 +650,6 @@ tracker_processing_pool_sparql_update_array_cb (GObject      *object,
 	/* Get arrays of errors and queries */
 	update_data = user_data;
 	pool = update_data->pool;
-	trace ("(Processing Pool) Finished array-update of tasks %p",
-	       update_data->tasks);
 
 	/* If we had reached the limit of requests, flush next as this request is
 	 * just finished */
@@ -653,6 +658,11 @@ tracker_processing_pool_sparql_update_array_cb (GObject      *object,
 	/* Request finished */
 	pool->n_requests--;
 
+	trace ("(Processing Pool) Finished array-update of tasks %p"
+	       "(%u requests pending)",
+	       update_data->tasks,
+	       pool->n_requests);
+
 	sparql_array_errors = tracker_sparql_connection_update_array_finish (TRACKER_SPARQL_CONNECTION (object),
 	                                                                     result,
 	                                                                     &global_error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]