This commit is contained in:
alicja.m.musial 2020-04-03 19:12:13 +02:00
parent cfa83229c4
commit d809e1c010
4 changed files with 79 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:latest
RUN apt update -y && apt install -y make
RUN apt install -y git
RUN apt install -y gcc
RUN apt install -y python3
RUN gcc --version
RUN apt install -y build-essential
RUN git clone https://github.com/usnistgov/SCTK.git
WORKDIR SCTK
RUN make config && make all && make check && make install && make doc
ENV PATH=$PATH:/SCTK/bin
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

25
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,25 @@
pipeline {
agent {
dockerfile true
}
stages {
stage('Copy all results'){
steps {
copyArtifacts filter: 'wer.txt, srr.txt', fingerprintArtifacts: true, projectName: 's452097-metrics', selector: lastSuccessful()
}
}
stage('Create plots'){
step {
sh('chmod +x ./plotGenerator.sh')
sh label: 'count', script: './plotGenerator.sh'
}
}
stage('Archive plots'){
steps {
archiveArtifacts 'wer.png'
archiveArtifacts 'srr.png'
}
}
}
}

34
plotCreator.py Normal file
View File

@ -0,0 +1,34 @@
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
def readFile(file):
with open(file, 'r') as inFile:
countL = 0
for line in open(thefilepath).xreadlines( ): countL += 1
y2 = np.genfromtxt(file)
return countL, y2
def createplot(sourceFile):
if sourceFile == 'wer.txt'
name = 'WER'
if sourceFile == 'srr.txt'
name = 'SRR'
readFile(sourceFile)
# Data for plotting
x = np.arange(1, countL)
y = y2
fig, ax = plt.subplots()
ax.plot(x, y)
ax.set(xlabel='Build number', ylabel='Percent of '+name,
title=name+' metric for ASR')
ax.grid()
fig.savefig(name+'.png')
plt.show()
if __name__ == '__main__':
createplot('wer.txt')
createplot('srr.txt')

6
plotGenerator.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
tail -n50 wer.txt > werForPlot.txt
tail -n50 srr.txt > srrForPlot.txt
python3 plotCreator.py