Changeset: fd971fd3d855 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fd971fd3d855
Modified Files:
        monetdb5/mal/mal_client.c
Branch: Dec2023
Log Message:

Print since when a client is idle (if indeed it is).


diffs (22 lines):

diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -590,13 +590,17 @@ void
 MCprintinfo(void)
 {
        int nrun = 0, nfinish = 0, nblock = 0;
+
        MT_lock_set(&mal_contextLock);
        for (Client c = mal_clients; c < mal_clients + MAL_MAXCLIENTS; c++) {
                switch (c->mode) {
                case RUNCLIENT:
                        /* running */
                        nrun++;
-                       printf("client %d, user %s, using %"PRIu64" bytes of 
transient space\n", c->idx, c->username, (uint64_t) 
ATOMIC_GET(&c->qryctx.datasize));
+                       if (c->idle)
+                               printf("client %d, user %s, using %"PRIu64" 
bytes of transient space, idle since %s", c->idx, c->username, (uint64_t) 
ATOMIC_GET(&c->qryctx.datasize), ctime(&c->idle));
+                       else
+                               printf("client %d, user %s, using %"PRIu64" 
bytes of transient space\n", c->idx, c->username, (uint64_t) 
ATOMIC_GET(&c->qryctx.datasize));
                        break;
                case FINISHCLIENT:
                        /* finishing */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to