X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/9c7f01f350147569783a77597f38facc70580aed..43d1fc38b83d1aadfd22263a5930caaf8e0c584c:/latester/latester.c diff --git a/latester/latester.c b/latester/latester.c index a25fd10..6a78872 100644 --- a/latester/latester.c +++ b/latester/latester.c @@ -60,8 +60,6 @@ struct options { unsigned count; unsigned oneattime; char *name; - int histogram; - int file; int length; int userhist; @@ -509,8 +507,7 @@ void process_final_rx(int s) mi->ts_rx_final = ts_user; mi->received = frame; - if (opt.histogram) - histogram_add(&histogram, get_msg_latency_us(mi)); + histogram_add(&histogram, get_msg_latency_us(mi)); ret = write(completion_pipe[1], &mi, sizeof(mi)); if (ret == -1) @@ -634,8 +631,6 @@ struct poptOption optionsTable[] = { { "oneattime",'o', POPT_ARG_NONE, &opt.oneattime,0, "Send the next message only when the previous was finally received"}, { "verbose",'v', POPT_ARG_NONE, NULL, 'v', "Send the next message only when the previous was finally received"}, { "name", 'n', POPT_ARG_STRING, &opt.name, 0, "Prefix of the generated files"}, - { "file", 'f', POPT_ARG_NONE, &opt.file, 0, "Store all message data in a file", "filename"}, - { "histogram", 'h', POPT_ARG_NONE, &opt.histogram, 0, "Store histogram in file", "filename"}, { "length", 'l', POPT_ARG_INT|POPT_ARGFLAG_SHOW_DEFAULT, &opt.length, 0, "The length of generated messages", "bytes"}, { "userhist", 'u', POPT_ARG_NONE, &opt.userhist, 0, "Generate histogram from userspace timestamps"}, POPT_AUTOHELP @@ -670,14 +665,14 @@ int parse_options(int argc, const char *argv[]) if (opt.oneattime && opt.period_us) error(1, 0, "oneattime and period cannot be specified at the same time"); - if (opt.name && opt.file) { + if (opt.name) { char *f = talloc_asprintf(local, "%s-msgs.txt", opt.name); opt.f_msgs = fopen(f, "w"); if (!opt.f_msgs) error(1, errno, "fopen: %s", f); } - if (opt.name && opt.histogram) { + if (opt.name) { char *f = talloc_asprintf(local, "%s-hist.txt", opt.name); opt.f_hist = fopen(f, "w"); if (!opt.f_hist) @@ -718,9 +713,7 @@ int main(int argc, const char *argv[]) for (i=0; i