Merge lp:~agateau/libdbusmenu/bench2 into lp:libdbusmenu/0.5

Proposed by Aurélien Gâteau
Status: Merged
Merged at revision: not available
Proposed branch: lp:~agateau/libdbusmenu/bench2
Merge into: lp:libdbusmenu/0.5
Diff against target: 86 lines (+40/-4)
4 files modified
tests/Makefile.am (+6/-1)
tests/test-gtk-label.json (+2/-2)
tools/Makefile.am (+5/-1)
tools/README.dbusmenu-bench (+27/-0)
To merge this branch: bzr merge lp:~agateau/libdbusmenu/bench2
Reviewer Review Type Date Requested Status
DBus Menu Team Pending
Review via email: mp+18712@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Aurélien Gâteau (agateau) wrote :

install the necessary files for dbusmenu-bench.
Document how it works.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/Makefile.am'
2--- tests/Makefile.am 2009-12-23 02:57:36 +0000
3+++ tests/Makefile.am 2010-02-05 18:43:12 +0000
4@@ -231,10 +231,15 @@
5 examples_DATA = \
6 $(glib_server_nomenu_SOURCES)
7
8+jsondir = $(datadir)/${PACKAGE}/json/
9+
10+json_DATA = \
11+ test-gtk-label.json
12+
13 EXTRA_DIST = \
14 $(examples_DATA) \
15 run-xvfb.sh \
16- test-gtk-label.json \
17+ $(json_DATA) \
18 dbusmenu-gtk/dbusMenuTest \
19 dbusmenu-gtk/mago_tests/dbusmenu.xml \
20 dbusmenu-gtk/mago_tests/dbusmenu.py \
21
22=== modified file 'tests/test-gtk-label.json'
23--- tests/test-gtk-label.json 2010-02-03 18:33:47 +0000
24+++ tests/test-gtk-label.json 2010-02-05 18:43:12 +0000
25@@ -198,7 +198,7 @@
26 {"id": 39, "type": "standard",
27 "label": "value39"}
28 ]
29- },
30+ }
31 ]
32 },
33 {"id": 8, "type": "standard",
34@@ -367,5 +367,5 @@
35 "toggle-state": -1
36 }
37 ]
38- },
39+ }
40 ]
41
42=== modified file 'tools/Makefile.am'
43--- tools/Makefile.am 2010-02-04 19:34:58 +0000
44+++ tools/Makefile.am 2010-02-05 18:43:12 +0000
45@@ -16,4 +16,8 @@
46 ../libdbusmenu-glib/libdbusmenu-glib.la \
47 $(DBUSMENUGLIB_LIBS)
48
49-EXTRA_DIST = dbusmenu-bench
50+doc_DATA = README.dbusmenu-bench
51+
52+EXTRA_DIST = \
53+ $(doc_DATA) \
54+ dbusmenu-bench
55
56=== added file 'tools/README.dbusmenu-bench'
57--- tools/README.dbusmenu-bench 1970-01-01 00:00:00 +0000
58+++ tools/README.dbusmenu-bench 2010-02-05 18:43:12 +0000
59@@ -0,0 +1,27 @@
60+# Introduction
61+
62+dbusmenu-bench measures the time it takes to call various DBusMenu methods and
63+print the results on stdout. A test dbusmenu application must be started before
64+running dbusmenu-bench.
65+
66+A GLib test application is included in this archive. libdbusmenu-qt provides an
67+equivalent Qt test application. They both can load the same menu hierarchy from
68+a JSON file.
69+
70+# Using it
71+
72+1. Start dbusmenu-testapp:
73+
74+ dbusmenu-testapp /usr/share/libdbusmenu/json/test-gtk-label.json
75+
76+2. Run dbusmenu-bench
77+
78+ dbusmenu-bench --count 1000
79+
80+1000 is the number of times each DBusMenu method is called. Calling them 1000
81+times helps getting meaningful average values.
82+
83+3. Stop dbusmenu-testapp
84+
85+For debugging purpose, you can also run dbusmenu-bench with the "--dump"
86+parameter, which will dump the output of the called methods.

Subscribers

People subscribed via source and target branches