mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-07 15:18:40 +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
|
. ${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
|
# Stats & metrics
|
||||||
echo "#################################################"
|
echo "#################################################"
|
||||||
echo "PHP stats"
|
echo "PHP stats"
|
||||||
|
|
|
||||||
2
setup.sh
2
setup.sh
|
|
@ -93,6 +93,8 @@ mkdir -p ${INSPECTION_PATH}/Test/Php
|
||||||
mkdir -p ${INSPECTION_PATH}/Test/Js
|
mkdir -p ${INSPECTION_PATH}/Test/Js
|
||||||
mkdir -p ${INSPECTION_PATH}/Test/sitespeed
|
mkdir -p ${INSPECTION_PATH}/Test/sitespeed
|
||||||
|
|
||||||
|
mkdir -p ${INSPECTION_PATH}/Sql
|
||||||
|
|
||||||
# Permission handling
|
# Permission handling
|
||||||
chmod -R 777 ${ROOT_PATH}
|
chmod -R 777 ${ROOT_PATH}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user