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>
This commit is contained in:
Peter Wu 2018-11-22 11:29:03 +01:00 committed by Anders Broman
parent 3bb32ede26
commit a4f366c698
1 changed files with 4 additions and 0 deletions

View File

@ -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) {