After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735167 - Display statistics and match rules from the new Stats interface
Display statistics and match rules from the new Stats interface
Status: RESOLVED OBSOLETE
Product: d-feet
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: D-Feet Maintainer(s)
D-Feet Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-21 14:28 UTC by Alban Crequy
Modified: 2018-01-24 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] display statistics and match rules from the D-Bus Stats interface (3.52 KB, patch)
2014-08-21 14:31 UTC, Alban Crequy
none Details | Review
[PATCH] display statistics and match rules from the D-Bus Stats interface (3.95 KB, patch)
2014-10-02 13:11 UTC, Alban Crequy
none Details | Review
display statistics and match rules from the D-Bus Stats interface (3.72 KB, patch)
2017-11-30 21:34 UTC, Will Thompson
none Details | Review

Description Alban Crequy 2014-08-21 14:28:37 UTC
D-Bus has a Stats interface with useful information that are not displayed in d-feet.

At the moment, dbus needs to be recompiled with --enable-stats, but I am hoping to improve the situation:
https://bugs.freedesktop.org/show_bug.cgi?id=80759

And D-Bus match rules should be added soon too:
https://bugs.freedesktop.org/show_bug.cgi?id=24307

The attached patch on d-feet displays the stats and the match rules to the user.
Comment 1 Alban Crequy 2014-08-21 14:31:56 UTC
Created attachment 284093 [details] [review]
[PATCH] display statistics and match rules from the D-Bus Stats interface
Comment 2 Alban Crequy 2014-10-02 13:11:26 UTC
Created attachment 287583 [details] [review]
[PATCH] display statistics and match rules from the D-Bus Stats interface

All the needed changes are released in dbus 1.9.0.
Comment 3 Thomas Bechtold 2014-10-14 05:30:12 UTC
Hi Alban,

thanks for the patch. I'm currently busy and don't have dbus >= 1.9.0 but I'll test it in the next weeks. Hope that's fine.
Comment 4 Will Thompson 2017-11-30 21:34:41 UTC
Created attachment 364700 [details] [review]
display statistics and match rules from the D-Bus Stats interface

This requires dbus 1.9.0 for the new GetAllMatchRules call on the Stats
interface and for compiling the Stats interface by default.

The Stats interface is enabled by default on the session bus. On the system
bus, it is not enabled for non-root users by default but it can be enabled as
shown in /usr/share/doc/dbus/examples/example-system-enable-stats.conf

If the feature is not available in D-Bus, D-Feet ignores the error and
continues as before.
Comment 5 Will Thompson 2017-11-30 21:41:46 UTC
I rebased Alban's patch, fixing one merge conflict. I modified the workaround for https://bugzilla.gnome.org/show_bug.cgi?id=735166 – according to that bug, GLib.Variant('(s)', (foo,)) was never affected by the bug in question, and I think it's more legible anyway. I also added a 'self.name is not None' check, without which the test case fails. (For some reason it constructs the object with name=None and unique_name='org.freedesktop.DBus', even though in the real application both names are (correctly) 'org.freedesktop.DBus' for the bus itself. There's an argument that this stats code should use self.unique_name (if it's available), I suppose.

It's a bit sad that GetAllMatchRules() fetches all rules, every time you select a bus name, then throws all bar one key away. It would be nicer if the bus provided GetConnectionMatchRules but I'm sure there's a reason it doesn't.

It's also a little weird that this adds “Match rules” and “Statistics” rows right under the title “Object path” for the treeview. Might it be better to have a button in the Address/Name/Unique name section above the treeview to show statistics in a dialog?

(Better to have this available than not, of course!)
Comment 6 GNOME Infrastructure Team 2018-01-24 12:00:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/d-feet/issues/6.