[gnome-builder] sysprof: use RAPL source instead of battery source



commit 13331ab22156752f2110e6e3bb58b3a9f92051a7
Author: Christian Hergert <chergert redhat com>
Date:   Thu Aug 1 13:20:02 2019 -0700

    sysprof: use RAPL source instead of battery source
    
    It is more precise for our use case and allows us to show things using
    Wattage.

 src/plugins/sysprof/gbp-sysprof-workspace-addin.c | 8 +++++---
 src/plugins/sysprof/meson.build                   | 4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c 
b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
index 2366a0dac..593980a06 100644
--- a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
@@ -140,8 +140,8 @@ profiler_run_handler (IdeRunManager *run_manager,
   g_autoptr(SysprofSource) gjs_source = NULL;
   g_autoptr(SysprofSource) gtk_source = NULL;
   g_autoptr(SysprofSource) symbols_source = NULL;
-  g_autoptr(SysprofSource) battery_source = NULL;
   g_autoptr(SysprofSource) netdev_source = NULL;
+  g_autoptr(SysprofSource) energy_source = NULL;
   g_autoptr(SysprofSpawnable) spawnable = NULL;
   g_autoptr(GPtrArray) sources = NULL;
   g_auto(GStrv) argv = NULL;
@@ -231,8 +231,10 @@ profiler_run_handler (IdeRunManager *run_manager,
   symbols_source = sysprof_symbols_source_new ();
   g_ptr_array_add (sources, symbols_source);
 
-  battery_source = sysprof_battery_source_new ();
-  g_ptr_array_add (sources, battery_source);
+  energy_source = sysprof_proxy_source_new (G_BUS_TYPE_SYSTEM,
+                                            "org.gnome.Sysprof3",
+                                            "/org/gnome/Sysprof3/RAPL");
+  g_ptr_array_add (sources, energy_source);
 
   netdev_source = sysprof_netdev_source_new ();
   g_ptr_array_add (sources, netdev_source);
diff --git a/src/plugins/sysprof/meson.build b/src/plugins/sysprof/meson.build
index cbda29111..ec9a02238 100644
--- a/src/plugins/sysprof/meson.build
+++ b/src/plugins/sysprof/meson.build
@@ -1,8 +1,8 @@
 if get_option('plugin_sysprof')
 
 plugins_deps += [
-  dependency('sysprof-3', version: '>= 3.33.3'),
-  dependency('sysprof-ui-3', version: '>= 3.33.3'),
+  dependency('sysprof-3', version: '>= 3.33.4'),
+  dependency('sysprof-ui-3', version: '>= 3.33.4'),
 ]
 
 plugins_sources += files([


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