Changeset 5ad381b for benchmark/io/http


Ignore:
Timestamp:
Jan 7, 2021, 5:29:17 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
390fb02
Parents:
2b4daf2
Message:

Started to work on httpforall also supporting techempower 'plaintext' benchmark.

Location:
benchmark/io/http
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/options.cfa

    r2b4daf2 r5ad381b  
    1212#include <parseargs.hfa>
    1313
     14#include <string.h>
     15
    1416Options options @= {
     17        { // experiment
     18                FileExperiment, // type
     19        },
     20
    1521        { // file_cache
    1622                0,     // open_flags;
     
    3743};
    3844
     45static bool parse(const char * arg, ExprimentType & value) {
     46        if(strcmp(arg, "file") == 0) {
     47                value = FileExperiment;
     48                return true;
     49        }
     50
     51        if(strcmp(arg, "plaintext") == 0) {
     52                value = HelloWorldExperiment;
     53                return true;
     54        }
     55
     56        return false;
     57}
     58
    3959const char * parse_options( int argc, char * argv[] ) {
    4060        bool subthrd = false;
     
    4868                {'p', "port",           "Port the server will listen on", options.socket.port},
    4969                {'c', "cpus",           "Number of processors to use", options.clopts.nprocs},
     70                {'T', "experiment",     "Experiment type to run: file, plaintext", options.experiment.type},
    5071                {'t', "threads",        "Number of worker threads to use", options.clopts.nworkers},
    5172                {'b', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog},
  • benchmark/io/http/options.hfa

    r2b4daf2 r5ad381b  
    77struct cluster;
    88
     9enum ExprimentType {
     10        FileExperiment,
     11        HelloWorldExperiment
     12};
     13
    914struct Options {
     15        struct {
     16                ExprimentType type;
     17        } experiment;
     18
    1019        struct {
    1120                int open_flags;
Note: See TracChangeset for help on using the changeset viewer.