Add ploting
This commit is contained in:
parent
5bb7658378
commit
7774ef986e
@ -6,4 +6,5 @@ RUN apt install -y gcc
|
|||||||
RUN gcc --version
|
RUN gcc --version
|
||||||
RUN apt install -y build-essential
|
RUN apt install -y build-essential
|
||||||
RUN apt install -y moreutils
|
RUN apt install -y moreutils
|
||||||
RUN python --version
|
RUN python --version
|
||||||
|
RUN pip install matplotlib
|
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -9,7 +9,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Plot') {
|
stage('Plot') {
|
||||||
steps {
|
steps {
|
||||||
sh label: '', script: './plot.py'
|
sh label: '', script: './plot.py wer.txt wer.png'
|
||||||
|
sh label: '', script: './plot.py srr.txt srr.png'
|
||||||
|
archiveArtifacts 'wer.png'
|
||||||
|
archiveArtifacts 'srr.png'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
16
plot.py
16
plot.py
@ -1,7 +1,21 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def read_file(filename):
|
||||||
|
values = []
|
||||||
|
with open(filename) as f:
|
||||||
|
for line in f:
|
||||||
|
values.append(float(line.rstrip('\n')))
|
||||||
|
return values
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
pass
|
values = read_file(sys.argv[1])
|
||||||
|
plt.plot(values)
|
||||||
|
plt.savefig(sys.argv[2], dpi=1000)
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user