#!/bin/bash cishu=30 lable=3 set_config_log(){ jieguofile=tongji-$i tongjifile="tongji.txt" charulog=("`n="0x1" ; cat $i | grep "nEventType" |grep -v JT | awk -v awknr="$n" '$NF==awknr' | awk -F"," '{print $4 "," $5}' |uniq -c | sort -n`") charu=(` n="0x1" ; cat $i | grep "nEventType" |grep -v JT | awk -v awknr="$n" '$NF==awknr' | awk -F"," '{print $4 "," $5}' |uniq -c | sort -n | awk -F" " '{print $1}' `) charu=`echo ${charu[*]} | sed "s/ /+/g"` ; charu=$[charu] charulv=`echo "" | awk -v charu="$charu" -v cishu="$cishu" '{printf "%0.2f",charu/cishu*100}'` ; charulv=${charulv:0:4} lablelist=$(n="0x1" ; cat $i | grep "nEventType" |grep -v JT | grep "labelNum = $lable" | awk -v awknr="$n" '$NF==awknr' | awk -F"," '{print $4 "," $5}' |uniq -c | sort -n) lablegs=$(echo $lablelist | awk -F" " '{print $1}') ; lablegs=`echo "" | awk -v lablegs="$lablegs" -v cishu="$cishu" '{printf "%0.2f",lablegs/cishu*100}'` ; lablegs=${lablegs:0:4} bachulog=("`n="0x2" ; cat $i | grep "nEventType" |grep -v JT | awk -v awknr="$n" '$NF==awknr' | awk -F"," '{print $4 "," $5}' |uniq -c | sort -n`") bachu=(` n="0x2" ; cat $i | grep "nEventType" |grep -v JT | awk -v awknr="$n" '$NF==awknr' | awk -F"," '{print $4 "," $5}' |uniq -c | sort -n | awk -F" " '{print $1}' `) bachu=`echo ${bachu[*]} | sed "s/ /+/g"` ; bachu=$[bachu] bachulv=`echo "" | awk -v bachu="$bachu" -v cishu="$cishu" '{printf "%0.2f",bachu/cishu*100}' ` ; bachulv=${bachulv:0:4} echo "#-------------- $i ---------------# " >> $tongjifile echo " 测试次数:$cishu 识别插入次数: $charu 识别插入正确率: $charulv % 识别拔出次数: $bachu 识别拔出识别率:$bachulv % 贴标签个数: $lable 正确识别标签率:$lablegs % " >> $jieguofile echo " 测试次数:$cishu 识别插入次数: $charu 识别插入正确率: $charulv % 识别拔出次数: $bachu 识别拔出识别率:$bachulv % 贴标签个数: $lable 正确识别标签率:$lablegs % " >> $tongjifile echo " " >> $tongjifile echo " #----------- 识别插入日志 -------------# ${charulog[*]} #----------- 识别拔出日志 ------------# ${bachulog[*]} #---------- 识别标签正确日志 ------------# $lablelist " >> $jieguofile } runset(){ file=(`ls | grep log | grep -v tongji`) for i in ${file[*]} do set_config_log done } runset
Powered by ddoss.cn 12.0
©2015 - 2024 ddoss
渝公网安备50011302222260号 渝ICP备2024035333号 【实验平台安全承诺书】 小绿叶技术社区,优化网络中,点击查看配置信息
您的IP:192.168.122.82,2024-09-20 18:38:27,Processed in 0.04012 second(s).