[gnome-software/wip/kalev/gnome-3-22: 8/96] trivial: Add some more profiling points for the flatpak plugins
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/gnome-3-22: 8/96] trivial: Add some more profiling points for the flatpak plugins
- Date: Tue, 7 Mar 2017 16:24:30 +0000 (UTC)
commit 3d50246795c3225e5f9c925e7571738f63099729
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 3048006..9a01081 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -156,11 +156,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(GPtrArray) app_filtered = 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) {
@@ -246,17 +253,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]