Rename --output to --json
cover Rename --output to --json
This is the final cleanup for the JSON output feature. As agreed on IRC rename the very generic --output command line option to a more specific one --json.
Update the man pages accordingly.
Daniel Wagner (23):
cyclicdeadline: Fix JSON output format
cyclictest: Rename command line option --output to --json
oslat: Rename command line option --output to --json
pi_stress: Rename command line option --output to --json
pmqtest: Rename command line option --output to --json
ptsematest: Rename command line option --output to --json
rt-migrate-test: Rename command line option --output to --json
cyclicdeadline: Rename command line option --output to --json
signaltest: Rename command line option --output to --json
sigwaittest: Rename command line option --output to --json
ssdd: Rename command line option --output to --json
svsematest: Rename command line option --output to --json
cyclictest: Add --json to man page
oslat: Add --json to man page
pi_stress: Add --json to man page
pmqtest: Add --json to man page
ptsematest: Add --json to man page
rt-migrate-test: Add --json to man page
cyclicdeadline: Add --json to man page
signaltest: Add --json to man page
sigwaittest: Add --json to man page
ssdd: Add --json to man page
svematest: Add --json to man page
src/cyclictest/cyclictest.8 | 7 +++++-- src/cyclictest/cyclictest.c | 20 ++++++++++---------- src/oslat/oslat.8 | 8 ++++++-- src/oslat/oslat.c | 18 +++++++++--------- src/pi_tests/pi_stress.8 | 8 +++++++- src/pi_tests/pi_stress.c | 18 +++++++++--------- src/pmqtest/pmqtest.8 | 5 ++++- src/pmqtest/pmqtest.c | 21 ++++++++++----------- src/ptsematest/ptsematest.8 | 5 ++++- src/ptsematest/ptsematest.c | 18 +++++++++--------- src/rt-migrate-test/rt-migrate-test.8 | 6 +++++- src/rt-migrate-test/rt-migrate-test.c | 20 ++++++++++---------- src/sched_deadline/cyclicdeadline.8 | 5 ++++- src/sched_deadline/cyclicdeadline.c | 18 +++++++++--------- src/signaltest/signaltest.8 | 5 ++++- src/signaltest/signaltest.c | 20 ++++++++++---------- src/sigwaittest/sigwaittest.8 | 5 ++++- src/sigwaittest/sigwaittest.c | 18 +++++++++--------- src/ssdd/ssdd.8 | 5 ++++- src/ssdd/ssdd.c | 16 ++++++++-------- src/svsematest/svsematest.8 | 5 ++++- src/svsematest/svsematest.c | 18 +++++++++--------- 22 files changed, 153 insertions(+), 116 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/23 cyclicdeadline: Fix JSON output format
Add missing comma after the max entry.
--- src/sched_deadline/cyclicdeadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/sched_deadline/cyclicdeadline.c +1 -1
@@ -977,7 +977,7 @@ static void write_stats(FILE *f, void *data)fprintf (f," \"%u\": {\n" , i);fprintf (f," \"cycles\": %ld,\n" , s->cycles);fprintf (f," \"min\": %ld,\n" , s->min); -fprintf (f," \"max\": %ld\n" , s->max); +fprintf (f," \"max\": %ld,\n" , s->max);fprintf (f," \"avg\": %.2f\n" , s->avg/s->cycles);fprintf (f," }%s\n" , i == nr_threads -1 ?"" :"," ); }
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 01/23] cyclicdeadline: Fix JSON output format
Quoted 24 lines · Daniel Wagner
Add missing comma after the max entry.
Signed-off-by Daniel Wagner <[email protected]>--- src/sched_deadline/cyclicdeadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/sched_deadline/cyclicdeadline.c +1
-1@@ -977,7 +977,7 @@ static void write_stats(FILE *f, void *data)fprintf (f," \"%u\": {\n" , i);fprintf (f," \"cycles\": %ld,\n" , s->cycles);fprintf (f," \"min\": %ld,\n" , s->min); -fprintf (f," \"max\": %ld\n" , s->max); +fprintf (f," \"max\": %ld,\n" , s->max);fprintf (f," \"avg\": %.2f\n" , s->avg/s->cycles);fprintf (f," }%s\n" , i == nr_threads -1 ?"" :"," ); }Signature · 1 line
2.31.1
PATCH 2/23 cyclictest: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/cyclictest/cyclictest.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
src/cyclictest/cyclictest.c +10 -10
@@ -218,7 +218,7 @@ static struct timespec globalt;static char fifopath[MAX_PATH ];static char histfile[MAX_PATH ]; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static struct thread_param **parameters;static struct thread_stat **statistics;
@@ -832,6 +832,7 @@ static void display_help(int error)"-H --histofall=US same as -h except with an additional summary column\n" " --histfile=<path> dump the latency histogram to <path> instead of stdout\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" " --laptop Save battery when running cyclictest\n" " This will give you poorer realtime results\n"
@@ -841,7 +842,6 @@ static void display_help(int error)" latency is hit. Useful for low bandwidth.\n" "-N --nsecs print results in ns instead of us (default us)\n" "-o RED --oscope=RED oscilloscope mode, reduce verbose output by RED\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --priority=PRIO priority of highest prio thread\n" " --policy=NAME policy of measurement thread, where NAME may be one\n" " of: other, normal, batch, idle, fifo or rr.\n"
@@ -944,14 +944,14 @@ enum option_values {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_CLOCK ,OPT_DISTANCE ,OPT_DURATION ,OPT_LATENCY ,OPT_FIFO ,OPT_HISTOGRAM ,OPT_HISTOFALL ,OPT_HISTFILE , -OPT_INTERVAL ,OPT_LOOPS ,OPT_MLOCKALL ,OPT_REFRESH , +OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_MLOCKALL ,OPT_REFRESH ,OPT_NANOSLEEP ,OPT_NSECS ,OPT_OSCOPE ,OPT_PRIORITY ,OPT_QUIET ,OPT_PRIOSPREAD ,OPT_RELATIVE ,OPT_RESOLUTION ,OPT_SYSTEM ,OPT_SMP ,OPT_THREADS ,OPT_TRIGGER ,OPT_TRIGGER_NODES ,OPT_UNBUFFERED ,OPT_NUMA ,OPT_VERBOSE ,OPT_DBGCYCLIC ,OPT_POLICY ,OPT_HELP ,OPT_NUMOPTS ,OPT_ALIGNED ,OPT_SECALIGNED ,OPT_LAPTOP ,OPT_SMI , -OPT_TRACEMARK ,OPT_POSIX_TIMERS ,OPT_OUTPUT + OPT_TRACEMARK, OPT_POSIX_TIMERS, };/* Process commandline options */
@@ -979,13 +979,13 @@ static void process_options(int argc, char *argv[], int max_cpus) {"histofall", required_argument, NULL, OPT_HISTOFALL }, {"histfile", required_argument, NULL, OPT_HISTFILE }, {"interval", required_argument, NULL, OPT_INTERVAL }, + {"json", required_argument, NULL, OPT_JSON }, {"laptop", no_argument, NULL, OPT_LAPTOP }, {"loops", required_argument, NULL, OPT_LOOPS }, {"mlockall", no_argument, NULL, OPT_MLOCKALL }, {"refresh_on_max", no_argument, NULL, OPT_REFRESH }, {"nsecs", no_argument, NULL, OPT_NSECS }, {"oscope", required_argument, NULL, OPT_OSCOPE }, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY }, {"quiet", no_argument, NULL, OPT_QUIET }, {"priospread", no_argument, NULL, OPT_PRIOSPREAD },
@@ -1080,6 +1080,9 @@ static void process_options(int argc, char *argv[], int max_cpus)case 'i' :case OPT_INTERVAL : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case 'l' :case OPT_LOOPS : max_cycles =atoi (optarg);break ;
@@ -1095,9 +1098,6 @@ static void process_options(int argc, char *argv[], int max_cpus)case 'o' :case OPT_OSCOPE : oscope_reduction =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case 'p' :case OPT_PRIORITY : priority =atoi (optarg);
@@ -2134,8 +2134,8 @@ int main(int argc, char **argv)if (!verbose && !quiet && refresh_on_max)printf ("\033[%dB" , num_threads +2 ); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, ret, write_stats,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, ret, write_stats,NULL );if (quiet) quiet =2 ;
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 02/23] cyclictest: Rename command line option --output to --json
Quoted 108 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/cyclictest/cyclictest.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)src/cyclictest/cyclictest.c +10
-10@@ -218,7 +218,7 @@ static struct timespec globalt;static char fifopath[MAX_PATH ];static char histfile[MAX_PATH ]; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static struct thread_param **parameters;static struct thread_stat **statistics;@@ -832,6 +832,7 @@ static void display_help(int error)"-H --histofall=US same as -h except with an additional summary column\n" " --histfile=<path> dump the latency histogram to <path> instead of stdout\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" " --laptop Save battery when running cyclictest\n" " This will give you poorer realtime results\n" @@ -841,7 +842,6 @@ static void display_help(int error)" latency is hit. Useful for low bandwidth.\n" "-N --nsecs print results in ns instead of us (default us)\n" "-o RED --oscope=RED oscilloscope mode, reduce verbose output by RED\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --priority=PRIO priority of highest prio thread\n" " --policy=NAME policy of measurement thread, where NAME may be one\n" " of: other, normal, batch, idle, fifo or rr.\n" @@ -944,14 +944,14 @@ enum option_values {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_CLOCK ,OPT_DISTANCE ,OPT_DURATION ,OPT_LATENCY ,OPT_FIFO ,OPT_HISTOGRAM ,OPT_HISTOFALL ,OPT_HISTFILE , -OPT_INTERVAL ,OPT_LOOPS ,OPT_MLOCKALL ,OPT_REFRESH , +OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_MLOCKALL ,OPT_REFRESH ,OPT_NANOSLEEP ,OPT_NSECS ,OPT_OSCOPE ,OPT_PRIORITY ,OPT_QUIET ,OPT_PRIOSPREAD ,OPT_RELATIVE ,OPT_RESOLUTION ,OPT_SYSTEM ,OPT_SMP ,OPT_THREADS ,OPT_TRIGGER ,OPT_TRIGGER_NODES ,OPT_UNBUFFERED ,OPT_NUMA ,OPT_VERBOSE ,OPT_DBGCYCLIC ,OPT_POLICY ,OPT_HELP ,OPT_NUMOPTS ,OPT_ALIGNED ,OPT_SECALIGNED ,OPT_LAPTOP ,OPT_SMI , -OPT_TRACEMARK ,OPT_POSIX_TIMERS ,OPT_OUTPUT + OPT_TRACEMARK, OPT_POSIX_TIMERS, };/* Process commandline options */ @@ -979,13 +979,13 @@ static void process_options(int argc, char *argv[], int max_cpus) {"histofall", required_argument, NULL, OPT_HISTOFALL }, {"histfile", required_argument, NULL, OPT_HISTFILE }, {"interval", required_argument, NULL, OPT_INTERVAL }, + {"json", required_argument, NULL, OPT_JSON }, {"laptop", no_argument, NULL, OPT_LAPTOP }, {"loops", required_argument, NULL, OPT_LOOPS }, {"mlockall", no_argument, NULL, OPT_MLOCKALL }, {"refresh_on_max", no_argument, NULL, OPT_REFRESH }, {"nsecs", no_argument, NULL, OPT_NSECS }, {"oscope", required_argument, NULL, OPT_OSCOPE }, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY }, {"quiet", no_argument, NULL, OPT_QUIET }, {"priospread", no_argument, NULL, OPT_PRIOSPREAD },@@ -1080,6 +1080,9 @@ static void process_options(int argc, char *argv[], int max_cpus)case 'i' :case OPT_INTERVAL : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case 'l' :case OPT_LOOPS : max_cycles =atoi (optarg);break ;@@ -1095,9 +1098,6 @@ static void process_options(int argc, char *argv[], int max_cpus)case 'o' :case OPT_OSCOPE : oscope_reduction =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case 'p' :case OPT_PRIORITY : priority =atoi (optarg);@@ -2134,8 +2134,8 @@ int main(int argc, char **argv)if (!verbose && !quiet && refresh_on_max)printf ("\033[%dB" , num_threads +2 ); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, ret, write_stats,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, ret, write_stats,NULL );if (quiet) quiet =2 ;Signature · 1 line
2.31.1
PATCH 3/23 oslat: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/oslat/oslat.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
src/oslat/oslat.c +9 -9
@@ -174,7 +174,7 @@ struct global {int quiet;int single_preheat_thread;int output_omit_zero_buckets; -char outfile[MAX_PATH ]; +char jsonfile[MAX_PATH ];/* Mutable state. */ volatile enum command cmd;
@@ -560,6 +560,7 @@ static void usage(int error)"-C, --cpu-main-thread Specify which CPU the main thread runs on. Default is cpu0.\n" "-D, --duration Specify test duration, e.g., 60, 20m, 2H\n" " (m/M: minutes, h/H: hours, d/D: days)\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-f, --rtprio Using SCHED_FIFO priority (1-99)\n" "-m, --workload-mem Size of the memory to use for the workload (e.g., 4K, 1M).\n" " Total memory usage will be this value multiplies 2*N,\n"
@@ -570,7 +571,6 @@ static void usage(int error)" NOTE: please make sure the CPU frequency on all testing cores\n" " are locked before using this parmater. If you don't know how\n" " to lock the freq then please don't use this parameter.\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-T, --trace-threshold Stop the test when threshold triggered (in us),\n" " print a marker in ftrace and stop ftrace too.\n" "-v, --version Display the version of the software.\n"
@@ -597,8 +597,8 @@ static int workload_select(char *name)enum option_value {OPT_BUCKETSIZE =1 ,OPT_CPU_LIST ,OPT_CPU_MAIN_THREAD , -OPT_DURATION ,OPT_RT_PRIO ,OPT_HELP ,OPT_TRACE_TH , -OPT_WORKLOAD ,OPT_WORKLOAD_MEM ,OPT_BIAS ,OPT_OUTPUT , +OPT_DURATION ,OPT_JSON ,OPT_RT_PRIO ,OPT_HELP ,OPT_TRACE_TH , +OPT_WORKLOAD ,OPT_WORKLOAD_MEM ,OPT_BIAS ,OPT_QUIET ,OPT_SINGLE_PREHEAT ,OPT_ZERO_OMIT ,OPT_VERSION };
@@ -613,6 +613,7 @@ static void parse_options(int argc, char *argv[]) { "cpu-list", required_argument, NULL, OPT_CPU_LIST }, { "cpu-main-thread", required_argument, NULL, OPT_CPU_MAIN_THREAD}, { "duration", required_argument, NULL, OPT_DURATION }, + { "json", required_argument, NULL, OPT_JSON }, { "rtprio", required_argument, NULL, OPT_RT_PRIO }, { "help", no_argument, NULL, OPT_HELP }, { "trace-threshold", required_argument, NULL, OPT_TRACE_TH },
@@ -621,7 +622,6 @@ static void parse_options(int argc, char *argv[]) { "bias", no_argument, NULL, OPT_BIAS }, { "quiet", no_argument, NULL, OPT_QUIET }, { "single-preheat", no_argument, NULL, OPT_SINGLE_PREHEAT }, - { "output", required_argument, NULL, OPT_OUTPUT }, { "zero-omit", no_argument, NULL, OPT_ZERO_OMIT }, { "version", no_argument, NULL, OPT_VERSION }, { NULL, 0, NULL, 0 },
@@ -677,8 +677,8 @@ static void parse_options(int argc, char *argv[])exit (1 ); }break ; -case OPT_OUTPUT : -strncpy (g.outfile, optarg,strnlen (optarg,MAX_PATH -1 )); +case OPT_JSON : +strncpy (g.jsonfile, optarg,strnlen (optarg,MAX_PATH -1 ));break ;case OPT_TRACE_TH :case 'T' :
@@ -862,8 +862,8 @@ int main(int argc, char *argv[])write_summary (threads); -if (strlen (g.outfile) !=0 ) -rt_write_json (g.outfile,0 , write_summary_json, threads); +if (strlen (g.jsonfile) !=0 ) +rt_write_json (g.jsonfile,0 , write_summary_json, threads);if (g.cpu_list) {free (g.cpu_list);
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 03/23] oslat: Rename command line option --output to --json
Quoted 94 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/oslat/oslat.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)src/oslat/oslat.c +9
-9@@ -174,7 +174,7 @@ struct global {int quiet;int single_preheat_thread;int output_omit_zero_buckets; -char outfile[MAX_PATH ]; +char jsonfile[MAX_PATH ];/* Mutable state. */ volatile enum command cmd;@@ -560,6 +560,7 @@ static void usage(int error)"-C, --cpu-main-thread Specify which CPU the main thread runs on. Default is cpu0.\n" "-D, --duration Specify test duration, e.g., 60, 20m, 2H\n" " (m/M: minutes, h/H: hours, d/D: days)\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-f, --rtprio Using SCHED_FIFO priority (1-99)\n" "-m, --workload-mem Size of the memory to use for the workload (e.g., 4K, 1M).\n" " Total memory usage will be this value multiplies 2*N,\n" @@ -570,7 +571,6 @@ static void usage(int error)" NOTE: please make sure the CPU frequency on all testing cores\n" " are locked before using this parmater. If you don't know how\n" " to lock the freq then please don't use this parameter.\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-T, --trace-threshold Stop the test when threshold triggered (in us),\n" " print a marker in ftrace and stop ftrace too.\n" "-v, --version Display the version of the software.\n" @@ -597,8 +597,8 @@ static int workload_select(char *name)enum option_value {OPT_BUCKETSIZE =1 ,OPT_CPU_LIST ,OPT_CPU_MAIN_THREAD , -OPT_DURATION ,OPT_RT_PRIO ,OPT_HELP ,OPT_TRACE_TH , -OPT_WORKLOAD ,OPT_WORKLOAD_MEM ,OPT_BIAS ,OPT_OUTPUT , +OPT_DURATION ,OPT_JSON ,OPT_RT_PRIO ,OPT_HELP ,OPT_TRACE_TH , +OPT_WORKLOAD ,OPT_WORKLOAD_MEM ,OPT_BIAS ,OPT_QUIET ,OPT_SINGLE_PREHEAT ,OPT_ZERO_OMIT ,OPT_VERSION };@@ -613,6 +613,7 @@ static void parse_options(int argc, char *argv[]) { "cpu-list", required_argument, NULL, OPT_CPU_LIST }, { "cpu-main-thread", required_argument, NULL, OPT_CPU_MAIN_THREAD}, { "duration", required_argument, NULL, OPT_DURATION }, + { "json", required_argument, NULL, OPT_JSON }, { "rtprio", required_argument, NULL, OPT_RT_PRIO }, { "help", no_argument, NULL, OPT_HELP }, { "trace-threshold", required_argument, NULL, OPT_TRACE_TH },@@ -621,7 +622,6 @@ static void parse_options(int argc, char *argv[]) { "bias", no_argument, NULL, OPT_BIAS }, { "quiet", no_argument, NULL, OPT_QUIET }, { "single-preheat", no_argument, NULL, OPT_SINGLE_PREHEAT }, - { "output", required_argument, NULL, OPT_OUTPUT }, { "zero-omit", no_argument, NULL, OPT_ZERO_OMIT }, { "version", no_argument, NULL, OPT_VERSION }, { NULL, 0, NULL, 0 },@@ -677,8 +677,8 @@ static void parse_options(int argc, char *argv[])exit (1 ); }break ; -case OPT_OUTPUT : -strncpy (g.outfile, optarg,strnlen (optarg,MAX_PATH -1 )); +case OPT_JSON : +strncpy (g.jsonfile, optarg,strnlen (optarg,MAX_PATH -1 ));break ;case OPT_TRACE_TH :case 'T' :@@ -862,8 +862,8 @@ int main(int argc, char *argv[])write_summary (threads); -if (strlen (g.outfile) !=0 ) -rt_write_json (g.outfile,0 , write_summary_json, threads); +if (strlen (g.jsonfile) !=0 ) +rt_write_json (g.jsonfile,0 , write_summary_json, threads);if (g.cpu_list) {free (g.cpu_list);Signature · 1 line
2.31.1
PATCH 4/23 pi_stress: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/pi_tests/pi_stress.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
src/pi_tests/pi_stress.c +9 -9
@@ -100,7 +100,7 @@ int debugging = 0;int quiet =0 ;/* turn off all prints, default = 0 (off) */ /* filename for JSON output */ -char outfile[MAX_PATH ]; +char jsonfile[MAX_PATH ];/* prompt to start test */ int prompt =0 ;
@@ -342,8 +342,8 @@ int main(int argc, char **argv) finish =time (NULL );summary (); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, retval, write_stats,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, retval, write_stats,NULL );if (lockall)munlockall ();
@@ -992,8 +992,8 @@ void usage(int error)"-g N --groups=N set the number of inversion groups\n" "-h --help print this message\n" "-i INV --inversions=INV number of inversions per group (default is infinite)\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-m --mlockall lock current and future memory\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p --prompt prompt before starting the test\n" "-q --quiet suppress running output\n" "-r --rr use SCHED_RR for test threads [SCHED_FIFO]\n"
@@ -1287,7 +1287,7 @@ int process_sched_line(const char *arg)enum option_values {OPT_DEBUG =1 ,OPT_DURATION ,OPT_GROUPS ,OPT_HELP ,OPT_INVERSIONS , -OPT_MLOCKALL ,OPT_OUTPUT ,OPT_PROMPT ,OPT_QUIET ,OPT_RR ,OPT_SCHED , +OPT_JSON ,OPT_MLOCKALL ,OPT_PROMPT ,OPT_QUIET ,OPT_RR ,OPT_SCHED ,OPT_UNIPROCESSOR ,OPT_VERBOSE ,OPT_VERSION , };
@@ -1300,8 +1300,8 @@ void process_command_line(int argc, char **argv) {"groups", required_argument, NULL, OPT_GROUPS}, {"help", no_argument, NULL, OPT_HELP}, {"inversions", required_argument, NULL, OPT_INVERSIONS}, + {"json", required_argument, NULL, OPT_JSON}, {"mlockall", no_argument, NULL, OPT_MLOCKALL}, - {"output", required_argument, NULL, OPT_OUTPUT}, {"prompt", no_argument, NULL, OPT_PROMPT}, {"quiet", no_argument, NULL, OPT_QUIET}, {"rr", no_argument, NULL, OPT_RR},
@@ -1344,13 +1344,13 @@ void process_command_line(int argc, char **argv) inversions =strtol (optarg,NULL ,10 );pi_info ("doing %d inversion per group\n" , inversions);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_MLOCKALL :case 'm' : lockall =1 ;break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PROMPT :case 'p' : prompt =1 ;
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 04/23] pi_stress: Rename command line option --output to --json
Quoted 86 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/pi_tests/pi_stress.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)src/pi_tests/pi_stress.c +9
-9@@ -100,7 +100,7 @@ int debugging = 0;int quiet =0 ;/* turn off all prints, default = 0 (off) */ /* filename for JSON output */ -char outfile[MAX_PATH ]; +char jsonfile[MAX_PATH ];/* prompt to start test */ int prompt =0 ;@@ -342,8 +342,8 @@ int main(int argc, char **argv) finish =time (NULL );summary (); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, retval, write_stats,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, retval, write_stats,NULL );if (lockall)munlockall ();@@ -992,8 +992,8 @@ void usage(int error)"-g N --groups=N set the number of inversion groups\n" "-h --help print this message\n" "-i INV --inversions=INV number of inversions per group (default is infinite)\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-m --mlockall lock current and future memory\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p --prompt prompt before starting the test\n" "-q --quiet suppress running output\n" "-r --rr use SCHED_RR for test threads [SCHED_FIFO]\n" @@ -1287,7 +1287,7 @@ int process_sched_line(const char *arg)enum option_values {OPT_DEBUG =1 ,OPT_DURATION ,OPT_GROUPS ,OPT_HELP ,OPT_INVERSIONS , -OPT_MLOCKALL ,OPT_OUTPUT ,OPT_PROMPT ,OPT_QUIET ,OPT_RR ,OPT_SCHED , +OPT_JSON ,OPT_MLOCKALL ,OPT_PROMPT ,OPT_QUIET ,OPT_RR ,OPT_SCHED ,OPT_UNIPROCESSOR ,OPT_VERBOSE ,OPT_VERSION , };@@ -1300,8 +1300,8 @@ void process_command_line(int argc, char **argv) {"groups", required_argument, NULL, OPT_GROUPS}, {"help", no_argument, NULL, OPT_HELP}, {"inversions", required_argument, NULL, OPT_INVERSIONS}, + {"json", required_argument, NULL, OPT_JSON}, {"mlockall", no_argument, NULL, OPT_MLOCKALL}, - {"output", required_argument, NULL, OPT_OUTPUT}, {"prompt", no_argument, NULL, OPT_PROMPT}, {"quiet", no_argument, NULL, OPT_QUIET}, {"rr", no_argument, NULL, OPT_RR},@@ -1344,13 +1344,13 @@ void process_command_line(int argc, char **argv) inversions =strtol (optarg,NULL ,10 );pi_info ("doing %d inversion per group\n" , inversions);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_MLOCKALL :case 'm' : lockall =1 ;break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PROMPT :case 'p' : prompt =1 ;Signature · 1 line
2.31.1
PATCH 5/23 pmqtest: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/pmqtest/pmqtest.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
src/pmqtest/pmqtest.c +10 -11
@@ -231,8 +231,8 @@ static void display_help(int error)"-f TO --forcetimeout=TO force timeout of mq_timedreceive(), requires -T\n" "-h --help print this help message\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-q --quiet print a summary only on exit\n" "-S --smp SMP testing: options -a -t and same priority\n"
@@ -260,13 +260,12 @@ static int sameprio;static int timeout;static int forcetimeout;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_FORCETIMEOUT ,OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS , -OPT_OUTPUT ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS , -OPT_TIMEOUT +OPT_FORCETIMEOUT ,OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS , +OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS ,OPT_TIMEOUT };static void process_options (int argc,char *argv[])
@@ -285,8 +284,8 @@ static void process_options(int argc, char *argv[]) {"forcetimeout",required_argument, NULL, OPT_FORCETIMEOUT}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON }, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},
@@ -340,13 +339,13 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);
@@ -647,12 +646,12 @@ int main(int argc, char *argv[])mq_unlink (mqname); } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nomem:
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 05/23] pmqtest: Rename command line option --output to --json
Quoted 89 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/pmqtest/pmqtest.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)src/pmqtest/pmqtest.c +10
-11@@ -231,8 +231,8 @@ static void display_help(int error)"-f TO --forcetimeout=TO force timeout of mq_timedreceive(), requires -T\n" "-h --help print this help message\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-q --quiet print a summary only on exit\n" "-S --smp SMP testing: options -a -t and same priority\n" @@ -260,13 +260,12 @@ static int sameprio;static int timeout;static int forcetimeout;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_FORCETIMEOUT ,OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS , -OPT_OUTPUT ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS , -OPT_TIMEOUT +OPT_FORCETIMEOUT ,OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS , +OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS ,OPT_TIMEOUT };static void process_options (int argc,char *argv[])@@ -285,8 +284,8 @@ static void process_options(int argc, char *argv[]) {"forcetimeout",required_argument, NULL, OPT_FORCETIMEOUT}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON }, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},@@ -340,13 +339,13 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);@@ -647,12 +646,12 @@ int main(int argc, char *argv[])mq_unlink (mqname); } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nomem:Signature · 1 line
2.31.1
PATCH 6/23 ptsematest: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/ptsematest/ptsematest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
src/ptsematest/ptsematest.c +9 -9
@@ -155,8 +155,8 @@ static void display_help(int error)" Append 'm', 'h', or 'd' to specify minutes, hours or\n" " days.\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-q --quiet print a summary only on exit\n" "-S --smp SMP testing: options -a -t and same priority\n"
@@ -182,11 +182,11 @@ static int distance = 500;static int smp;static int sameprio;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS ,OPT_OUTPUT ,OPT_PRIORITY , +OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS };
@@ -205,8 +205,8 @@ static void process_options(int argc, char *argv[]) {"duration", required_argument, NULL, OPT_DURATION}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON }, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument , NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},
@@ -250,6 +250,9 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_HELP :case '?' :case 'h' :
@@ -259,9 +262,6 @@ static void process_options(int argc, char *argv[])case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);
@@ -515,12 +515,12 @@ int main(int argc, char *argv[])pthread_mutex_destroy (&syncmutex[i]); } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nomem:
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 06/23] ptsematest: Rename command line option --output to --json
Quoted 89 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/ptsematest/ptsematest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)src/ptsematest/ptsematest.c +9
-9@@ -155,8 +155,8 @@ static void display_help(int error)" Append 'm', 'h', or 'd' to specify minutes, hours or\n" " days.\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-q --quiet print a summary only on exit\n" "-S --smp SMP testing: options -a -t and same priority\n" @@ -182,11 +182,11 @@ static int distance = 500;static int smp;static int sameprio;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS ,OPT_OUTPUT ,OPT_PRIORITY , +OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS };@@ -205,8 +205,8 @@ static void process_options(int argc, char *argv[]) {"duration", required_argument, NULL, OPT_DURATION}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON }, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument , NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},@@ -250,6 +250,9 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_HELP :case '?' :case 'h' :@@ -259,9 +262,6 @@ static void process_options(int argc, char *argv[])case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);@@ -515,12 +515,12 @@ int main(int argc, char *argv[])pthread_mutex_destroy (&syncmutex[i]); } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nomem:Signature · 1 line
2.31.1
PATCH 7/23 rt-migrate-test: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/rt-migrate-test/rt-migrate-test.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
src/rt-migrate-test/rt-migrate-test.c +10 -10
@@ -102,7 +102,7 @@ static int done;static int loop;static int duration;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static pthread_barrier_t start_barrier;static pthread_barrier_t end_barrier;
@@ -162,9 +162,9 @@ static void usage(int error)" days.\n" "-e --equal Use equal prio for #CPU-1 tasks (requires > 2 CPUS)\n" "-h --help Print this help message\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS Number of iterations to run (50)\n" "-m TIME --maxerr=TIME Max allowed error (microsecs)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO base priority to start RT tasks with (2)\n" "-q --quiet print a summary only on exit\n" "-r TIME --run-time=TIME Run time (ms) to busy loop the threads (20)\n"
@@ -175,8 +175,8 @@ static void usage(int error) }enum option_value { -OPT_CHECK =1 ,OPT_DURATION ,OPT_EQUAL ,OPT_HELP ,OPT_LOOPS , -OPT_MAXERR ,OPT_OUTPUT ,OPT_PRIO ,OPT_QUIET ,OPT_RUN_TIME , +OPT_CHECK =1 ,OPT_DURATION ,OPT_EQUAL ,OPT_HELP ,OPT_JSON , +OPT_LOOPS ,OPT_MAXERR ,OPT_PRIO ,OPT_QUIET ,OPT_RUN_TIME ,OPT_SLEEP_TIME };
@@ -190,9 +190,9 @@ static void parse_options(int argc, char *argv[]) {"duration", required_argument, NULL, OPT_DURATION}, {"equal", no_argument, NULL, OPT_EQUAL}, {"help", no_argument, NULL, OPT_HELP}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, {"maxerr", required_argument, NULL, OPT_MAXERR}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"prio", required_argument, NULL, OPT_PRIO}, {"quiet", no_argument, NULL, OPT_QUIET}, {"run-time", required_argument, NULL, OPT_RUN_TIME},
@@ -221,6 +221,9 @@ static void parse_options(int argc, char *argv[])case 'h' :usage (0 );break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : nr_runs =atoi (optarg);
@@ -229,9 +232,6 @@ static void parse_options(int argc, char *argv[])case 'm' : max_err =usec2nano (atoi (optarg));break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIO :case 'p' : prio_start =atoi (optarg);
@@ -663,8 +663,8 @@ int main (int argc, char **argv)print_results (); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, check <0 , write_stats,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, check <0 , write_stats,NULL );if (stop) {/*
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 07/23] rt-migrate-test: Rename command line option --output to --json
Quoted 93 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/rt-migrate-test/rt-migrate-test.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)src/rt-migrate-test/rt-migrate-test.c +10
-10@@ -102,7 +102,7 @@ static int done;static int loop;static int duration;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static pthread_barrier_t start_barrier;static pthread_barrier_t end_barrier;@@ -162,9 +162,9 @@ static void usage(int error)" days.\n" "-e --equal Use equal prio for #CPU-1 tasks (requires > 2 CPUS)\n" "-h --help Print this help message\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS Number of iterations to run (50)\n" "-m TIME --maxerr=TIME Max allowed error (microsecs)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO base priority to start RT tasks with (2)\n" "-q --quiet print a summary only on exit\n" "-r TIME --run-time=TIME Run time (ms) to busy loop the threads (20)\n" @@ -175,8 +175,8 @@ static void usage(int error) }enum option_value { -OPT_CHECK =1 ,OPT_DURATION ,OPT_EQUAL ,OPT_HELP ,OPT_LOOPS , -OPT_MAXERR ,OPT_OUTPUT ,OPT_PRIO ,OPT_QUIET ,OPT_RUN_TIME , +OPT_CHECK =1 ,OPT_DURATION ,OPT_EQUAL ,OPT_HELP ,OPT_JSON , +OPT_LOOPS ,OPT_MAXERR ,OPT_PRIO ,OPT_QUIET ,OPT_RUN_TIME ,OPT_SLEEP_TIME };@@ -190,9 +190,9 @@ static void parse_options(int argc, char *argv[]) {"duration", required_argument, NULL, OPT_DURATION}, {"equal", no_argument, NULL, OPT_EQUAL}, {"help", no_argument, NULL, OPT_HELP}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, {"maxerr", required_argument, NULL, OPT_MAXERR}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"prio", required_argument, NULL, OPT_PRIO}, {"quiet", no_argument, NULL, OPT_QUIET}, {"run-time", required_argument, NULL, OPT_RUN_TIME},@@ -221,6 +221,9 @@ static void parse_options(int argc, char *argv[])case 'h' :usage (0 );break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : nr_runs =atoi (optarg);@@ -229,9 +232,6 @@ static void parse_options(int argc, char *argv[])case 'm' : max_err =usec2nano (atoi (optarg));break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIO :case 'p' : prio_start =atoi (optarg);@@ -663,8 +663,8 @@ int main (int argc, char **argv)print_results (); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, check <0 , write_stats,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, check <0 , write_stats,NULL );if (stop) {/* Signature · 1 line
2.31.1
PATCH 8/23 cyclicdeadline: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/sched_deadline/cyclicdeadline.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
src/sched_deadline/cyclicdeadline.c +8 -8
@@ -89,7 +89,7 @@ static int nr_threads;static int use_nsecs;static int mark_fd;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static int find_mount (const char *mount,char *debugfs) {
@@ -605,7 +605,7 @@ static void usage(int error)"-h --help Show this help menu.\n" "-i INTV --interval The shortest deadline for the tasks in us\n" " (default 1000us).\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-s STEP --step The amount to increase the deadline for each task in us\n" " (default 500us).\n" "-t NUM --threads The number of threads to run as deadline (default 1).\n"
@@ -986,7 +986,7 @@ static void write_stats(FILE *f, void *data)enum options_valud {OPT_AFFINITY =1 ,OPT_DURATION ,OPT_HELP ,OPT_INTERVAL , -OPT_OUTPUT ,OPT_STEP ,OPT_THREADS ,OPT_QUIET +OPT_JSON ,OPT_STEP ,OPT_THREADS ,OPT_QUIET };int main (int argc,char **argv)
@@ -1021,7 +1021,7 @@ int main(int argc, char **argv) { "duration", required_argument, NULL, OPT_DURATION }, { "help", no_argument, NULL, OPT_HELP }, { "interval", required_argument, NULL, OPT_INTERVAL }, - { "output", required_argument, NULL, OPT_OUTPUT }, + { "json", required_argument, NULL, OPT_JSON }, { "step", required_argument, NULL, OPT_STEP }, { "threads", required_argument, NULL, OPT_THREADS }, { "quiet", no_argument, NULL, OPT_QUIET },
@@ -1047,8 +1047,8 @@ int main(int argc, char **argv)case 'i' : interval =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 ));break ;case OPT_STEP :case 's' :
@@ -1227,8 +1227,8 @@ int main(int argc, char **argv) } } -if (strlen (outfile) !=0 ) -rt_write_json (outfile,0 , write_stats, sched_data); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile,0 , write_stats, sched_data);if (setcpu_buf)free (setcpu_buf);
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 08/23] cyclicdeadline: Rename command line option --output to --json
Quoted 78 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/sched_deadline/cyclicdeadline.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)src/sched_deadline/cyclicdeadline.c +8
-8@@ -89,7 +89,7 @@ static int nr_threads;static int use_nsecs;static int mark_fd;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static int find_mount (const char *mount,char *debugfs) {@@ -605,7 +605,7 @@ static void usage(int error)"-h --help Show this help menu.\n" "-i INTV --interval The shortest deadline for the tasks in us\n" " (default 1000us).\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-s STEP --step The amount to increase the deadline for each task in us\n" " (default 500us).\n" "-t NUM --threads The number of threads to run as deadline (default 1).\n" @@ -986,7 +986,7 @@ static void write_stats(FILE *f, void *data)enum options_valud {OPT_AFFINITY =1 ,OPT_DURATION ,OPT_HELP ,OPT_INTERVAL , -OPT_OUTPUT ,OPT_STEP ,OPT_THREADS ,OPT_QUIET +OPT_JSON ,OPT_STEP ,OPT_THREADS ,OPT_QUIET };int main (int argc,char **argv)@@ -1021,7 +1021,7 @@ int main(int argc, char **argv) { "duration", required_argument, NULL, OPT_DURATION }, { "help", no_argument, NULL, OPT_HELP }, { "interval", required_argument, NULL, OPT_INTERVAL }, - { "output", required_argument, NULL, OPT_OUTPUT }, + { "json", required_argument, NULL, OPT_JSON }, { "step", required_argument, NULL, OPT_STEP }, { "threads", required_argument, NULL, OPT_THREADS }, { "quiet", no_argument, NULL, OPT_QUIET },@@ -1047,8 +1047,8 @@ int main(int argc, char **argv)case 'i' : interval =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 ));break ;case OPT_STEP :case 's' :@@ -1227,8 +1227,8 @@ int main(int argc, char **argv) } } -if (strlen (outfile) !=0 ) -rt_write_json (outfile,0 , write_stats, sched_data); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile,0 , write_stats, sched_data);if (setcpu_buf)free (setcpu_buf);Signature · 1 line
2.31.1
PATCH 9/23 signaltest: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/signaltest/signaltest.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
src/signaltest/signaltest.c +10 -10
@@ -187,9 +187,9 @@ static void display_help(int error)" Append 'm', 'h', or 'd' to specify minutes, hours or\n" " days.\n" "-h --help display usage information\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" "-m --mlockall lock current and future memory allocations\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority of highest prio thread\n" "-q --quiet print a summary only on exit\n" "-t NUM --threads=NUM number of threads: default=2\n"
@@ -210,12 +210,12 @@ static struct bitmask *affinity_mask = NULL;static int smp =0 ;static int numa =0 ;static int setaffinity =AFFINITY_UNSPECIFIED ; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_values {OPT_AFFINITY =1 ,OPT_BREAKTRACE , -OPT_DURATION ,OPT_HELP ,OPT_LOOPS , -OPT_MLOCKALL ,OPT_OUTPUT ,OPT_PRIORITY , +OPT_DURATION ,OPT_HELP ,OPT_JSON , +OPT_LOOPS ,OPT_MLOCKALL ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS ,OPT_VERBOSE };
@@ -233,9 +233,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus) {"breaktrace", required_argument, NULL, OPT_BREAKTRACE}, {"duration", required_argument, NULL, OPT_DURATION}, {"help", no_argument, NULL, OPT_HELP}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, {"mlockall", no_argument, NULL, OPT_MLOCKALL}, - {"output", required_argument, NULL, OPT_OUTPUT}, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},
@@ -287,6 +287,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)case 'h' :display_help (0 );break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);
@@ -295,9 +298,6 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)case 'm' : lockall =1 ;break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);
@@ -558,8 +558,8 @@ int main(int argc, char **argv)if (stat[i].values)free (stat[i].values); } -if (strlen (outfile) !=0 ) -rt_write_json (outfile, ret, write_stats, par); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, ret, write_stats, par);free (stat); outpar:
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 09/23] signaltest: Rename command line option --output to --json
Quoted 89 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/signaltest/signaltest.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)src/signaltest/signaltest.c +10
-10@@ -187,9 +187,9 @@ static void display_help(int error)" Append 'm', 'h', or 'd' to specify minutes, hours or\n" " days.\n" "-h --help display usage information\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" "-m --mlockall lock current and future memory allocations\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority of highest prio thread\n" "-q --quiet print a summary only on exit\n" "-t NUM --threads=NUM number of threads: default=2\n" @@ -210,12 +210,12 @@ static struct bitmask *affinity_mask = NULL;static int smp =0 ;static int numa =0 ;static int setaffinity =AFFINITY_UNSPECIFIED ; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_values {OPT_AFFINITY =1 ,OPT_BREAKTRACE , -OPT_DURATION ,OPT_HELP ,OPT_LOOPS , -OPT_MLOCKALL ,OPT_OUTPUT ,OPT_PRIORITY , +OPT_DURATION ,OPT_HELP ,OPT_JSON , +OPT_LOOPS ,OPT_MLOCKALL ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS ,OPT_VERBOSE };@@ -233,9 +233,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus) {"breaktrace", required_argument, NULL, OPT_BREAKTRACE}, {"duration", required_argument, NULL, OPT_DURATION}, {"help", no_argument, NULL, OPT_HELP}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, {"mlockall", no_argument, NULL, OPT_MLOCKALL}, - {"output", required_argument, NULL, OPT_OUTPUT}, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},@@ -287,6 +287,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)case 'h' :display_help (0 );break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);@@ -295,9 +298,6 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)case 'm' : lockall =1 ;break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);@@ -558,8 +558,8 @@ int main(int argc, char **argv)if (stat[i].values)free (stat[i].values); } -if (strlen (outfile) !=0 ) -rt_write_json (outfile, ret, write_stats, par); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, ret, write_stats, par);free (stat); outpar:Signature · 1 line
2.31.1
PATCH 10/23 sigwaittest: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/sigwaittest/sigwaittest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
src/sigwaittest/sigwaittest.c +9 -9
@@ -220,8 +220,8 @@ static void display_help(int error)" days.\n" "-f [OPT] --fork[=OPT] fork new processes instead of creating threads\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-q --quiet print a summary only on exit\n" "-t --threads one thread per available processor\n"
@@ -242,11 +242,11 @@ static int duration;static int interval =1000 ;static int distance =500 ;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS ,OPT_OUTPUT , +OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_PRIORITY ,OPT_QUIET ,OPT_THREADS };
@@ -267,8 +267,8 @@ static void process_options(int argc, char *argv[]) {"fork", optional_argument, NULL, OPT_FORK}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"threads", optional_argument, NULL, OPT_THREADS},
@@ -324,13 +324,13 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);
@@ -702,12 +702,12 @@ int main(int argc, char *argv[]) } } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nomem:
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 10/23] sigwaittest: Rename command line option --output to --json
Quoted 86 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/sigwaittest/sigwaittest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)src/sigwaittest/sigwaittest.c +9
-9@@ -220,8 +220,8 @@ static void display_help(int error)" days.\n" "-f [OPT] --fork[=OPT] fork new processes instead of creating threads\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-q --quiet print a summary only on exit\n" "-t --threads one thread per available processor\n" @@ -242,11 +242,11 @@ static int duration;static int interval =1000 ;static int distance =500 ;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS ,OPT_OUTPUT , +OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_PRIORITY ,OPT_QUIET ,OPT_THREADS };@@ -267,8 +267,8 @@ static void process_options(int argc, char *argv[]) {"fork", optional_argument, NULL, OPT_FORK}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT }, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"threads", optional_argument, NULL, OPT_THREADS},@@ -324,13 +324,13 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);@@ -702,12 +702,12 @@ int main(int argc, char *argv[]) } } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nomem:Signature · 1 line
2.31.1
PATCH 11/23 ssdd: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/ssdd/ssdd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
src/ssdd/ssdd.c +8 -8
@@ -67,11 +67,11 @@ static const char *get_state_name(int state)#define unused __attribute__((unused))static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static int got_sigchld; -enum option_value {OPT_NFORKS =1 ,OPT_NITERS ,OPT_HELP ,OPT_OUTPUT ,OPT_QUIET }; +enum option_value {OPT_NFORKS =1 ,OPT_NITERS ,OPT_HELP ,OPT_JSON ,OPT_QUIET };static void usage (int error) {
@@ -80,7 +80,7 @@ static void usage(int error)"ssdd <options>\n\n" "-f --forks=NUM number of forks\n" "-h --help print this message\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-q --quiet suppress running output\n" "-i --iters=NUM number of iterations\n" );
@@ -306,7 +306,7 @@ int main(int argc, char **argv)static struct option long_options[] = { {"forks" , required_argument,NULL ,OPT_NFORKS }, {"help" , no_argument,NULL ,OPT_HELP }, - {"output" , required_argument,NULL ,OPT_OUTPUT }, + {"json" , required_argument,NULL ,OPT_JSON }, {"quiet" , no_argument,NULL ,OPT_QUIET }, {"iters" , required_argument,NULL ,OPT_NITERS }, {NULL ,0 ,NULL ,0 },
@@ -323,8 +323,8 @@ int main(int argc, char **argv)case OPT_HELP :usage (0 );break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 ));break ;case OPT_QUIET :case 'q' :
@@ -374,8 +374,8 @@ int main(int argc, char **argv) "One or more tests FAILED" : "All tests PASSED"); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, error,NULL ,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, error,NULL ,NULL );exit (error); }
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 11/23] ssdd: Rename command line option --output to --json
Quoted 74 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/ssdd/ssdd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)src/ssdd/ssdd.c +8
-8@@ -67,11 +67,11 @@ static const char *get_state_name(int state)#define unused __attribute__((unused))static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];static int got_sigchld; -enum option_value {OPT_NFORKS =1 ,OPT_NITERS ,OPT_HELP ,OPT_OUTPUT ,OPT_QUIET }; +enum option_value {OPT_NFORKS =1 ,OPT_NITERS ,OPT_HELP ,OPT_JSON ,OPT_QUIET };static void usage (int error) {@@ -80,7 +80,7 @@ static void usage(int error)"ssdd <options>\n\n" "-f --forks=NUM number of forks\n" "-h --help print this message\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-q --quiet suppress running output\n" "-i --iters=NUM number of iterations\n" );@@ -306,7 +306,7 @@ int main(int argc, char **argv)static struct option long_options[] = { {"forks" , required_argument,NULL ,OPT_NFORKS }, {"help" , no_argument,NULL ,OPT_HELP }, - {"output" , required_argument,NULL ,OPT_OUTPUT }, + {"json" , required_argument,NULL ,OPT_JSON }, {"quiet" , no_argument,NULL ,OPT_QUIET }, {"iters" , required_argument,NULL ,OPT_NITERS }, {NULL ,0 ,NULL ,0 },@@ -323,8 +323,8 @@ int main(int argc, char **argv)case OPT_HELP :usage (0 );break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 ));break ;case OPT_QUIET :case 'q' :@@ -374,8 +374,8 @@ int main(int argc, char **argv) "One or more tests FAILED" : "All tests PASSED"); -if (strlen (outfile) !=0 ) -rt_write_json (outfile, error,NULL ,NULL ); +if (strlen (jsonfile) !=0 ) +rt_write_json (jsonfile, error,NULL ,NULL );exit (error); }Signature · 1 line
2.31.1
PATCH 12/23 svsematest: Rename command line option --output to --json
In reply to Daniel WagnerThe initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
--- src/svsematest/svsematest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
src/svsematest/svsematest.c +9 -9
@@ -233,8 +233,8 @@ static void display_help(int error)" days.\n" "-f [OPT] --fork[=OPT] fork new processes instead of creating threads\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-S --smp SMP testing: options -a -t and same priority\n" " of all threads\n"
@@ -257,11 +257,11 @@ static int distance = 500;static int smp;static int sameprio;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS ,OPT_OUTPUT , +OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS };
@@ -282,8 +282,8 @@ static void process_options(int argc, char *argv[]) {"fork", optional_argument, NULL, OPT_FORK}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT}, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},
@@ -343,13 +343,13 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);
@@ -774,12 +774,12 @@ int main(int argc, char *argv[]) } } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nosem:
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 12/23] svsematest: Rename command line option --output to --json
Quoted 86 lines · Daniel Wagner
The initial idea was to have several different output format supported but it turns out everyone is happy with JSON, so there is no need to add another format.
Thus let's make the command line option more specific and rename it to --json.
Signed-off-by Daniel Wagner <[email protected]>--- src/svsematest/svsematest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)src/svsematest/svsematest.c +9
-9@@ -233,8 +233,8 @@ static void display_help(int error)" days.\n" "-f [OPT] --fork[=OPT] fork new processes instead of creating threads\n" "-i INTV --interval=INTV base interval of thread in us default=1000\n" +" --json=FILENAME write final results into FILENAME, JSON formatted\n" "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n" -" --output=FILENAME write final results into FILENAME, JSON formatted\n" "-p PRIO --prio=PRIO priority\n" "-S --smp SMP testing: options -a -t and same priority\n" " of all threads\n" @@ -257,11 +257,11 @@ static int distance = 500;static int smp;static int sameprio;static int quiet; -static char outfile[MAX_PATH ]; +static char jsonfile[MAX_PATH ];enum option_value {OPT_AFFINITY =1 ,OPT_BREAKTRACE ,OPT_DISTANCE ,OPT_DURATION , -OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_LOOPS ,OPT_OUTPUT , +OPT_FORK ,OPT_HELP ,OPT_INTERVAL ,OPT_JSON ,OPT_LOOPS ,OPT_PRIORITY ,OPT_QUIET ,OPT_SMP ,OPT_THREADS };@@ -282,8 +282,8 @@ static void process_options(int argc, char *argv[]) {"fork", optional_argument, NULL, OPT_FORK}, {"help", no_argument, NULL, OPT_HELP}, {"interval", required_argument, NULL, OPT_INTERVAL}, + {"json", required_argument, NULL, OPT_JSON}, {"loops", required_argument, NULL, OPT_LOOPS}, - {"output", required_argument, NULL, OPT_OUTPUT}, {"priority", required_argument, NULL, OPT_PRIORITY}, {"quiet", no_argument, NULL, OPT_QUIET}, {"smp", no_argument, NULL, OPT_SMP},@@ -343,13 +343,13 @@ static void process_options(int argc, char *argv[])case 'i' : interval =atoi (optarg);break ; +case OPT_JSON : +strncpy (jsonfile, optarg,strnlen (optarg,MAX_PATH -1 )); +break ;case OPT_LOOPS :case 'l' : max_cycles =atoi (optarg);break ; -case OPT_OUTPUT : -strncpy (outfile, optarg,strnlen (optarg,MAX_PATH -1 )); -break ;case OPT_PRIORITY :case 'p' : priority =atoi (optarg);@@ -774,12 +774,12 @@ int main(int argc, char *argv[]) } } -if (strlen (outfile) !=0 ) { +if (strlen (jsonfile) !=0 ) {struct params_stats ps = { .receiver = receiver, .sender = sender, }; -rt_write_json (outfile,0 , write_stats, &ps); +rt_write_json (jsonfile,0 , write_stats, &ps); } nosem:Signature · 1 line
2.31.1
PATCH 13/23 cyclictest: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/cyclictest/cyclictest.8 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
src/cyclictest/cyclictest.8 +5 -2
@@ -17,8 +17,8 @@ cyclictest \- High resolution test program .SH SYNOPSIS .SY cyclictest .RI "[ \-hfmnqrsvMS ] [\-a " proc " ] [\-A " align " ] [\-b " usec " ] [\-c " clock " ] [\-d " dist " ] \ -[\-h " histogram " ] [\-i " intv " ] [\-l " loop " ] [\-o " red " ] [\-p " prio " ] \ -[\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]" +[\-h " histogram " ] [\-i " intv " ] [\-\-json " filename " ] [\-l " loop " ] [\-o " red " ] \ +[\-p " prio " ] [\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]" .\" .SH DESCRIPTION .\" This manual page documents briefly the
@@ -85,6 +85,9 @@ Dump the latency histogram to <path> instead of stdout. .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000us). This sets the interval of the first thread. See also \-d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. Cyclictest is stopped once the number of timer intervals has been reached. .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 13/23] cyclictest: Add --json to man page
Quoted 36 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/cyclictest/cyclictest.8 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)src/cyclictest/cyclictest.8 +5
-2@@ -17,8 +17,8 @@ cyclictest \- High resolution test program .SH SYNOPSIS .SY cyclictest .RI "[ \-hfmnqrsvMS ] [\-a " proc " ] [\-A " align " ] [\-b " usec " ] [\-c " clock " ] [\-d " dist " ] \ -[\-h " histogram " ] [\-i " intv " ] [\-l " loop " ] [\-o " red " ] [\-p " prio " ] \ -[\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]" +[\-h " histogram " ] [\-i " intv " ] [\-\-json " filename " ] [\-l " loop " ] [\-o " red " ] \ +[\-p " prio " ] [\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]" .\" .SH DESCRIPTION .\" This manual page documents briefly the@@ -85,6 +85,9 @@ Dump the latency histogram to <path> instead of stdout. .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000us). This sets the interval of the first thread. See also \-d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. Cyclictest is stopped once the number of timer intervals has been reached. .TPSignature · 1 line
2.31.1
PATCH 14/23 oslat: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/oslat/oslat.8 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
src/oslat/oslat.8 +6 -2
@@ -5,8 +5,9 @@ oslat \- OS Latency Detector .SH SYNOPSIS .SY oslat .RI "[ \-shvz ] [ \-b " bucket-size " ] [ \-B " bias " ] [ \-c " cpu-list " ] \ -[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-m " workload-mem " ] \ -[\-t " runtime " ] [ \-T " trace-threshold " ] [ \-w " workload " ]" +[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-\-json " filename " ] \ +[ \-m " workload-mem " ] [\-t " runtime " ] [ \-T " trace-threshold " ] \ +[ \-w " workload " ]" .SH DESCRIPTION .B oslat is an open source userspace polling mode stress program to detect OS level
@@ -30,6 +31,9 @@ Specify which CPU the main thread runs on. Default is cpu0. Using specific SCHED_FIFO priority (1-99). Otherwise use the default priority, normally it will be SCHED_OTHER. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-m, \-\-workload-mem=SIZE Size of the memory to use for the workload (e.g., 4K, 1M). Total memory usage will be this value multiplies 2*N,
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 14/23] oslat: Add --json to man page
Quoted 37 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/oslat/oslat.8 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)src/oslat/oslat.8 +6
-2@@ -5,8 +5,9 @@ oslat \- OS Latency Detector .SH SYNOPSIS .SY oslat .RI "[ \-shvz ] [ \-b " bucket-size " ] [ \-B " bias " ] [ \-c " cpu-list " ] \ -[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-m " workload-mem " ] \ -[\-t " runtime " ] [ \-T " trace-threshold " ] [ \-w " workload " ]" +[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-\-json " filename " ] \ +[ \-m " workload-mem " ] [\-t " runtime " ] [ \-T " trace-threshold " ] \ +[ \-w " workload " ]" .SH DESCRIPTION .B oslat is an open source userspace polling mode stress program to detect OS level@@ -30,6 +31,9 @@ Specify which CPU the main thread runs on. Default is cpu0. Using specific SCHED_FIFO priority (1-99). Otherwise use the default priority, normally it will be SCHED_OTHER. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-m, \-\-workload-mem=SIZE Size of the memory to use for the workload (e.g., 4K, 1M). Total memory usage will be this value multiplies 2*N,Signature · 1 line
2.31.1
PATCH 15/23 pi_stress: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/pi_tests/pi_stress.8 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
src/pi_tests/pi_stress.8 +7 -1
@@ -10,7 +10,7 @@ pi_stress \- a stress test for POSIX Priority Inheritance mutexes .\"}}} .\"{{{ Synopsis -.\" Usage: pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V] +.\" Usage: pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [--json FILENAME ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V] .SH SYNOPSIS .B pi_stress .RB [ \-d|\-\-debug]
@@ -20,6 +20,8 @@ pi_stress \- a stress test for POSIX Priority Inheritance mutexes .IR N ] .RB [ \-i|\-\-inversions .IR INV ] +.RB [ \-\-json +.IR FILENAME ] .RB [ \-m|\-\-mlockall ] .RB [ \-p|\-\-prompt ] .RB [ \-q|\-\-quiet ]
@@ -58,6 +60,10 @@ Display a short help message and options. .I N number of inversion conditions. This is the total number of inversions for all inversion groups. Default is \-1 for infinite. +.IP "\-\-json=FILENAME" +Write final results into +.I FILENAME +, JSON formatted. .IP "\-m|\-\-mlockall" Call mlockall to lock current and future memory allocations and prevent being paged out
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 15/23] pi_stress: Add --json to man page
Quoted 44 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/pi_tests/pi_stress.8 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)src/pi_tests/pi_stress.8 +7
-1@@ -10,7 +10,7 @@ pi_stress \- a stress test for POSIX Priority Inheritance mutexes .\"}}} .\"{{{ Synopsis -.\" Usage: pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V] +.\" Usage: pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [--json FILENAME ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V] .SH SYNOPSIS .B pi_stress .RB [ \-d|\-\-debug]@@ -20,6 +20,8 @@ pi_stress \- a stress test for POSIX Priority Inheritance mutexes .IR N ] .RB [ \-i|\-\-inversions .IR INV ] +.RB [ \-\-json +.IR FILENAME ] .RB [ \-m|\-\-mlockall ] .RB [ \-p|\-\-prompt ] .RB [ \-q|\-\-quiet ]@@ -58,6 +60,10 @@ Display a short help message and options. .I N number of inversion conditions. This is the total number of inversions for all inversion groups. Default is \-1 for infinite. +.IP "\-\-json=FILENAME" +Write final results into +.I FILENAME +, JSON formatted. .IP "\-m|\-\-mlockall" Call mlockall to lock current and future memory allocations and prevent being paged outSignature · 1 line
2.31.1
PATCH 16/23 pmqtest: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/pmqtest/pmqtest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/pmqtest/pmqtest.8 +4 -1
@@ -4,7 +4,7 @@ \fBpmqtest\fR \- Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues .SH "SYNTAX" .LP -pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM] +pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [--json FILENAME] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM] .br .SH "DESCRIPTION" .LP
@@ -35,6 +35,9 @@ Set an artificial delay of the send function to force timeout of the receiver, r .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. pmqtest is stopped once the number of timer intervals has been reached. .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 16/23] pmqtest: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/pmqtest/pmqtest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/pmqtest/pmqtest.8 +4
-1@@ -4,7 +4,7 @@ \fBpmqtest\fR \- Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues .SH "SYNTAX" .LP -pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM] +pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [--json FILENAME] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM] .br .SH "DESCRIPTION" .LP@@ -35,6 +35,9 @@ Set an artificial delay of the send function to force timeout of the receiver, r .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. pmqtest is stopped once the number of timer intervals has been reached. .TPSignature · 1 line
2.31.1
PATCH 17/23 ptsematest: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/ptsematest/ptsematest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/ptsematest/ptsematest.8 +4 -1
@@ -4,7 +4,7 @@ \fBptsematest\fR \- Start two threads and measure the latency of interprocess communication with POSIX mutex. .SH "SYNOPSIS" .LP -ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] +ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] .br .SH "DESCRIPTION" .LP
@@ -32,6 +32,9 @@ Print help message. .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. ptsematest is stopped once the number of timer intervals has been reached. .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 17/23] ptsematest: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/ptsematest/ptsematest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/ptsematest/ptsematest.8 +4
-1@@ -4,7 +4,7 @@ \fBptsematest\fR \- Start two threads and measure the latency of interprocess communication with POSIX mutex. .SH "SYNOPSIS" .LP -ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] +ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] .br .SH "DESCRIPTION" .LP@@ -32,6 +32,9 @@ Print help message. .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. ptsematest is stopped once the number of timer intervals has been reached. .TPSignature · 1 line
2.31.1
PATCH 18/23 rt-migrate-test: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/rt-migrate-test/rt-migrate-test.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
src/rt-migrate-test/rt-migrate-test.8 +5 -1
@@ -5,7 +5,7 @@ rt-migrate-test \- real-time task migration program .SH SYNOPSIS .LP -rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS] +rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [--json FILENAME] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS] .SH DESCRIPTION Test real-time multiprocessor scheduling of tasks to ensure the highest priority tasks are running on all available CPUs .SH OPTIONS
@@ -31,6 +31,10 @@ Use equal prio for #CPU-1 tasks (requires > 2 CPUS) Display usage .br .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.br +.TP .B \-l \-\-loops=LOOPS Number of iterations to run (50) .br
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 18/23] rt-migrate-test: Add --json to man page
Quoted 35 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/rt-migrate-test/rt-migrate-test.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)src/rt-migrate-test/rt-migrate-test.8 +5
-1@@ -5,7 +5,7 @@ rt-migrate-test \- real-time task migration program .SH SYNOPSIS .LP -rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS] +rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [--json FILENAME] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS] .SH DESCRIPTION Test real-time multiprocessor scheduling of tasks to ensure the highest priority tasks are running on all available CPUs .SH OPTIONS@@ -31,6 +31,10 @@ Use equal prio for #CPU-1 tasks (requires > 2 CPUS) Display usage .br .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.br +.TP .B \-l \-\-loops=LOOPS Number of iterations to run (50) .brSignature · 1 line
2.31.1
PATCH 19/23 cyclicdeadline: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/sched_deadline/cyclicdeadline.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/sched_deadline/cyclicdeadline.8 +4 -1
@@ -17,7 +17,7 @@ cyclicdeadline \- This program is used to test the deadline scheduler (SCHED_DEA .PP .SH SYNOPSIS .B cyclicdeadline -.RI "[-a [CPUSET]] [-D TIME] [-h] [-i INTV] [-s STEP] [-t NUM] [-q]" +.RI "[-a [CPUSET]] [-D TIME] [-h] [-i INTV] [--json FILENAME] [-s STEP] [-t NUM] [-q]" .PP .SH DESCRIPTION .B cyclicdeadline
@@ -38,6 +38,9 @@ Show this help menu .B \-i \-\-interval INTV The shortest deadline for the tasks in us. (default 1000us) .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-s \-\-step STEP The amount to increase the deadline for each task in us. (default 500us) .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 19/23] cyclicdeadline: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/sched_deadline/cyclicdeadline.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/sched_deadline/cyclicdeadline.8 +4
-1@@ -17,7 +17,7 @@ cyclicdeadline \- This program is used to test the deadline scheduler (SCHED_DEA .PP .SH SYNOPSIS .B cyclicdeadline -.RI "[-a [CPUSET]] [-D TIME] [-h] [-i INTV] [-s STEP] [-t NUM] [-q]" +.RI "[-a [CPUSET]] [-D TIME] [-h] [-i INTV] [--json FILENAME] [-s STEP] [-t NUM] [-q]" .PP .SH DESCRIPTION .B cyclicdeadline@@ -38,6 +38,9 @@ Show this help menu .B \-i \-\-interval INTV The shortest deadline for the tasks in us. (default 1000us) .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-s \-\-step STEP The amount to increase the deadline for each task in us. (default 500us) .TPSignature · 1 line
2.31.1
PATCH 20/23 signaltest: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/signaltest/signaltest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/signaltest/signaltest.8 +4 -1
@@ -5,7 +5,7 @@ signaltest \- signal roundtrip test software .SH SYNOPSIS .LP -signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ] +signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [--json FILENAME] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ] .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes ('\-\-').
@@ -35,6 +35,9 @@ Append 'm', 'h', or 'd' to specify minutes, hours or days. .br display usage information .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Number of loops: default=0 (endless) .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 20/23] signaltest: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/signaltest/signaltest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/signaltest/signaltest.8 +4
-1@@ -5,7 +5,7 @@ signaltest \- signal roundtrip test software .SH SYNOPSIS .LP -signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ] +signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [--json FILENAME] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ] .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes ('\-\-').@@ -35,6 +35,9 @@ Append 'm', 'h', or 'd' to specify minutes, hours or days. .br display usage information .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Number of loops: default=0 (endless) .TPSignature · 1 line
2.31.1
PATCH 21/23 sigwaittest: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/sigwaittest/sigwaittest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/sigwaittest/sigwaittest.8 +4 -1
@@ -4,7 +4,7 @@ \fBsigwaittest\fR \- Start two threads or fork two processes and measure the latency between sending and receiving a signal .SH "SYNTAX" .LP -sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]] +sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]] .br .SH "DESCRIPTION" .LP
@@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. sigwaittest is stopped once the number of timer intervals has been reached. .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 21/23] sigwaittest: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/sigwaittest/sigwaittest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/sigwaittest/sigwaittest.8 +4
-1@@ -4,7 +4,7 @@ \fBsigwaittest\fR \- Start two threads or fork two processes and measure the latency between sending and receiving a signal .SH "SYNTAX" .LP -sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]] +sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]] .br .SH "DESCRIPTION" .LP@@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. sigwaittest is stopped once the number of timer intervals has been reached. .TPSignature · 1 line
2.31.1
PATCH 22/23 ssdd: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/ssdd/ssdd.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/ssdd/ssdd.8 +4 -1
@@ -3,7 +3,7 @@ ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs .SH SYNOPSIS .LP -ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM] +ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM] [--json FILENAME] .SH DESCRIPTION Have a tracer do a bunch of PTRACE_SINGLESTEPs against a tracee as fast as possible. Create several of these tracer/tracee pairs and
@@ -25,6 +25,9 @@ number of PTRACE_SINGLESTEP iterations to do before declaring success, for each tracer tracee pair set up. .br Default is 10,000. +.TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. .SH AUTHOR ssdd was written by Joe Korty <[email protected]> .PP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 22/23] ssdd: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/ssdd/ssdd.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/ssdd/ssdd.8 +4
-1@@ -3,7 +3,7 @@ ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs .SH SYNOPSIS .LP -ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM] +ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM] [--json FILENAME] .SH DESCRIPTION Have a tracer do a bunch of PTRACE_SINGLESTEPs against a tracee as fast as possible. Create several of these tracer/tracee pairs and@@ -25,6 +25,9 @@ number of PTRACE_SINGLESTEP iterations to do before declaring success, for each tracer tracee pair set up. .br Default is 10,000. +.TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. .SH AUTHOR ssdd was written by Joe Korty <[email protected]> .PPSignature · 1 line
2.31.1
PATCH 23/23 svematest: Add --json to man page
In reply to Daniel WagnerAdd the newly introduced --json command line to the man page.
--- src/svsematest/svsematest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/svsematest/svsematest.8 +4 -1
@@ -4,7 +4,7 @@ \fBsvsematest\fR \- Start two threads or fork two processes and measure the latency of SYSV semaphores .SH "SYNTAX" .LP -svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] +svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] .br .SH "DESCRIPTION" .LP
@@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. svsematest is stopped once the number of timer intervals has been reached. .TP
Signature · 1 line
2.31.1
Re: [PATCH rt-tests v1 23/23] svematest: Add --json to man page
Quoted 34 lines · Daniel Wagner
Add the newly introduced --json command line to the man page.
Signed-off-by Daniel Wagner <[email protected]>--- src/svsematest/svsematest.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)src/svsematest/svsematest.8 +4
-1@@ -4,7 +4,7 @@ \fBsvsematest\fR \- Start two threads or fork two processes and measure the latency of SYSV semaphores .SH "SYNTAX" .LP -svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] +svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]] .br .SH "DESCRIPTION" .LP@@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes .B \-i, \-\-interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. .TP +.B \-\-json=FILENAME +Write final results into FILENAME, JSON formatted. +.TP .B \-l, \-\-loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. svsematest is stopped once the number of timer intervals has been reached. .TPSignature · 1 line
2.31.1