diff options
author | Richard Hughes <richard@hughsie.com> | 2016-09-14 09:48:30 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-09-14 09:48:30 +0100 |
commit | ae24601b7372c328c3dcecf48dc627d2eb3ea899 (patch) | |
tree | 768fb8e62f7c406f5fb3b363916d12fdb1fb93b3 | |
parent | 6c643f1a662315df12692b16428f53202a26c043 (diff) | |
download | appstream-glib-ae24601b7372c328c3dcecf48dc627d2eb3ea899.tar.gz |
trivial: Allow detailed profiling when using as_store_from_file()
-rw-r--r-- | libappstream-glib/as-store.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c index 082af45..ccbd3bb 100644 --- a/libappstream-glib/as-store.c +++ b/libappstream-glib/as-store.c @@ -1695,10 +1695,12 @@ as_store_from_file_internal (AsStore *store, g_return_val_if_fail (AS_IS_STORE (store), FALSE); /* profile */ - ptask = as_profile_start_literal (priv->profile, "AsStore:store-from-file"); + filename = g_file_get_path (file); + ptask = as_profile_start (priv->profile, + "AsStore:store-from-file{%s}", + filename); /* a DEP-11 file */ - filename = g_file_get_path (file); if (g_strstr_len (filename, -1, ".yml") != NULL) return as_store_load_yaml_file (store, file, cancellable, error); @@ -2390,18 +2392,13 @@ as_store_load_app_info_file (AsStore *store, { AsStorePrivate *priv = GET_PRIVATE (store); g_autoptr(GFile) file = NULL; - g_autoptr(AsProfileTask) ptask = NULL; - - /* profile */ - ptask = as_profile_start (priv->profile, "AsStore:app-info{%s}", path_xml); /* guess this based on the name */ if (!as_store_guess_origin_fallback (store, path_xml, error)) return FALSE; + /* load without adding monitor */ file = g_file_new_for_path (path_xml); - /* Do not monitor the file: assume we are already monitoring its - * directory */ return as_store_from_file_internal (store, file, scope, |