linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cyclictest - minor change request for histogram
@ 2012-02-10 12:45 Nicholas Mc Guire
  0 siblings, 0 replies; only message in thread
From: Nicholas Mc Guire @ 2012-02-10 12:45 UTC (permalink / raw)
  To: williams; +Cc: tglx, carsten.emde, linux-rt-users


HI !

 minor change request to the histogram in cyclictest to record the
 comandline - needed for confused people like me ...

 I would prefere if the commandline with the parameters used during the
 test-run would be recorded in the histogram output - thats what the 
 below patch does. i.e. runing:

hofrat@debian:~/rt-tests$ ./cyclictest -q -p 10 -n -h 50 -l 1000

would result in the histogram begin displayed as

# cmdline: ./cyclictest -q -p 10 -n -h 50 -l 1000
# Histogram
000000 000000
000001 000000
000002 000000
...

thx!
hofrat 


diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 731b4bd..66a68ed 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -942,6 +942,7 @@ static char *policyname(int policy)
 static void process_options (int argc, char *argv[])
 {
 	int error = 0;
+	int i = 0;
 	int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
 
 	for (;;) {
@@ -1136,6 +1137,13 @@ static void process_options (int argc, char *argv[])
 		warn("distance is ignored and set to 0, if histogram enabled\n");
 	if (distance == -1)
 		distance = DEFAULT_DISTANCE;
+	if (histogram) {
+		printf("# cmdline:");
+		for (i = 0; i < argc; i++) {
+			printf(" %s", argv[i]);
+		}
+		printf("\n");
+	}
 
 	if (priority < 0 || priority > 99)
 		error = 1;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-10 12:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 12:45 cyclictest - minor change request for histogram Nicholas Mc Guire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).