[gnome-software] trivial: Add some more profiling points for the flatpak plugins



commit 1a5de4cba14568947b8eeea022dc7377d6d5ba16
Author: Richard Hughes <richard hughsie com>
Date:   Tue Nov 1 16:37:04 2016 +0000

    trivial: Add some more profiling points for the flatpak plugins

 src/plugins/gs-flatpak.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index c044dc1..22553c8 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -195,11 +195,18 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
        g_autofree gchar *appstream_fn = NULL;
        g_autofree gchar *default_branch = NULL;
        g_autofree gchar *only_app_id = NULL;
+       g_autoptr(AsProfileTask) ptask = NULL;
        g_autoptr(AsStore) store = NULL;
        g_autoptr(GFile) appstream_dir = NULL;
        g_autoptr(GFile) file = NULL;
        g_autoptr(GSettings) settings = NULL;
 
+       /* profile */
+       ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
+                                 "flatpak::add-apps-from-remote{%s}",
+                                 flatpak_remote_get_name (xremote));
+       g_assert (ptask != NULL);
+
        /* get the AppStream data location */
        appstream_dir = flatpak_remote_get_appstream_dir (xremote, NULL);
        if (appstream_dir == NULL) {
@@ -275,17 +282,25 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
 }
 
 static void
-gs_flatpak_rescan_installed (GsFlatpak *self, GCancellable *cancellable, GError **error)
+gs_flatpak_rescan_installed (GsFlatpak *self,
+                            GCancellable *cancellable,
+                            GError **error)
 {
        GPtrArray *icons;
        const gchar *fn;
        guint i;
+       g_autoptr(AsProfileTask) ptask = NULL;
        g_autoptr(GFile) path = NULL;
        g_autoptr(GDir) dir = NULL;
        g_autofree gchar *path_str = NULL;
        g_autofree gchar *path_exports = NULL;
        g_autofree gchar *path_apps = NULL;
 
+       /* profile */
+       ptask = as_profile_start_literal (gs_plugin_get_profile (self->plugin),
+                                         "flatpak::rescan-installed");
+       g_assert (ptask != NULL);
+
        /* add all installed desktop files */
        path = flatpak_installation_get_path (self->installation);
        path_str = g_file_get_path (path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]