From 2559349ef1b5a3aa967122026b0b30a0a2ebfca9 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 13 Mar 2019 14:04:18 +0100 Subject: with timing --- test/monniaux/BearSSL/conf/KalrayCompCert.mk | 2 +- test/monniaux/BearSSL/test/test_crypto.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/monniaux/BearSSL/conf/KalrayCompCert.mk b/test/monniaux/BearSSL/conf/KalrayCompCert.mk index e2bef9d8..ad5bd2da 100644 --- a/test/monniaux/BearSSL/conf/KalrayCompCert.mk +++ b/test/monniaux/BearSSL/conf/KalrayCompCert.mk @@ -54,7 +54,7 @@ LDDLLOUT = -o # Static linker. LD = $(CC) -LDFLAGS = +LDFLAGS = ../clock.gcc.k1c.o LDOUT = -o # C# compiler; we assume usage of Mono. diff --git a/test/monniaux/BearSSL/test/test_crypto.c b/test/monniaux/BearSSL/test/test_crypto.c index c6c534d6..a4f33ac0 100644 --- a/test/monniaux/BearSSL/test/test_crypto.c +++ b/test/monniaux/BearSSL/test/test_crypto.c @@ -27,6 +27,7 @@ #include #include "bearssl.h" #include "inner.h" +#include "../../clock.h" /* * Decode an hexadecimal string. Returned value is the number of decoded @@ -9458,7 +9459,9 @@ main(int argc, char *argv[]) printf(" %s\n", tfns[u].name); } } else { - for (u = 0; tfns[u].name; u ++) { + clock_prepare(); + clock_start(); + for (u = 0; tfns[u].name; u ++) { int i; for (i = 1; i < argc; i ++) { @@ -9470,6 +9473,8 @@ main(int argc, char *argv[]) } } } + clock_stop(); + print_total_clock(); } return 0; } -- cgit