guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmuehl...@apache.org
Subject [1/2] incubator-guacamole-server git commit: GUACAMOLE-259: Log server and user frame timing information at TRACE level.
Date Fri, 31 Mar 2017 17:56:05 GMT
Repository: incubator-guacamole-server
Updated Branches:
  refs/heads/master 457c48ec7 -> 3b0b36ad5


GUACAMOLE-259: Log server and user frame timing information at TRACE level.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/1081131a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/1081131a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/1081131a

Branch: refs/heads/master
Commit: 1081131aa5151e4e8546823b26212a2b598bcba3
Parents: 457c48e
Author: Michael Jumper <mjumper@apache.org>
Authored: Wed Mar 29 22:32:26 2017 -0700
Committer: Michael Jumper <mjumper@apache.org>
Committed: Fri Mar 31 10:48:58 2017 -0700

----------------------------------------------------------------------
 src/libguac/client.c        | 6 ++++++
 src/libguac/user-handlers.c | 7 +++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/1081131a/src/libguac/client.c
----------------------------------------------------------------------
diff --git a/src/libguac/client.c b/src/libguac/client.c
index a88de74..4f3051d 100644
--- a/src/libguac/client.c
+++ b/src/libguac/client.c
@@ -35,6 +35,7 @@
 #include "user.h"
 
 #include <dlfcn.h>
+#include <inttypes.h>
 #include <pthread.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -414,6 +415,11 @@ int guac_client_end_frame(guac_client* client) {
 
     /* Update and send timestamp */
     client->last_sent_timestamp = guac_timestamp_current();
+
+    /* Log received timestamp and calculated lag (at TRACE level only) */
+    guac_client_log(client, GUAC_LOG_TRACE, "Server completed "
+            "frame %" PRIu64 "ms.", client->last_sent_timestamp);
+
     return guac_protocol_send_sync(client->socket, client->last_sent_timestamp);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/1081131a/src/libguac/user-handlers.c
----------------------------------------------------------------------
diff --git a/src/libguac/user-handlers.c b/src/libguac/user-handlers.c
index 4f1f59b..0e8ed38 100644
--- a/src/libguac/user-handlers.c
+++ b/src/libguac/user-handlers.c
@@ -27,6 +27,7 @@
 #include "user.h"
 #include "user-handlers.h"
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -124,6 +125,12 @@ int __guac_handle_sync(guac_user* user, int argc, char** argv) {
 
     }
 
+    /* Log received timestamp and calculated lag (at TRACE level only) */
+    guac_user_log(user, GUAC_LOG_TRACE,
+            "User confirmation of frame %" PRIu64 "ms received "
+            "at %" PRIu64 "ms (processing_lag=%ims)",
+            timestamp, current, user->processing_lag);
+
     if (user->sync_handler)
         return user->sync_handler(user, timestamp);
     return 0;


Mime
View raw message