aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-05-17 12:03:18 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-05-17 12:03:18 +0200
commit4f3b7c0d75fd90ac064419d19d7af2e340d516aa (patch)
tree8e5b880c997c204fdf9b100b4aefbecdced33654 /test/monniaux
parente3b4b3280ffd0d57d4f40f5ca253a1c570ddd6c6 (diff)
downloadcompcert-kvx-4f3b7c0d75fd90ac064419d19d7af2e340d516aa.tar.gz
compcert-kvx-4f3b7c0d75fd90ac064419d19d7af2e340d516aa.zip
Adding more measures
Diffstat (limited to 'test/monniaux')
-rw-r--r--test/monniaux/binary_search/make.proto2
-rw-r--r--test/monniaux/bitsliced-aes/make.proto2
-rw-r--r--test/monniaux/bitsliced-tea/make.proto2
-rw-r--r--test/monniaux/complex/make.proto2
-rw-r--r--test/monniaux/float_mat/float_mat_run.c16
-rw-r--r--test/monniaux/float_mat/make.proto1
-rwxr-xr-xtest/monniaux/genmake.py10
-rw-r--r--test/monniaux/glibc_qsort/glibc_qsort_run.c2
-rw-r--r--test/monniaux/glibc_qsort/make.proto1
-rw-r--r--test/monniaux/heapsort/heapsort_run.c2
-rw-r--r--test/monniaux/heapsort/make.proto1
-rw-r--r--test/monniaux/idea/make.proto1
12 files changed, 26 insertions, 16 deletions
diff --git a/test/monniaux/binary_search/make.proto b/test/monniaux/binary_search/make.proto
index c5c39a6b..337751bb 100644
--- a/test/monniaux/binary_search/make.proto
+++ b/test/monniaux/binary_search/make.proto
@@ -1,2 +1,2 @@
target: binary_search
-measures: ["random fill", "search1"]
+measures: ["random fill", search1]
diff --git a/test/monniaux/bitsliced-aes/make.proto b/test/monniaux/bitsliced-aes/make.proto
index 5fb11e5f..8a9a1bff 100644
--- a/test/monniaux/bitsliced-aes/make.proto
+++ b/test/monniaux/bitsliced-aes/make.proto
@@ -1,4 +1,4 @@
sources: "$(wildcard *.c) tests/tests.c"
target: test
-measures: ["cycles"]
+measures: [cycles]
name: bitsliced-aes
diff --git a/test/monniaux/bitsliced-tea/make.proto b/test/monniaux/bitsliced-tea/make.proto
index 09113280..6cdc0814 100644
--- a/test/monniaux/bitsliced-tea/make.proto
+++ b/test/monniaux/bitsliced-tea/make.proto
@@ -1,4 +1,4 @@
objdeps: [{name: bstea_run, compiler: gcc}]
target: bstea
name: bitsliced-tea
-measures: ["cycles"]
+measures: [cycles]
diff --git a/test/monniaux/complex/make.proto b/test/monniaux/complex/make.proto
index b959c611..7041c6d8 100644
--- a/test/monniaux/complex/make.proto
+++ b/test/monniaux/complex/make.proto
@@ -1,2 +1,2 @@
target: complex_mat
-measures: ["c1_time"]
+measures: [c1_time, c1]
diff --git a/test/monniaux/float_mat/float_mat_run.c b/test/monniaux/float_mat/float_mat_run.c
index 5d34bb70..329648c2 100644
--- a/test/monniaux/float_mat/float_mat_run.c
+++ b/test/monniaux/float_mat/float_mat_run.c
@@ -93,14 +93,14 @@ int main() {
"c1==c6: %s\n"
"c1==c7: %s\n"
"c1==c8: %s\n"
- "c1_time = %" PRIu64 "\n"
- "c2_time = %" PRIu64 "\n"
- "c3_time = %" PRIu64 "\n"
- "c4_time = %" PRIu64 "\n"
- "c5_time = %" PRIu64 "\n"
- "c6_time = %" PRIu64 "\n"
- "c7_time = %" PRIu64 "\n"
- "c8_time = %" PRIu64 "\n",
+ "c1_time : %" PRIu64 "\n"
+ "c2_time : %" PRIu64 "\n"
+ "c3_time : %" PRIu64 "\n"
+ "c4_time : %" PRIu64 "\n"
+ "c5_time : %" PRIu64 "\n"
+ "c6_time : %" PRIu64 "\n"
+ "c7_time : %" PRIu64 "\n"
+ "c8_time : %" PRIu64 "\n",
REAL_mat_equal(m, n, c1, p, c2, p)?"true":"false",
REAL_mat_equal(m, n, c1, p, c3, p)?"true":"false",
diff --git a/test/monniaux/float_mat/make.proto b/test/monniaux/float_mat/make.proto
index 3628afbb..ebdd8930 100644
--- a/test/monniaux/float_mat/make.proto
+++ b/test/monniaux/float_mat/make.proto
@@ -1,2 +1,3 @@
objdeps: [{name: float_mat_run, compiler: gcc}]
target: float_mat
+measures: [[c2_time, c2]]
diff --git a/test/monniaux/genmake.py b/test/monniaux/genmake.py
index ddbdf839..30db9ac4 100755
--- a/test/monniaux/genmake.py
+++ b/test/monniaux/genmake.py
@@ -88,11 +88,17 @@ def print_measure_rule(environments, measures):
print("measures.csv: $(PRODUCTS_OUT)")
print(' echo ", {}" > $@'.format(make_env_list(environments)))
for measure in measures:
- print(' echo "{name} {measure}"'.format(name=basename if not name else name, measure=measure if len(measures) > 1 else ""), end="")
+ display_measure_name = (len(measures) > 1)
+ if isinstance(measure, list):
+ measure_name, measure_short = measure
+ display_measure_name = True
+ else:
+ measure_name = measure_short = measure
+ print(' echo "{name} {measure}"'.format(name=basename if not name else name, measure=measure_short if display_measure_name else ""), end="")
for env in environments:
for optim in env.optimizations:
print(", $$(grep '{measure}' {outfile} | cut -d':' -f2)".format(
- measure=measure, outfile=make_product(env, optim) + ".out"), end="")
+ measure=measure_name, outfile=make_product(env, optim) + ".out"), end="")
print('>> $@')
products = []
diff --git a/test/monniaux/glibc_qsort/glibc_qsort_run.c b/test/monniaux/glibc_qsort/glibc_qsort_run.c
index 92bfba4e..7fcb8130 100644
--- a/test/monniaux/glibc_qsort/glibc_qsort_run.c
+++ b/test/monniaux/glibc_qsort/glibc_qsort_run.c
@@ -41,7 +41,7 @@ int main (void) {
quicksort(vec, len, sizeof(data), data_compare, NULL);
quicksort_time = get_cycle() - quicksort_time;
printf("sorted=%s\n"
- "quicksort_time=%" PRIu64 "\n",
+ "quicksort_time:%" PRIu64 "\n",
data_vec_is_sorted(vec, len)?"true":"false",
quicksort_time);
free(vec);
diff --git a/test/monniaux/glibc_qsort/make.proto b/test/monniaux/glibc_qsort/make.proto
index d89f9ea4..763e77f5 100644
--- a/test/monniaux/glibc_qsort/make.proto
+++ b/test/monniaux/glibc_qsort/make.proto
@@ -1,2 +1,3 @@
objdeps: [{name: glibc_qsort_run, compiler: gcc}]
target: glibc_qsort
+measures: [quicksort_time]
diff --git a/test/monniaux/heapsort/heapsort_run.c b/test/monniaux/heapsort/heapsort_run.c
index 76378067..053822a3 100644
--- a/test/monniaux/heapsort/heapsort_run.c
+++ b/test/monniaux/heapsort/heapsort_run.c
@@ -13,7 +13,7 @@ int main (void) {
heapsort(vec, len);
heapsort_time = get_cycle() - heapsort_time;
printf("sorted=%s\n"
- "heapsort_time=%" PRIu64 "\n",
+ "heapsort_time:%" PRIu64 "\n",
data_vec_is_sorted(vec, len)?"true":"false",
heapsort_time);
free(vec);
diff --git a/test/monniaux/heapsort/make.proto b/test/monniaux/heapsort/make.proto
index edbf0efd..0b5972d6 100644
--- a/test/monniaux/heapsort/make.proto
+++ b/test/monniaux/heapsort/make.proto
@@ -1,2 +1,3 @@
objdeps: [{name: heapsort_run, compiler: gcc}]
target: heapsort
+measures: [heapsort_time]
diff --git a/test/monniaux/idea/make.proto b/test/monniaux/idea/make.proto
index b633a3be..0e147514 100644
--- a/test/monniaux/idea/make.proto
+++ b/test/monniaux/idea/make.proto
@@ -1 +1,2 @@
target: idea
+measures: [cycles]