How Skoll Collects MySQL Runtime Information - Mon, 09:37 PM Jul 14 2008

To understand the runtime behavior of MySQL under different configurations, Skoll needs to collect runtime data while testing MySQL builds. To accomplish this, the Skoll client takes advantage of gcov, a test coverage program that's part of the GNU Compiler Collection (GCC). gcov collects runtime information such as how many times a line of code, a method or a file was executed, what was the coverage and much more.

The source tree of MySQL actually provides a few build scripts that enables gcov under the BUILD directory. However, these scripts build MySQL using the default configuration; not exactly what Skoll needs. Skoll client builds and tests MySQL in different configurations by passing compile-time and run-time flags to the configure script before compilation. For example

./configure --enable-thread-safe-client --with-extra-charsets=all --with-innodb --with-ndbcluster
To enable gcov under non-default configurations, Skoll client passes a few more compiler flags to the configure script.

CC=gcc
CFLAGS=-fprofile-arcs -ftest-coverage
LDFLAGS=-fprofile-arcs -ftest-coverage
CXX=gcc
CXXFLAGS=-fprofile-arcs -ftest-coverage
After compilation is complete, most of the source files will have corresponding .gcno files.

When Skoll client has finished running all of the MySQL tests, it will recursively go through the source directories and run

gcov <filename>
on every source file to generate gcov runtime data. These runtime data files are then zipped and sent to the Skoll server for future processing and analysis.













Help | Disclaimer | About | Contact
Copyright © 2008 CSFalcon