When running the test (without parameters), it estimates a factor for the run size for each test. That is useful for running a reasonable size of the test, on different machines. However, when comparing two runs, it seems important that both runs share a common factor. Otherwise, the factor is determined differently, and the test is less comparable. For that there is the "--factor" option or the GLIB_PERFORMANCE_FACTOR environment variable. However, the factor option can only set the factors for all tests at the same time. Optimally, one factor is roughly suitable for all tests, but it is not, as currently the detected factors on my machine are widely different $ ./build/gobject/tests/performance/performance -v > p $ cat p | sed -n -e 's/^Running test //p' -e 's/.*correction factor //p' | sed 'N;s/\n/ /' simple-construction 34.78 simple-construction1 145.45 complex-construction 11.08 complex-construction1 20.46 complex-construction2 23.74 finalization 4.74 type-check 37.74 emit-unhandled 5.63 emit-unhandled-empty 49.69 emit-unhandled-generic 7.17 emit-unhandled-generic-empty 50.63 emit-unhandled-args 5.20 emit-handled 3.86 emit-handled-empty 4.01 emit-handled-generic 3.96 emit-handled-generic-empty 7.04 emit-handled-args 3.78 notify-unhandled 52.63 notify-by-pspec-unhandled 156.86 notify-handled 2.55 notify-by-pspec-handled 2.66 property-set 34.63 property-get 32.92 refcount 0.83 refcount-1 2.30 refcount-toggle 1.33 Adjust the base factors with these measurements. PERFORMANCE_FILE="./gobject/tests/performance/performance.c" IFS=$'\n' for LINE in $(cat p | sed -n -e 's/^Running test //p' -e 's/.*correction factor //p' | sed 'N;s/\n/ /') ; do ( IFS=' ' set -- $LINE TESTNAME="$1" FACTOR="$2" LINENUMBER="$(grep -n "^ \"$TESTNAME\",$" "$PERFORMANCE_FILE" | cut -d: -f1)" LINENUMBER=$((LINENUMBER + 2)) OLD_FACTOR="$(sed -n "$LINENUMBER s/^ \([0-9]\+\),$/\1/p" "$PERFORMANCE_FILE")" NEW_FACTOR="$(awk -v factor="$FACTOR" -v old_factor="$OLD_FACTOR" 'BEGIN {print int(factor * old_factor + 0.5)}')" sed -i "$LINENUMBER s/^ \([0-9]\+\),$/ $NEW_FACTOR,/" "$PERFORMANCE_FILE" ) done Afterwards, we get comparable factors: $ ./build/gobject/tests/performance/performance -v > p2 $ cat p2 | sed -n -e 's/^Running test //p' -e 's/.*correction factor //p' | sed 'N;s/\n/ /' simple-construction 0.98 simple-construction1 0.75 complex-construction 0.99 complex-construction1 0.96 complex-construction2 1.02 finalization 1.05 type-check 0.98 emit-unhandled 1.01 emit-unhandled-empty 1.10 emit-unhandled-generic 1.03 emit-unhandled-generic-empty 1.07 ... Of course, this measurement was taken in my setup. But I think it brings the base factors into a comparable range for most users. Also, the commit message shows an ugly script how you can re-generate this for your own purposes.
GLib
GLib is the low-level core library that forms the basis for projects such as GTK and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
The official download locations are: https://download.gnome.org/sources/glib
The official web site is: https://www.gtk.org/
Installation
See the file ‘INSTALL.md’. There is separate and more in-depth documentation for building GLib on Windows.
Supported versions
Upstream GLib only supports the most recent stable release series, the previous stable release series, and the current development release series. All older versions are not supported upstream and may contain bugs, some of which may be exploitable security vulnerabilities.
See SECURITY.md for more details.
Documentation
API documentation is available online for GLib for the:
Discussion
If you have a question about how to use GLib, seek help on GNOME’s Discourse
instance. Alternatively, ask a question
on StackOverflow and tag it glib
.
Reporting bugs
Bugs should be reported to the GNOME issue tracking system. You will need to create an account for yourself. You may also submit bugs by e-mail (without an account) by e-mailing incoming+gnome-glib-658-issue-@gitlab.gnome.org, but this will give you a degraded experience.
Bugs are for reporting problems in GLib itself, not for asking questions about how to use it. To ask questions, use one of our discussion forums.
In bug reports please include:
- Information about your system. For instance:
- What operating system and version
- For Linux, what version of the C library
- And anything else you think is relevant.
- How to reproduce the bug.
- If you can reproduce it with one of the test programs that are built
in the
tests/
subdirectory, that will be most convenient. Otherwise, please include a short test program that exhibits the behavior. As a last resort, you can also provide a pointer to a larger piece of software that can be downloaded.
- If you can reproduce it with one of the test programs that are built
in the
- If the bug was a crash, the exact text that was printed out when the crash occurred.
- Further information such as stack traces may be useful, but is not necessary.
Contributing to GLib
Please follow the contribution guide to know how to start contributing to GLib.
Patches should be submitted as merge requests to gitlab.gnome.org. Note that you will need to be logged in to the site to use this page. If the patch fixes an existing issue, please refer to the issue in your commit message with the following notation (for issue 123):
Closes: #123
Otherwise, create a new merge request that introduces the change. Filing a separate issue is not required.