chiark / gitweb /
@@@ so much mess
[mLib] / test / tvec-main.c
index aa361807e9ee7e51ad309f9dbfe5e77d6db66def..25698a864c4657d28bd1800ea42312d72286e9a1 100644 (file)
@@ -56,8 +56,6 @@ static const struct outform {
   { 0,                 0 }
 };
 
-static struct bench_state benchstate;
-
 const struct tvec_info tvec_adhocinfo =
   { 0, 1, 1, sizeof(struct tvec_reg) };
 
@@ -101,7 +99,6 @@ Options:\n\
 \n\
   -f, --format=FORMAT  produce output in FORMAT.\n\
   -o, --output=OUTPUT  write output to OUTPUT file.\n\
-  -t, --target=SECS    aim to run benchmarks for SECS.\n\
 ", fp);
 }
 
@@ -111,10 +108,8 @@ void tvec_parseargs(int argc, char *argv[], struct tvec_state *tv_out,
   FILE *ofp = 0;
   const struct outform *of = 0;
   struct tvec_output *o;
-  struct bench_timer *tm;
-  const char *p; char *q;
+  const char *p;
   int opt;
-  double t;
   unsigned f = 0;
 #define f_bogus 1u
 
@@ -125,15 +120,12 @@ void tvec_parseargs(int argc, char *argv[], struct tvec_state *tv_out,
 
     { "format",                OPTF_ARGREQ,    0,      'f' },
     { "output",                OPTF_ARGREQ,    0,      'o' },
-    { "target",                OPTF_ARGREQ,    0,      't' },
     { 0,               0,              0,      0 }
   };
 
-  tvec_benchstate = &benchstate;
-  tm = bench_createtimer(); bench_init(&benchstate, tm);
   ego(argv[0]);
   for (;;) {
-    opt = mdwopt(argc, argv, "hvu" "f:o:t:", options, 0, 0, 0);
+    opt = mdwopt(argc, argv, "hvu" "f:o:", options, 0, 0, 0);
     if (opt < 0) break;
     switch (opt) {
       case 'h': help(stdout); exit(0);
@@ -148,12 +140,6 @@ void tvec_parseargs(int argc, char *argv[], struct tvec_state *tv_out,
          die(2, "failed to open `%s' for writing: %s",
              optarg, strerror(errno));
        break;
-      case 't':
-       errno = 0; t = strtod(optarg, &q);
-       while (ISSPACE(*q)) q++;
-       if (errno || *q || t < 0) die(2, "invalid time `%s'", optarg);
-       benchstate.target_s = t;
-       break;
 
       default:
        f |= f_bogus;