jenkinsfile
This commit is contained in:
parent
26110555b6
commit
4a7957450c
@ -1,12 +1,15 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
wer = open("wer.txt","w")
|
wer = open("wer.txt","w")
|
||||||
|
ssr = open("ssr.txt","w")
|
||||||
|
|
||||||
lastId = ""
|
lastId = ""
|
||||||
|
|
||||||
globalPercent = 0
|
globalPercent = 0
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
||||||
|
ssr = 0
|
||||||
|
|
||||||
with open("helper.txt", "r") as f:
|
with open("helper.txt", "r") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if re.match(r'^id:.*', line):
|
if re.match(r'^id:.*', line):
|
||||||
@ -15,10 +18,13 @@ with open("helper.txt", "r") as f:
|
|||||||
helper = line.replace("Scores: (#C #S #D #I) ", "").split()
|
helper = line.replace("Scores: (#C #S #D #I) ", "").split()
|
||||||
sum = int(helper[0]) + int(helper[1]) + int(helper[2]) + int(helper[3])
|
sum = int(helper[0]) + int(helper[1]) + int(helper[2]) + int(helper[3])
|
||||||
sum = ((float(helper[0]))/(float(sum))) * 100
|
sum = ((float(helper[0]))/(float(sum))) * 100
|
||||||
|
if (sum == 100):
|
||||||
|
ssr += 1
|
||||||
globalPercent += sum
|
globalPercent += sum
|
||||||
counter += 1
|
counter += 1
|
||||||
wer.write(lastId + " = " + str(sum) + "%\n")
|
wer.write(lastId + " = " + str(sum) + "%\n")
|
||||||
|
|
||||||
wer.write("AVG: " + str(float((globalPercent) / (float(counter) * 100)*100)) + "%")
|
wer.write("AVG: " + str(float((globalPercent) / (float(counter) * 100)*100)) + "%")
|
||||||
|
ssr.write(str(float(ssr)/float(counter)) + "%")
|
||||||
wer.close()
|
wer.close()
|
||||||
|
ssr.close()
|
Loading…
Reference in New Issue
Block a user