From e29ac7a7bcdeb14fffdebf8778ffcb1c3f06078c Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 7 Jul 2016 15:29:39 +0200 Subject: TANGO: do not stop if encountering errors in test --- tango/stress-test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tango') diff --git a/tango/stress-test.py b/tango/stress-test.py index f2352bf..efbf68e 100644 --- a/tango/stress-test.py +++ b/tango/stress-test.py @@ -30,6 +30,7 @@ if __name__ == '__main__': start = time.time() size = 0 + acquired = 0 if HAVE_PROGRESSBAR: progress = progressbar.ProgressBar(max_value=args.number, redirect_stdout=True) @@ -43,12 +44,11 @@ if __name__ == '__main__': camera.Trigger() frame = camera.image + size += frame.nbytes + acquired += 1 except: - camera.Stop() - print("Failure after {} frames".format(i)) - sys.exit(0) + pass - size += frame.nbytes if HAVE_PROGRESSBAR: progress.update(i) @@ -56,4 +56,5 @@ if __name__ == '__main__': end = time.time() camera.Stop() + print("Frames acquired: {}/{} ({:3.2f} %)".format(acquired, args.number, float(acquired) / args.number * 100)) print("Bandwidth: {:.3f} MB/s".format(size / (end - start) / 1024. / 1024.)) -- cgit v1.2.3