← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~agateau/dbusmenu/bench2 into lp:dbusmenu

 

Aurélien Gâteau has proposed merging lp:~agateau/dbusmenu/bench2 into lp:dbusmenu.

    Requested reviews:
    DBus Menu Team (dbusmenu-team)


install the necessary files for dbusmenu-bench.
Document how it works.
-- 
https://code.launchpad.net/~agateau/dbusmenu/bench2/+merge/18712
Your team ayatana-commits is subscribed to branch lp:dbusmenu.
=== modified file 'tests/Makefile.am'
--- tests/Makefile.am	2009-12-23 02:57:36 +0000
+++ tests/Makefile.am	2010-02-05 18:43:12 +0000
@@ -231,10 +231,15 @@
 examples_DATA = \
 	$(glib_server_nomenu_SOURCES)
 
+jsondir = $(datadir)/${PACKAGE}/json/
+
+json_DATA = \
+	test-gtk-label.json
+
 EXTRA_DIST = \
 	$(examples_DATA) \
 	run-xvfb.sh \
-	test-gtk-label.json \
+	$(json_DATA) \
 	dbusmenu-gtk/dbusMenuTest \
 	dbusmenu-gtk/mago_tests/dbusmenu.xml \
 	dbusmenu-gtk/mago_tests/dbusmenu.py \

=== modified file 'tests/test-gtk-label.json'
--- tests/test-gtk-label.json	2010-02-03 18:33:47 +0000
+++ tests/test-gtk-label.json	2010-02-05 18:43:12 +0000
@@ -198,7 +198,7 @@
 			{"id": 39, "type": "standard",
 			 "label": "value39"}
 		 ]
-		},
+		}
 	 ]
 	},
 	{"id": 8, "type": "standard",
@@ -367,5 +367,5 @@
 		 "toggle-state": -1
 		 }
 	 ]
-	},
+	}
 ]

=== modified file 'tools/Makefile.am'
--- tools/Makefile.am	2010-02-04 19:34:58 +0000
+++ tools/Makefile.am	2010-02-05 18:43:12 +0000
@@ -16,4 +16,8 @@
 	../libdbusmenu-glib/libdbusmenu-glib.la \
 	$(DBUSMENUGLIB_LIBS)
 
-EXTRA_DIST = dbusmenu-bench
+doc_DATA = README.dbusmenu-bench
+
+EXTRA_DIST = \
+	$(doc_DATA) \
+	dbusmenu-bench

=== added file 'tools/README.dbusmenu-bench'
--- tools/README.dbusmenu-bench	1970-01-01 00:00:00 +0000
+++ tools/README.dbusmenu-bench	2010-02-05 18:43:12 +0000
@@ -0,0 +1,27 @@
+# Introduction
+
+dbusmenu-bench measures the time it takes to call various DBusMenu methods and
+print the results on stdout. A test dbusmenu application must be started before
+running dbusmenu-bench.
+
+A GLib test application is included in this archive. libdbusmenu-qt provides an
+equivalent Qt test application. They both can load the same menu hierarchy from
+a JSON file.
+
+# Using it
+
+1. Start dbusmenu-testapp:
+
+    dbusmenu-testapp /usr/share/libdbusmenu/json/test-gtk-label.json
+
+2. Run dbusmenu-bench
+
+    dbusmenu-bench --count 1000
+
+1000 is the number of times each DBusMenu method is called. Calling them 1000
+times helps getting meaningful average values.
+
+3. Stop dbusmenu-testapp
+
+For debugging purpose, you can also run dbusmenu-bench with the "--dump"
+parameter, which will dump the output of the called methods.


Follow ups