aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/ws_pipe.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-11-22 11:29:03 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-22 12:10:24 +0000
commita4f366c698329ecd59fdf3f4561821f31f55e728 (patch)
tree1ce6a1e7ecfadf16ae002e61a72e6dfffeba0818 /wsutil/ws_pipe.c
parent3bb32ede26c5fe22ed19bec937b7713ea597f8d3 (diff)
ws_pipe_spawn_sync: debug log elapsed time
Tested with `G_MESSAGES_DEBUG=all tshark --version`. Change-Id: Iae525b9de197f012c21693a91155f931d4dcc1f7 Ping-Bug: 15295 Reviewed-on: https://code.wireshark.org/review/30759 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil/ws_pipe.c')
-rw-r--r--wsutil/ws_pipe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wsutil/ws_pipe.c b/wsutil/ws_pipe.c
index 042c790871..90a3b84d97 100644
--- a/wsutil/ws_pipe.c
+++ b/wsutil/ws_pipe.c
@@ -84,6 +84,8 @@ gboolean ws_pipe_spawn_sync(gchar *dirname, gchar *command, gint argc, gchar **a
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "spawn params: %s", spawn_string->str);
g_string_free(spawn_string, TRUE);
+ guint64 start_time = g_get_monotonic_time();
+
#ifdef _WIN32
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
@@ -217,6 +219,8 @@ gboolean ws_pipe_spawn_sync(gchar *dirname, gchar *command, gint argc, gchar **a
status = FALSE;
#endif
+ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "%s finished in %.3fms", argv[0], (g_get_monotonic_time() - start_time) / 1000.0);
+
if (status)
{
if (local_output != NULL) {