[gnome-software/gnome-3-22] trivial: Add some profiling for the modalias plugin
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] trivial: Add some profiling for the modalias plugin
- Date: Tue, 7 Mar 2017 16:28:23 +0000 (UTC)
commit 34a2b63e0554ac3a4537172c8b75aba18f31ad9f
Author: Richard Hughes <richard hughsie com>
Date: Mon Nov 7 09:11:57 2016 +0000
trivial: Add some profiling for the modalias plugin
src/plugins/gs-plugin-modalias.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-modalias.c b/src/plugins/gs-plugin-modalias.c
index 11d7edc..b964b50 100644
--- a/src/plugins/gs-plugin-modalias.c
+++ b/src/plugins/gs-plugin-modalias.c
@@ -73,11 +73,17 @@ gs_plugin_modalias_ensure_devices (GsPlugin *plugin)
GsPluginData *priv = gs_plugin_get_data (plugin);
GList *l;
g_autoptr(GList) list = NULL;
+ g_autoptr(AsProfileTask) ptask = NULL;
/* already set */
if (priv->devices->len > 0)
return;
+ /* profile */
+ ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
+ "modalias::ensure{%s}");
+ g_assert (ptask != NULL);
+
/* get the devices, and assume ownership of each */
list = g_udev_client_query_by_subsystem (priv->client, NULL);
for (l = list; l != NULL; l = l->next) {
@@ -96,6 +102,12 @@ gs_plugin_modalias_matches (GsPlugin *plugin, const gchar *modalias)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
guint i;
+ g_autoptr(AsProfileTask) ptask = NULL;
+
+ /* profile */
+ ptask = as_profile_start (gs_plugin_get_profile (plugin),
+ "modalias::matches{%s}", modalias);
+ g_assert (ptask != NULL);
gs_plugin_modalias_ensure_devices (plugin);
for (i = 0; i < priv->devices->len; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]