diff options
author | Ted Gould <ted@gould.cx> | 2010-02-05 10:54:11 -0800 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-05 10:54:11 -0800 |
commit | a207ebb4db1921fe122a9c78b97f17e7ec175a29 (patch) | |
tree | 40aac4e1366b820197a4568b391f00ce8583f904 | |
parent | 4a1e9ef344e3adf27769e9a051b2748e1fc1e12a (diff) | |
parent | 13e9606df07165627e9518bf7c30292a019124cf (diff) | |
download | libdbusmenu-a207ebb4db1921fe122a9c78b97f17e7ec175a29.tar.gz libdbusmenu-a207ebb4db1921fe122a9c78b97f17e7ec175a29.tar.bz2 libdbusmenu-a207ebb4db1921fe122a9c78b97f17e7ec175a29.zip |
Fixing dist to include json files and a new readme explaining the bench files.
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rw-r--r-- | tests/test-gtk-label.json | 4 | ||||
-rw-r--r-- | tools/Makefile.am | 6 | ||||
-rw-r--r-- | tools/README.dbusmenu-bench | 27 |
4 files changed, 40 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 5297dbd..746ac23 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -231,10 +231,15 @@ examplesdir = $(docdir)/examples/ 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 \ diff --git a/tests/test-gtk-label.json b/tests/test-gtk-label.json index 1a46dcf..973ab7b 100644 --- a/tests/test-gtk-label.json +++ b/tests/test-gtk-label.json @@ -198,7 +198,7 @@ {"id": 39, "type": "standard", "label": "value39"} ] - }, + } ] }, {"id": 8, "type": "standard", @@ -367,5 +367,5 @@ QmCC", "toggle-state": -1 } ] - }, + } ] diff --git a/tools/Makefile.am b/tools/Makefile.am index eedfa29..77d6eef 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -16,4 +16,8 @@ dbusmenu_dumper_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) -EXTRA_DIST = dbusmenu-bench +doc_DATA = README.dbusmenu-bench + +EXTRA_DIST = \ + $(doc_DATA) \ + dbusmenu-bench diff --git a/tools/README.dbusmenu-bench b/tools/README.dbusmenu-bench new file mode 100644 index 0000000..91045df --- /dev/null +++ b/tools/README.dbusmenu-bench @@ -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. |