Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-02-18 17:01:39 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-02-18 17:41:56 +0300
commit66d29748199d0deaaa5a00926f3e7aaa8126d8ee (patch)
tree400e093b33bc6aecc0e619b812bebe7ce3ad33c0 /.github
parentd3bd97dbcdb2a7bce248adbe1b63a0555b0c17ed (diff)
Log slow MySQL queries on CI
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9c65fae2f..08759c90d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -128,6 +128,12 @@ jobs:
run: |
php -f nextcloud/occ config:system:set debug --type bool --value true
php -f nextcloud/occ config:system:set app.mail.verify-tls-peer --type bool --value false
+ - name: Enable slow mysql query logs
+ if: ${{ matrix.db == 'mysql' }}
+ run: |
+ echo "SET GLOBAL log_queries_not_using_indexes = 1;" | mysql -h 127.0.0.1 -u root -pmy-secret-pw
+ echo "SET GLOBAL slow_query_log=1;" | mysql -h 127.0.0.1 -u root -pmy-secret-pw
+ echo "SET GLOBAL log_output = 'table';" | mysql -h 127.0.0.1 -u root -pmy-secret-pw
- name: Run tests
working-directory: nextcloud/apps/mail
run: |
@@ -136,6 +142,9 @@ jobs:
composer run test:integration
env:
XDEBUG_MODE: coverage
+ - name: Read slow queries
+ if: ${{ always() }}
+ run: echo "SELECT * FROM mysql.slow_log WHERE sql_text LIKE '%oc_mail%' AND sql_text NOT LIKE '%information_schema%'" | mysql -h 127.0.0.1 -u root -pmy-secret-pw
- name: Print debug logs
if: ${{ always() }}
run: cat nextcloud/data/horde_*.log