Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit f3e5e0ea authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch 'feature-a/docker-benchmark' into 'dev'

Feature a/docker benchmark

See merge request !678
parents 4a294bb0 e8618fd5
Pipeline #141338 passed with stages
in 7 minutes and 57 seconds
...@@ -371,6 +371,10 @@ ff45-server-functional: ...@@ -371,6 +371,10 @@ ff45-server-functional:
# Benchmark # Benchmark
benchmark_algo: benchmark_algo:
image: gcc:6.3
before_script:
- apt-get update
- apt-get install -y time valgrind python3 wget tar
stage: benchmark stage: benchmark
script: script:
- cd algo/tests ; python3 benchmark-releases.py -bic - cd algo/tests ; python3 benchmark-releases.py -bic
...@@ -378,7 +382,7 @@ benchmark_algo: ...@@ -378,7 +382,7 @@ benchmark_algo:
only: only:
- /^feature-.*a.*\/.*$/ - /^feature-.*a.*\/.*$/
tags: tags:
- several-compilers - cidocker
# Deployment # Deployment
......
...@@ -85,19 +85,20 @@ def go(cmd, log=None): ...@@ -85,19 +85,20 @@ def go(cmd, log=None):
flog = sys.stdout flog = sys.stdout
print(cmd, end=' ') print(cmd, end=' ')
start = resource.getrusage(resource.RUSAGE_CHILDREN) start = resource.getrusage(resource.RUSAGE_CHILDREN)
completed = subprocess.run(cmd, shell=True, stderr=subprocess.STDOUT, stdout=flog) returncode = subprocess.call(cmd, shell=True, stderr=subprocess.STDOUT, stdout=flog)
end = resource.getrusage(resource.RUSAGE_CHILDREN) end = resource.getrusage(resource.RUSAGE_CHILDREN)
if log: if log:
flog.close() flog.close()
if completed.returncode: if returncode:
print('FAILED', end=' ') print('FAILED', end=' ')
stime = end.ru_stime-start.ru_stime stime = end.ru_stime-start.ru_stime
utime = end.ru_utime-start.ru_utime utime = end.ru_utime-start.ru_utime
print('%5.2fu %5.2fs' % (utime, stime)) print('%5.2fu %5.2fs' % (utime, stime))
completed.check_returncode() if returncode:
raise subprocess.CalledProcessError(returncode, cmd)
return stime + utime return stime + utime
...@@ -158,6 +159,9 @@ def installed(): ...@@ -158,6 +159,9 @@ def installed():
def run_all(tag, args): def run_all(tag, args):
go("make -C ../.. germline")
go("make -C ../.. data")
go("make -C ../.. demo")
print('==== %s ==== %s' % (tag, args)) print('==== %s ==== %s' % (tag, args))
os.system('mkdir -p %s' % RUN) os.system('mkdir -p %s' % RUN)
for release in installed(): for release in installed():
...@@ -217,4 +221,4 @@ if __name__ == '__main__': ...@@ -217,4 +221,4 @@ if __name__ == '__main__':
if args.benchmark: if args.benchmark:
bench_all() bench_all()
show_benchs(sys.stdout) show_benchs(sys.stdout)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment