Commit f9cfa765 authored by rna's avatar rna
Browse files

+= optimized parameter for time-* apps

parent e5807511
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ struct arguments {
    uint16_t size;
    char *outfile;
    char *target;
    bool optimized;
    bool thread_pinning;
};

@@ -89,6 +90,7 @@ int main(int argc, char **argv) {
            .rounds = 127,
            .size = 1500,
            .outfile = "-",
            .optimized = true,
            .thread_pinning = false,
    };
    argp_parse(&argp, argc, argv, 0, 0, &arguments);
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ static struct argp_option options[] = {
        {"rounds",              'r', "ROUNDS",     0,  "Rounds" },
        {"size",                's', "SIZE",       0,  "Size" },
        {"output",              'o', "FILE",       0,  "Output to FILE instead of standard output" },
        {"unoptimized",         'U',  0,           0,  "Disable TCP optimizations"},
        {"threadpinning",       'T',  0,           0,  "Enable thread pinning"},
        { 0 }
};
@@ -27,6 +28,7 @@ struct arguments
    uint16_t rounds;
    uint16_t size;
    char* outfile;
    bool optimized;
    bool thread_pinning;
};

@@ -57,6 +59,9 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
        case 'o':
            arguments->outfile = arg;
            break;
        case 'U':
            arguments->optimized = false;
            break;
        case 'T':
            arguments->thread_pinning = true;
            break;
@@ -81,6 +86,7 @@ int main(int argc, char **argv) {
        .size = 1500,
        .rounds = 127,
        .outfile = "-",
        .optimized = true,
        .thread_pinning = false,
    };
    argp_parse (&argp, argc, argv, 0, 0, &arguments);