[COMMITTED] [benchtests] Add mandatory attributes to workload tests

Siddhesh Poyarekar siddhesh@sourceware.org
Sat Aug 11 13:27:00 GMT 2018


Add the duration and iterations attributes to the workloads tests to
make the json schema parser happy

	* benchtests/bench-skeleton.c (main): Add duration and
	iterations attributes.
---
 ChangeLog                   | 5 +++++
 benchtests/bench-skeleton.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 64ebb9fbfb..9c7bb73ff8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-11  Siddhesh Poyarekar  <siddhesh@sourceware.org>
+
+	* benchtests/bench-skeleton.c (main): Add duration and
+	iterations attributes.
+
 2018-08-10  Paul Eggert  <eggert@cs.ucla.edu>
 
 	regex: Gnulib unibyte RRI uses bytes not chars
diff --git a/benchtests/bench-skeleton.c b/benchtests/bench-skeleton.c
index 666212a64f..4fc1827ca5 100644
--- a/benchtests/bench-skeleton.c
+++ b/benchtests/bench-skeleton.c
@@ -144,6 +144,8 @@ main (int argc, char **argv)
 
       if (is_bench)
 	{
+	  json_attr_double (&json_ctx, "duration", throughput + latency);
+	  json_attr_double (&json_ctx, "iterations", 2 * d_total_i);
 	  json_attr_double (&json_ctx, "reciprocal-throughput",
 			    throughput / d_total_i);
 	  json_attr_double (&json_ctx, "latency", latency / d_total_i);
-- 
2.17.1



More information about the Libc-alpha mailing list