Changeset 56c44dc for benchmark/io/http


Ignore:
Timestamp:
Aug 28, 2020, 3:34:01 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:
ce55a81
Parents:
8e3034d
Message:

Worker now each do their own accept4

Location:
benchmark/io/http
Files:
4 edited

Legend:

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

    r8e3034d r56c44dc  
    1515#include <thread.hfa>
    1616
    17 #include "channel.hfa"
    1817#include "filecache.hfa"
    1918#include "options.hfa"
     
    2928// Globals
    3029//=============================================================================================
    31 channel & wait_connect;
    32 
    3330struct ServerProc {
    3431        processor self;
     
    9693                #endif
    9794                options.clopts.instance = &cl;
    98 
    99                 channel chan = { options.clopts.chan_size };
    100                 &wait_connect = &chan;
    10195
    10296                int pipe_cnt = options.clopts.nworkers * 2;
  • benchmark/io/http/options.cfa

    r8e3034d r56c44dc  
    3131                1,     // nworkers;
    3232                0,     // flags;
    33                 10,    // chan_size;
    3433                false, // procstats
    3534                false, // viewhalts
     
    5150                {'t', "threads",        "Number of worker threads to use", options.clopts.nworkers},
    5251                {'b', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog},
    53                 {'B', "channel-size",   "Maximum number of accepted connection pending", options.clopts.chan_size},
    5452                {'r', "request_len",    "Maximum number of bytes in the http request, requests with more data will be answered with Http Code 414", options.socket.buflen},
    5553                {'S', "seed",           "seed to use for hashing", options.file_cache.hash_seed },
  • benchmark/io/http/options.hfa

    r8e3034d r56c44dc  
    2626                int nworkers;
    2727                io_context_params params;
    28                 int chan_size;
    2928                bool procstats;
    3029                bool viewhalts;
  • benchmark/io/http/worker.hfa

    r8e3034d r56c44dc  
    66        #include <sys/socket.h>
    77}
    8 
    9 #include "channel.hfa"
    10 
    11 extern channel & wait_connect;
    128
    139//=============================================================================================
Note: See TracChangeset for help on using the changeset viewer.