GUACAMOLE-259: Merge logging of frame timing information.
This commit is contained in:
commit
3b0b36ad5d
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user