[gnome-software] Show in the profile when the PK transaction was started



commit 0dc321e77df2a6fb816218c852d884db82d3db74
Author: Richard Hughes <richard hughsie com>
Date:   Wed Oct 2 09:48:59 2013 +0100

    Show in the profile when the PK transaction was started

 src/plugins/gs-plugin-packagekit-refine.c  |   10 ++++++++++
 src/plugins/gs-plugin-packagekit-updates.c |   10 ++++++++++
 src/plugins/gs-plugin-packagekit.c         |   10 ++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index 30a7439..b35b705 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -91,6 +91,16 @@ gs_plugin_packagekit_progress_cb (PkProgress *progress,
        g_object_get (progress,
                      "status", &status,
                      NULL);
+
+       /* profile */
+       if (status == PK_STATUS_ENUM_SETUP) {
+               gs_profile_start_full (plugin->profile,
+                                      "packagekit-refine::transaction");
+       } else if (status == PK_STATUS_ENUM_FINISHED) {
+               gs_profile_stop_full (plugin->profile,
+                                     "packagekit-refine::transaction");
+       }
+
        plugin_status = packagekit_status_enum_to_plugin_status (status);
        if (plugin_status != GS_PLUGIN_STATUS_UNKNOWN)
                gs_plugin_status_update (plugin, NULL, plugin_status);
diff --git a/src/plugins/gs-plugin-packagekit-updates.c b/src/plugins/gs-plugin-packagekit-updates.c
index a0169cd..71e062c 100644
--- a/src/plugins/gs-plugin-packagekit-updates.c
+++ b/src/plugins/gs-plugin-packagekit-updates.c
@@ -91,6 +91,16 @@ gs_plugin_packagekit_progress_cb (PkProgress *progress,
        g_object_get (progress,
                      "status", &status,
                      NULL);
+
+       /* profile */
+       if (status == PK_STATUS_ENUM_SETUP) {
+               gs_profile_start_full (plugin->profile,
+                                      "packagekit-refine::transaction");
+       } else if (status == PK_STATUS_ENUM_FINISHED) {
+               gs_profile_stop_full (plugin->profile,
+                                     "packagekit-refine::transaction");
+       }
+
        plugin_status = packagekit_status_enum_to_plugin_status (status);
        if (plugin_status != GS_PLUGIN_STATUS_UNKNOWN)
                gs_plugin_status_update (plugin, NULL, plugin_status);
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index c3dd60e..88c8344 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -91,6 +91,16 @@ gs_plugin_packagekit_progress_cb (PkProgress *progress,
        g_object_get (progress,
                      "status", &status,
                      NULL);
+
+       /* profile */
+       if (status == PK_STATUS_ENUM_SETUP) {
+               gs_profile_start_full (plugin->profile,
+                                      "packagekit-refine::transaction");
+       } else if (status == PK_STATUS_ENUM_FINISHED) {
+               gs_profile_stop_full (plugin->profile,
+                                     "packagekit-refine::transaction");
+       }
+
        plugin_status = packagekit_status_enum_to_plugin_status (status);
        if (plugin_status != GS_PLUGIN_STATUS_UNKNOWN)
                gs_plugin_status_update (plugin, NULL, plugin_status);


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