性能执行脚本

#!/bin/bash #RUN_THREADS="1 2 4 8 16 32 64 128 256" RUN_THREADS="512" CURRENT_DIR=`echo $PWD` #for script in `echo "adder_getTotal-src adder_syncAdd-src"` for script in `echo "adder-addKafka"` do JMX_NAME="${script}" JMX_FILE="${JMX_NAME}.jmx" RUN_TMP_NAME="run_${JMX_NAME}" RUN_TMP_FILE="${RUN_TMP_NAME}.tmp" for thread in `echo "${RUN_THREADS}"` do sed -i "s#1#${thread}#g" ${CURRENT_DIR}/myjmx/${JMX_FILE} sleep 5 echo "----------------------Now run test: ${JMX_NAME}-${thread}-----------------------------" >>${RUN_TMP_FILE} 2>&1 sh jmeter.sh -n -t ${CURRENT_DIR}/myjmx/${JMX_FILE} -l myjtl/res_${JMX_NAME}_${thread}.jtl >>${RUN_TMP_FILE} 2>&1 sleep 5 sed -i "s#${thread}#1#g" ${CURRENT_DIR}/myjmx/${JMX_FILE} sleep 180 done sleep 300 done
posted @ 2018-10-23 22:06  ivon168  阅读(132)  评论(0编辑  收藏  举报