mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-14 21:08:41 +00:00
sql inspections
This commit is contained in:
parent
6c2b13871f
commit
28fb6ddbfe
9
Inspection/Sql/performance.sh
Normal file
9
Inspection/Sql/performance.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
. config.sh
|
||||
|
||||
# Mysql required with query logging
|
||||
# sudo apt-get install percona-toolkit
|
||||
mysqldumpslow -t 10 /var/log/mysql/mysql-slow.log > ${INSPECTION_PATH}/Sql/slow_queries.log
|
||||
mysqldumpslow -t 10 -s l /var/log/mysql/mysql-slow.log > ${INSPECTION_PATH}/Sql/locked_queries.log
|
||||
pt-query-digest /var/log/mysql/mysql-slow.log > ${INSPECTION_PATH}/Sql/query_details.log
|
||||
|
|
@ -20,6 +20,14 @@ echo "#################################################"
|
|||
|
||||
. ${BUILD_PATH}/Inspection/Php/tests.sh
|
||||
|
||||
# Executing query inspections AFTER the unit test which also runs queries
|
||||
# This requires MYSQL with query logging enabled
|
||||
echo "#################################################"
|
||||
echo "MYSQL queries"
|
||||
echo "#################################################"
|
||||
|
||||
. ${BUILD_PATH}/Inspection/Sql/performance.sh
|
||||
|
||||
# Stats & metrics
|
||||
echo "#################################################"
|
||||
echo "PHP stats"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user