/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondTools/IntegrationTest/scripts/verifyFrontier
60 строк
2 KB
Giulio Eulisse
Snapshot of CMSSW_6_2_0_pre8.
26 июн 2013, 18:12
26 июн 2013, 18:12
214ab73
Код
Авторство
О чём код?
#!/bin/bash echo -e "\nverifyFrontier 1.4 - 2007, by Pietro M. Picca <Pietro.Picca@cern.ch>\n" if [ $# -lt 1 ] then echo "Please specify the configuration file name on the command line." echo -e "Syntax: ${0} filename.cfg\n" exit 1 fi export FRONTIER_LOG_LEVEL=debug export FRONTIER_LOG_FILE=${1%%.cfg}.log export FRONTIER_LOG_FILE=./${FRONTIER_LOG_FILE##*/} if [ ! -r ${1} ] then echo -e "The file ${1} does not exist.\n" exit 2 fi rm ${FRONTIER_LOG_FILE} >& /dev/null echo "Please wait while processing ${1} file. It could take several minutes..." eval `scramv1 runtime -sh` cmsRun ${1} >& /dev/null if [ -s ${FRONTIER_LOG_FILE} ] then echo "List of Frontier databases, accounts and payloads involved while processing ${1} file:" >& ${FRONTIER_LOG_FILE%%.log}.sum gawk 'BEGIN { sep = " - " maxl = 0 nqueries = 0 } /GET/ { dbname = gensub(/.*:8000\/([^/]+)\/.*/, "\\1", "g") } /SELECT \"TOKEN\"/ { leaf = "Database name: " dbname sep gensub(/.*FROM \"([^"]+)\".* = .(.*).$/, "Account: \\1" sep "Payload: \\2", "g") leaves[leaf] = leaf l = length(gensub(/.* - (.*) - .*$/, "\\1", "g", leaf)) if (l > maxl) maxl = l } /encoding request/ { nqueries++ } END { prev = "" for (i = 1; i <= asort(leaves); i++) { split(leaves[i], items, sep) if (prev != items[1]) { print "\n" items[1] prev = items[1] } printf "%-" maxl "s %s\n", items[2], items[3] } print "\nTotal number of queries: " nqueries }' ${FRONTIER_LOG_FILE} >> ${FRONTIER_LOG_FILE%%.log}.sum gawk -v i=0 '{ if (i++ > 0) print }' ${FRONTIER_LOG_FILE%%.log}.sum echo else echo -e "The file ${1} is not set to use Frontier.\n" exit 3 fi rm ${FRONTIER_LOG_FILE} >& /dev/null