mercredi 4 novembre 2020

coverage for mysql source code is the same after sending thousand of queries

I downloaded mysql-server source code from the original github repo, and compiled it with the required flag for using gcov:

# build mysql with coverage
git clone --branch mysql-cluster-8.0.21 \
        https://github.com/mysql/mysql-server mysql
cd mysql && git checkout mysql-cluster-8.0.21 && mkdir bld &&
cd mysql/bld &&
cmake .. \
                -DCMAKE_CXX_FLAGS="--coverage -O0" \
                -DWITH_BOOST=$HOME/boost -DDOWNLOAD_BOOST=1 \
                && make -j15

After I set up the mysqld server following the initialization steps in the official documentation, I could start up the server and run queries with mysql command line shell as usual without any errors. I could extract the coverage statistics and generate the html files with the following:

sudo chmod -R 777 mysql && cd mysql \
        && lcov --directory . -c -o mysql.info --no-external \
        && genhtml -o . mysql.info --ignore-errors source

Next, I used the default Golang client to send and execute queries for 12~24 hours for testing purposes. However, I found that the coverage is the same as before the testing. I'm sure I used the correct commands and there were actually many queries executed.

I don't know what the problem is with my steps. I appreciate any help if you get an idea about it.

Aucun commentaire:

Enregistrer un commentaire