glib/tests/gobject
Alexander Larsson b1f94af095 Add performance tests for GObject primitives
These are basic performance test for a couple of basic gobject
primitives:

* construction of simple objects. Simple is a bare gobject derived
  class with no properties, signals or interfaces.

* construction of complex objects. Complex is a gobject subclass
  with construct properties, normal properties, signals, and
  implements an interface.

* run-time type check of complex objects

* signal emissions

Lots of care is taken to try to make the results reproducible. Each
test is run for multible "rounds", where we try to make each round be
"not too short" in order to be significant wrt timer accuracy, but
also "not to long" to make the probability of some other random event
happening on the system (interrupts, other process scheduled, etc)
during the round less likely.
The current target round time is 4 msecs, which was picked without
rigour, but seems small wrt e.g. scheduler time.

For each test we then run the calculated round size for 60 seconds,
and then report the performance based on the minimal time of one
round. The model here is that any random stuff that happens during a
round can only slow it down, there is nothing that can make it go
faster, so the minimal time is the best estimate of how fast one round
goes.

The result is not ideal, even on a "idle" system the results vary
from round to round, but the variation seems to be less than 1%.
So, any performance difference reported by this test over 1% is
probably statistically significant.

Additionally the tests can be run with or without threads being
initialized. The script tests/gobject/run-performance.sh makes
it easy to produce a performance report for the current checkout.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:23 +02:00
..
.gitignore update 2009-01-05 14:56:55 +00:00
accumulator.c New directory, framework for automated GObject tests. 2003-09-12 20:37:09 +00:00
defaultiface.c Dummy dynamic type module for testing type plugin code and dynamic types. 2003-09-29 14:54:39 +00:00
deftype.c added test code from Behdad Esfahbod, see #337128. 2006-05-02 13:01:10 +00:00
dynamictype.c Define G_DEFINE_DYNAMIC_TYPE and and _EXTENDED variant. (#334437) 2006-12-29 06:12:11 +00:00
gvalue-test.c Add more tests. 2006-02-18 20:37:14 +00:00
ifacecheck.c Make tests work with slice allocator 2005-12-01 18:06:17 +00:00
ifaceinherit.c === Released 2.3.0 === 2003-10-23 22:42:31 +00:00
ifaceinit.c Test case for g_type_add_interface_check(). 2003-10-02 05:28:00 +00:00
ifaceproperties.c Force shared library (DLL) only on Windows. (I don't think that is 2003-10-24 03:41:22 +00:00
Makefile.am Add performance tests for GObject primitives 2009-10-02 21:02:23 +02:00
override.c Bug 541208 – Functions to easily install and use signals without class 2008-07-04 11:10:48 +00:00
paramspec-test.c Make the g_test_add macro work with gcc 4.3 2008-02-11 18:28:42 +00:00
performance.c Add performance tests for GObject primitives 2009-10-02 21:02:23 +02:00
references.c Add g_object_add/remove_toggle_ref() functions to get notification when a 2005-05-05 14:57:29 +00:00
run-performance.sh Add performance tests for GObject primitives 2009-10-02 21:02:23 +02:00
singleton.c added test program which demonstrates and checks singleton construction. 2006-08-16 12:11:03 +00:00
testcommon.h New directory, framework for automated GObject tests. 2003-09-12 20:37:09 +00:00
testmarshal.list New directory, framework for automated GObject tests. 2003-09-12 20:37:09 +00:00
testmodule.c Dummy dynamic type module for testing type plugin code and dynamic types. 2003-09-29 14:54:39 +00:00
testmodule.h Dummy dynamic type module for testing type plugin code and dynamic types. 2003-09-29 14:54:39 +00:00