Changeset cd4c605


Ignore:
Timestamp:
Nov 19, 2021, 3:04:12 PM (9 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
enum, forall-pointer-decay, master, pthread-emulation
Children:
059ad16
Parents:
1757f98 (diff), c60e5094 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
benchmark/io/http
Files:
3 edited

Legend:

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

    r1757f98 rcd4c605  
    150150                        if(errno == EADDRINUSE) {
    151151                                if(waited == 0) {
     152                                        if(!options.interactive) abort | "Port already in use in non-interactive mode. Aborting";
    152153                                        sout | "Waiting for port";
    153154                                } else {
  • benchmark/io/http/protocol.cfa

    r1757f98 rcd4c605  
    332332        wait(this.f);
    333333
    334         // Did something crazy happen?
    335         if(this.f.result > this.len) {
    336                 mutex(serr) serr | "SPLICE IN spliced too much!";
    337                 return error(this.res, -ERANGE);
    338         }
    339 
    340334        // Something failed?
    341335        if(this.f.result < 0) {
     
    351345                        return error(this.res, -ECONNRESET);
    352346                }
     347        }
     348
     349        // Did something crazy happen?
     350        if(this.f.result > this.len) {
     351                mutex(serr) serr | "SPLICE IN spliced too much!";
     352                return error(this.res, -ERANGE);
    353353        }
    354354
     
    401401        wait(this.f);
    402402
    403         // Did something crazy happen?
    404         if(this.f.result > this.len) {
    405                 mutex(serr) serr | "SPLICE OUT spliced too much!";
    406                 return error(this.res, -ERANGE);
    407         }
    408 
    409403        // Something failed?
    410404        if(this.f.result < 0) {
     
    420414                        return error(this, -ECONNRESET);
    421415                }
     416        }
     417
     418        // Did something crazy happen?
     419        if(this.f.result > this.len) {
     420                mutex(serr) serr | "SPLICE OUT spliced too much!" | this.f.result | ">" | this.len;
     421                return error(this.res, -ERANGE);
    422422        }
    423423
     
    544544const char * original_http_msgs[] = {
    545545        "HTTP/1.1 200 OK\nServer: HttpForall\nDate: %s \nContent-Type: text/plain\nContent-Length: ",
    546         "HTTP/1.1 200 OK\r\nServer: HttpForall\r\nDate\r\nConnection: keep-alive\r\nContent-Length: 15\r\nContent-Type: text/html: %s \r\n\r\nHello, World!\r\n",
     546        "HTTP/1.1 200 OK\r\nServer: HttpForall\r\nConnection: keep-alive\r\nContent-Length: 15\r\nContent-Type: text/html\r\nDate: %s \r\n\r\nHello, World!\r\n",
    547547        "HTTP/1.1 400 Bad Request\nServer: HttpForall\nDate: %s \nContent-Type: text/plain\nContent-Length: 0 \n\n",
    548548        "HTTP/1.1 404 Not Found\nServer: HttpForall\nDate: %s \nContent-Type: text/plain\nContent-Length: 0 \n\n",
  • benchmark/io/http/worker.cfa

    r1757f98 rcd4c605  
    1818void ?{}( Worker & this ) {
    1919        size_t cli = rand() % options.clopts.cltr_cnt;
    20         ((thread&)this){ "Server Worker Thread", *options.clopts.instance[cli], 512000 };
     20        ((thread&)this){ "Server Worker Thread", *options.clopts.instance[cli], 64000 };
    2121        options.clopts.thrd_cnt[cli]++;
    2222        this.pipe[0] = -1;
Note: See TracChangeset for help on using the changeset viewer.