gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: add logging for DB perf analysis


From: gnunet
Subject: [gnunet] branch master updated: add logging for DB perf analysis
Date: Thu, 28 Oct 2021 13:32:27 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 6a642f8f6 add logging for DB perf analysis
6a642f8f6 is described below

commit 6a642f8f6060018115be1bf66826fc1c4676a015
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Oct 28 13:32:17 2021 +0200

    add logging for DB perf analysis
---
 src/pq/pq.c      | 5 +++++
 src/pq/pq_exec.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/pq/pq.c b/src/pq/pq.c
index b260aa1db..876d4fcf6 100644
--- a/src/pq/pq.c
+++ b/src/pq/pq.c
@@ -95,6 +95,11 @@ GNUNET_PQ_exec_prepared (struct GNUNET_PQ_Context *db,
                           param_lengths,
                           param_formats,
                           1);
+    GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
+                     "pq",
+                     "Execution of prepared SQL statement `%s' finished 
(%d)\n",
+                     name,
+                     PGRES_COMMAND_OK == PQresultStatus (res));
     if ( (PGRES_COMMAND_OK != PQresultStatus (res)) &&
          (CONNECTION_OK != (status = PQstatus (db->conn))) )
     {
diff --git a/src/pq/pq_exec.c b/src/pq/pq_exec.c
index 464fff4b4..dcde331b6 100644
--- a/src/pq/pq_exec.c
+++ b/src/pq/pq_exec.c
@@ -86,6 +86,11 @@ GNUNET_PQ_exec_statements (struct GNUNET_PQ_Context *db,
                 db);
     result = PQexec (db->conn,
                      es[i].sql);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Running statement `%s' on %p finished (%d)\n",
+                es[i].sql,
+                db,
+                PGRES_COMMAND_OK == PQresultStatus (result));
     if ((GNUNET_NO == es[i].ignore_errors) &&
         (PGRES_COMMAND_OK != PQresultStatus (result)))
     {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]