Commit f3e5e0ea authored by Mathieu Giraud's avatar Mathieu Giraud

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:
# Benchmark
benchmark_algo:
image: gcc:6.3
before_script:
- apt-get update
- apt-get install -y time valgrind python3 wget tar
stage: benchmark
script:
- cd algo/tests ; python3 benchmark-releases.py -bic
......@@ -378,7 +382,7 @@ benchmark_algo:
only:
- /^feature-.*a.*\/.*$/
tags:
- several-compilers
- cidocker
# Deployment
......
......@@ -85,19 +85,20 @@ def go(cmd, log=None):
flog = sys.stdout
print(cmd, end=' ')
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)
if log:
flog.close()
if completed.returncode:
if returncode:
print('FAILED', end=' ')
stime = end.ru_stime-start.ru_stime
utime = end.ru_utime-start.ru_utime
print('%5.2fu %5.2fs' % (utime, stime))
completed.check_returncode()
if returncode:
raise subprocess.CalledProcessError(returncode, cmd)
return stime + utime
......@@ -158,6 +159,9 @@ def installed():
def run_all(tag, args):
go("make -C ../.. germline")
go("make -C ../.. data")
go("make -C ../.. demo")
print('==== %s ==== %s' % (tag, args))
os.system('mkdir -p %s' % RUN)
for release in installed():
......@@ -217,4 +221,4 @@ if __name__ == '__main__':
if args.benchmark:
bench_all()
show_benchs(sys.stdout)
\ No newline at end of file
show_benchs(sys.stdout)
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