summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-11-18 10:32:47 +0000
committerRichard Hughes <richard@hughsie.com>2016-11-18 19:16:23 +0000
commit9f52dca956a60d7921c01bff37730e5a8790f987 (patch)
tree92c24a719744162e28e3c3e3fc25a192a54a8a73
parentc871fb69c1bd8e3a38562d898f619d673da90d77 (diff)
downloadappstream-glib-9f52dca956a60d7921c01bff37730e5a8790f987.tar.gz
trivial: Show a total process time when using appstream-util --profile
-rw-r--r--client/as-util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c
index 8768ae5..f3f6a2c 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -4141,6 +4141,7 @@ as_util_sigint_cb (gpointer user_data)
int
main (int argc, char *argv[])
{
+ AsProfileTask *ptask;
AsUtilPrivate *priv = NULL;
gboolean ret;
gboolean enable_profiling = FALSE;
@@ -4438,7 +4439,9 @@ main (int argc, char *argv[])
}
/* run the specified command */
+ ptask = as_profile_start (priv->profile, "%s: %s", argv[0], argv[1]);
ret = as_util_run (priv, argv[1], (gchar**) &argv[2], &error);
+ as_profile_task_free (ptask);
if (!ret) {
if (g_error_matches (error, AS_ERROR, AS_ERROR_NO_SUCH_CMD)) {
gchar *tmp;