first commit

This commit is contained in:
Jose Caban
2025-06-07 01:59:34 -04:00
commit 388ac241f0
3558 changed files with 9116289 additions and 0 deletions

View File

@@ -0,0 +1 @@
bin

View File

@@ -0,0 +1,17 @@
/.cvsignore/1.1/Tue Jan 24 02:28:52 2006//
/Makefile/1.3/Thu Feb 16 02:37:16 2006//
/runclient.pl/1.2/Tue Feb 21 03:14:49 2006//
/urlfile/1.1/Tue Feb 21 00:56:56 2006//
/urlfile1/1.2/Tue Feb 21 03:14:49 2006//
/urlfile2/1.2/Tue Feb 21 03:14:49 2006//
/urlfile3/1.2/Tue Feb 21 03:14:49 2006//
/urlfile4/1.2/Tue Feb 21 03:14:49 2006//
/urlfile5/1.2/Tue Feb 21 03:14:49 2006//
/urlfile5~/1.1/Tue Feb 21 00:56:56 2006//
/urlfile6/1.1/Tue Feb 21 02:19:43 2006//
/urlfile_new/1.1/Tue Feb 21 00:56:56 2006//
D/docs////
D/home////
D/results////
D/src////
D/vs////

View File

@@ -0,0 +1 @@
cs4210/proj1

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,32 @@
##############################################################################
#
# This file will recursively call client and server makefiles to build
# those.
#
# $Author: vurazov $
# $Date: 2006/02/16 02:37:16 $
# $Revision: 1.3 $
#
##############################################################################
BUILD_DIRS = common client server
SRC_DIR = src
OBJ_DIR = obj
BIN_DIR = bin
RM = /bin/rm -rf
.PHONY: all clean touch $(BUILD_DIRS)
all: $(BUILD_DIRS)
$(BUILD_DIRS):
$(MAKE) -C src/$@
clean:
for dir in $(BUILD_DIRS); do $(MAKE) -C $(SRC_DIR)/$$dir clean; $(RM) $(SRC_DIR)/$$dir/$(OBJ_DIR); done
$(RM) $(BIN_DIR)
touch:
for dir in $(BUILD_DIRS); do touch $(SRC_DIR)/$$dir/*.* $(SRC_DIR)/$$dir/Makefile; done

View File

@@ -0,0 +1,5 @@
/Project 1 Report.doc/1.1/Tue Feb 21 06:39:41 2006/-kb/
/Project1.pdf/1.1/Tue Jan 24 01:18:22 2006/-kb/
/report.pdf/1.1/Tue Feb 21 06:39:41 2006/-kb/
/report.txt/1.3/Tue Feb 21 06:39:41 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/docs

View File

@@ -0,0 +1 @@
/usr/_CVS

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,55 @@
Project 1: Building a Rudimentary Web Server
============================================
Vladimir Urazov
Omar Zakaria
============================================
1. Building the sources
The source code for the project is broken up into three directories:
common - this directory contains the code common to both the client and the server, such as some of the networking functionality, the multi-thread-safe list data structure, etc. This directory contains its own makefile, which builds a static library name libcommon.a from all of the source files. This library can then be included in the build of the server and the client to provide the necessary functionality.
server - this directory contains the http server code. Unlike the common library, it actually builds into an executable. The make file in the server can be used to build it (provided the common library has already been built).
client - this directory contains the code for the testing client, used to do performance and robustness tests on the server. It also builds into an executable with the make file, but assumes that the common library has already been built.
The simplest way to go about building the entire project is by typing 'make' in the root directory of the project. That will create a 'bin' folder there and will build all the components of the project into it. Hence, once the make process completes, the directory will contain the following files: client, libcommon.a, server. The client and the server can the be immediately run.
2. Running the Executales
The project build process creates two executables: server and client.
The server is the HTTP server. It supports the following command-line parameters:
port - the port that the server will listen for connections on. The default value for port is 1337.
pool-size - the number of threads to create to handle client requests. The default value is 16. Note that due to per-user constraints Linux imposes on the number of available threads, the server will fail creating enough worker threads if this parameter is set too high.
home - the path to the root document directory, relative to the directory from which we are starting the server. All the documents will be served relative to the home directory.
So, for example, if we are in the root directory of the project, after running make, we can start the server as follows:
bin/server port=80 pool-size=32 home=./home
(Note there shouldn't be spaces between the name of the parameter and the parameter values).
Note that the server has certain security restrictions, for instance it will not allow clients to go up the directory hierarchy, and also if will respond with forbidden HTTP status, if the user running the server has no permissions reading the requested file.
The client executable is the testing client used for exercising the server. In order to run, it requires a url file, which is basically a plain text file with URLs that the client will request from the server. These URLs can have either host names or dotted IP addresses with them - the client can handle both kinds of URLs. The client supports the following options:
job-count - the number of requests to make to the server. The default value is 1. Note that this is the total number of requests to be made, and this will cycle through the URLs in the URL file. So, for example, suppose this parameter is set to 100, and the URL file contains two URLs, then each URL will be requested 50 times.
thread-count - the number of threads to spawn to make requests to the server at the same time. Note that these threads will handle as many requests as the job-count specifies, so, for example, if teh job count is 100, and thread-count is 10, then likely each thread will make 10 requests to the server (though that's not necessarily the case, since for example if one of the workers is taking a long time to receive the response from the server, then the others will pick up the slack).
url-file - the name of the file that contains the URLs to request. If no value is provided for this parameter, then the URLs will be read from the console.
So, if we have built the project from the root directory of the project, we can run the client as follows:
bin/client job-count=1000 thread-count=32 < urlfile

View File

@@ -0,0 +1,7 @@
/big.html/1.1/Mon Feb 20 17:30:36 2006//
/file.html/1.1/Mon Feb 13 03:37:01 2006//
/file2.html/1.1/Mon Feb 13 22:35:05 2006//
/medium.html/1.1/Mon Feb 20 17:30:36 2006//
/small.html/1.1/Mon Feb 20 17:30:36 2006//
/tiny.html/1.1/Mon Feb 20 17:30:36 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/home

View File

@@ -0,0 +1 @@
/usr/_CVS

1058816
CS4210/cs4210/proj1/home/big.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
<html>
Hello, world!
</html>

View File

@@ -0,0 +1,3 @@
<html>
You shouldn't be seeing this.
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,69 @@
<html>
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
This is small file.
</html>

View File

@@ -0,0 +1,3 @@
<html>
Hello, world!
</html>

View File

@@ -0,0 +1,4 @@
D/dual-diff////
D/dual-same////
D/dual-thousand-same////
D/single-diff////

View File

@@ -0,0 +1 @@
cs4210/proj1/results

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,3 @@
/results1.txt/1.1/Tue Feb 21 03:14:49 2006//
/results32.txt/1.2/Tue Feb 21 06:39:41 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/results/dual-diff

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 267.643883 ms.
Received: 4800 bytes.
Throughtput: 17934.278746 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 0.796150 Max: 8.528000
Std Dev: 1.945462
Time Per Connection:
Min: 1.139000 Avg: 25.897675 Max: 248.766000
Std Dev: 62.666148
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 26.752961 ms.
Received: 9600 bytes.
Throughtput: 358838.785306 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 0.120413 Max: 0.578000
Std Dev: 0.075227
Time Per Connection:
Min: 0.745000 Avg: 2.467800 Max: 2.643000
Std Dev: 0.313864
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 52.548932 ms.
Received: 19200 bytes.
Throughtput: 365373.746257 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 0.119138 Max: 0.313000
Std Dev: 0.053041
Time Per Connection:
Min: 1.145000 Avg: 4.966269 Max: 5.288000
Std Dev: 0.669804
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 106.951051 ms.
Received: 38400 bytes.
Throughtput: 359042.755800 bps.
Connection Latency Stats:
Min: 0.102000 Avg: 0.140709 Max: 1.473000
Std Dev: 0.177138
Time Per Connection:
Min: 2.232000 Avg: 10.146916 Max: 10.958000
Std Dev: 1.520476
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 207.110986 ms.
Received: 76800 bytes.
Throughtput: 370815.674015 bps.
Connection Latency Stats:
Min: 0.103000 Avg: 0.122970 Max: 0.548000
Std Dev: 0.061711
Time Per Connection:
Min: 1.125000 Avg: 19.932548 Max: 22.537000
Std Dev: 3.586135
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 3001.381969 ms.
Received: 153600 bytes.
Throughtput: 51176.425260 bps.
Connection Latency Stats:
Min: 0.102000 Avg: 2.492847 Max: 2999.655000
Std Dev: 83.806610
Time Per Connection:
Min: 0.570000 Avg: 39.936245 Max: 251.005000
Std Dev: 10.241883
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 20.457103 ms.
Received: 60880 bytes.
Throughtput: 2975983.380408 bps.
Connection Latency Stats:
Min: 0.107000 Avg: 0.135650 Max: 0.259000
Std Dev: 0.070900
Time Per Connection:
Min: 1.419000 Avg: 1.821725 Max: 2.779000
Std Dev: 0.161993
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 38.368121 ms.
Received: 121760 bytes.
Throughtput: 3173467.878008 bps.
Connection Latency Stats:
Min: 0.107000 Avg: 0.134300 Max: 0.330000
Std Dev: 0.054582
Time Per Connection:
Min: 1.019000 Avg: 3.559175 Max: 3.832000
Std Dev: 0.464902
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 76.952887 ms.
Received: 243520 bytes.
Throughtput: 3164533.657423 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 0.144037 Max: 0.403000
Std Dev: 0.069926
Time Per Connection:
Min: 1.142000 Avg: 7.188388 Max: 7.935000
Std Dev: 1.122495
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 153.775883 ms.
Received: 487040 bytes.
Throughtput: 3167206.658187 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 0.162447 Max: 0.971000
Std Dev: 0.137454
Time Per Connection:
Min: 1.081000 Avg: 14.647437 Max: 16.621000
Std Dev: 2.549764
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 304.199906 ms.
Received: 974080 bytes.
Throughtput: 3202104.866080 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 0.171441 Max: 7.275000
Std Dev: 0.308614
Time Per Connection:
Min: 1.445000 Avg: 29.251967 Max: 32.601000
Std Dev: 5.266982
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 607.146982 ms.
Received: 1948160 bytes.
Throughtput: 3208712.315753 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 0.162074 Max: 1.120000
Std Dev: 0.128440
Time Per Connection:
Min: 2.028000 Avg: 58.381268 Max: 63.669000
Std Dev: 10.424013
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 142.340994 ms.
Received: 1622840 bytes.
Throughtput: 11401072.544399 bps.
Connection Latency Stats:
Min: 0.128000 Avg: 0.257275 Max: 0.297000
Std Dev: 0.071435
Time Per Connection:
Min: 4.862000 Avg: 13.430350 Max: 15.342000
Std Dev: 1.516272
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 281.704953 ms.
Received: 3245680 bytes.
Throughtput: 11521558.157134 bps.
Connection Latency Stats:
Min: 0.149000 Avg: 0.290100 Max: 0.510000
Std Dev: 0.093995
Time Per Connection:
Min: 4.391000 Avg: 26.643962 Max: 28.545000
Std Dev: 4.183455
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 563.431068 ms.
Received: 6491360 bytes.
Throughtput: 11521125.413925 bps.
Connection Latency Stats:
Min: 0.124000 Avg: 0.287006 Max: 0.596000
Std Dev: 0.077203
Time Per Connection:
Min: 4.657000 Avg: 53.390681 Max: 56.471000
Std Dev: 9.128638
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 1128.324937 ms.
Received: 12982720 bytes.
Throughtput: 11506189.014304 bps.
Connection Latency Stats:
Min: 0.110000 Avg: 0.346016 Max: 2.433000
Std Dev: 0.302421
Time Per Connection:
Min: 4.875000 Avg: 107.186397 Max: 115.733000
Std Dev: 19.153217
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 2257.625027 ms.
Received: 25965440 bytes.
Throughtput: 11501219.062523 bps.
Connection Latency Stats:
Min: 0.109000 Avg: 0.420480 Max: 3.768000
Std Dev: 0.415657
Time Per Connection:
Min: 5.734000 Avg: 214.271463 Max: 425.824000
Std Dev: 46.018899
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 4500.644006 ms.
Received: 51930880 bytes.
Throughtput: 11538544.246553 bps.
Connection Latency Stats:
Min: 0.111000 Avg: 7.435013 Max: 2999.885000
Std Dev: 145.041741
Time Per Connection:
Min: 5.820000 Avg: 420.985130 Max: 451.172000
Std Dev: 76.555863
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 7256.921881 ms.
Received: 84708960 bytes.
Throughtput: 11672849.920520 bps.
Connection Latency Stats:
Min: 0.130000 Avg: 0.144375 Max: 0.205000
Std Dev: 0.066542
Time Per Connection:
Min: 180.917000 Avg: 698.429150 Max: 754.312000
Std Dev: 96.204456
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 14449.508008 ms.
Received: 169417920 bytes.
Throughtput: 11724822.735069 bps.
Connection Latency Stats:
Min: 0.130000 Avg: 0.151212 Max: 0.311000
Std Dev: 0.064646
Time Per Connection:
Min: 181.080000 Avg: 1381.584887 Max: 1445.239000
Std Dev: 229.410139
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 28897.446061 ms.
Received: 338835840 bytes.
Throughtput: 11725459.727139 bps.
Connection Latency Stats:
Min: 0.126000 Avg: 0.185269 Max: 1.184000
Std Dev: 0.185268
Time Per Connection:
Min: 181.343000 Avg: 2754.246844 Max: 2890.980000
Std Dev: 483.921554
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 57804.603965 ms.
Received: 677671680 bytes.
Throughtput: 11723489.713944 bps.
Connection Latency Stats:
Min: 0.125000 Avg: 0.221091 Max: 2.249000
Std Dev: 0.315369
Time Per Connection:
Min: 181.680000 Avg: 5500.499844 Max: 5791.305000
Std Dev: 991.865789
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 125075.723072 ms.
Received: 1355343360 bytes.
Throughtput: 10836182.487761 bps.
Connection Latency Stats:
Min: 0.123000 Avg: 0.546050 Max: 11.417000
Std Dev: 1.479785
Time Per Connection:
Min: 182.405000 Avg: 11861.242361 Max: 17511.604000
Std Dev: 2803.957875
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 232225.026937 ms.
Received: 2710686720 bytes.
Throughtput: 11672672.647508 bps.
Connection Latency Stats:
Min: 0.125000 Avg: 14.613009 Max: 3006.176000
Std Dev: 205.282891
Time Per Connection:
Min: 183.753000 Avg: 22058.798224 Max: 23709.190000
Std Dev: 4066.414115
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/tiny.html"
[JOBM] Got URL "http://legolas:8080/small.html"
[JOBM] Got URL "http://legolas:8080/medium.html"
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 1884.840102 ms.
Received: 21599370 bytes.
Throughtput: 11459523.798156 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 0.164600 Max: 0.412000
Std Dev: 0.094229
Time Per Connection:
Min: 32.672000 Avg: 174.565800 Max: 218.839000
Std Dev: 39.805864
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/tiny.html"
[JOBM] Got URL "http://legolas:8080/small.html"
[JOBM] Got URL "http://legolas:8080/medium.html"
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 3704.469021 ms.
Received: 43198740 bytes.
Throughtput: 11661250.168374 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 0.212063 Max: 1.485000
Std Dev: 0.178740
Time Per Connection:
Min: 0.745000 Avg: 347.201012 Max: 372.411000
Std Dev: 78.854933
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/tiny.html"
[JOBM] Got URL "http://legolas:8080/small.html"
[JOBM] Got URL "http://legolas:8080/medium.html"
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 7420.945949 ms.
Received: 86397480 bytes.
Throughtput: 11642380.983701 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 0.197700 Max: 0.868000
Std Dev: 0.122746
Time Per Connection:
Min: 1.073000 Avg: 700.473587 Max: 937.389000
Std Dev: 144.787291
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/tiny.html"
[JOBM] Got URL "http://legolas:8080/small.html"
[JOBM] Got URL "http://legolas:8080/medium.html"
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 14843.443082 ms.
Received: 172794960 bytes.
Throughtput: 11641164.320550 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 0.213887 Max: 1.611000
Std Dev: 0.190425
Time Per Connection:
Min: 1.077000 Avg: 1405.822938 Max: 1508.873000
Std Dev: 273.327749
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/tiny.html"
[JOBM] Got URL "http://legolas:8080/small.html"
[JOBM] Got URL "http://legolas:8080/medium.html"
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 29643.532096 ms.
Received: 345589920 bytes.
Throughtput: 11658189.681468 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 0.308008 Max: 2.184000
Std Dev: 0.386048
Time Per Connection:
Min: 0.921000 Avg: 2811.670836 Max: 3141.294000
Std Dev: 533.073485
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/tiny.html"
[JOBM] Got URL "http://legolas:8080/small.html"
[JOBM] Got URL "http://legolas:8080/medium.html"
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 59493.838906 ms.
Received: 691179840 bytes.
Throughtput: 11617670.883345 bps.
Connection Latency Stats:
Min: 0.104000 Avg: 2.793375 Max: 3005.144000
Std Dev: 83.954980
Time Per Connection:
Min: 0.926000 Avg: 5646.961302 Max: 6220.707000
Std Dev: 1069.821180
-----------------------------------------------------------------

View File

@@ -0,0 +1,408 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 2999.574955 ms.
Received: 4800 bytes.
Throughtput: 1600.226723 bps.
Connection Latency Stats:
Min: 0.102000 Avg: 75.198400 Max: 2999.001000
Std Dev: 468.183195
Time Per Connection:
Min: 0.338000 Avg: 13.383100 Max: 170.682000
Std Dev: 35.799486
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 15.467973 ms.
Received: 9600 bytes.
Throughtput: 620637.249999 bps.
Connection Latency Stats:
Min: 0.110000 Avg: 0.182025 Max: 0.450000
Std Dev: 0.099863
Time Per Connection:
Min: 0.413000 Avg: 1.260925 Max: 3.195000
Std Dev: 0.547830
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 3005.539883 ms.
Received: 19200 bytes.
Throughtput: 6388.203367 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 37.714106 Max: 2999.883000
Std Dev: 333.245856
Time Per Connection:
Min: 0.425000 Avg: 20.206537 Max: 1171.797000
Std Dev: 138.085797
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 3409.768102 ms.
Received: 38400 bytes.
Throughtput: 11261.762928 bps.
Connection Latency Stats:
Min: 0.106000 Avg: 168.940587 Max: 2999.850000
Std Dev: 690.959354
Time Per Connection:
Min: 0.360000 Avg: 12.499853 Max: 545.768000
Std Dev: 65.657159
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 3260.488910 ms.
Received: 76800 bytes.
Throughtput: 23554.749645 bps.
Connection Latency Stats:
Min: 0.103000 Avg: 229.845497 Max: 3000.207000
Std Dev: 797.509657
Time Per Connection:
Min: 0.407000 Avg: 8.695052 Max: 214.718000
Std Dev: 25.525451
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/tiny.html"
Time: 3606.659025 ms.
Received: 153600 bytes.
Throughtput: 42587.890598 bps.
Connection Latency Stats:
Min: 0.101000 Avg: 220.480715 Max: 3001.224000
Std Dev: 782.494613
Time Per Connection:
Min: 0.350000 Avg: 11.287607 Max: 609.813000
Std Dev: 49.481560
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 14.451916 ms.
Received: 60880 bytes.
Throughtput: 4212590.225880 bps.
Connection Latency Stats:
Min: 0.107000 Avg: 0.289300 Max: 0.487000
Std Dev: 0.143928
Time Per Connection:
Min: 0.738000 Avg: 1.111725 Max: 2.141000
Std Dev: 0.268625
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 20.698078 ms.
Received: 121760 bytes.
Throughtput: 5882671.767163 bps.
Connection Latency Stats:
Min: 0.108000 Avg: 0.470538 Max: 1.526000
Std Dev: 0.286612
Time Per Connection:
Min: 0.646000 Avg: 1.528238 Max: 2.709000
Std Dev: 0.445258
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 32.466934 ms.
Received: 243520 bytes.
Throughtput: 7500554.346764 bps.
Connection Latency Stats:
Min: 0.121000 Avg: 0.579338 Max: 1.531000
Std Dev: 0.296777
Time Per Connection:
Min: 0.664000 Avg: 2.485319 Max: 8.561000
Std Dev: 1.277917
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 3033.921018 ms.
Received: 487040 bytes.
Throughtput: 160531.535655 bps.
Connection Latency Stats:
Min: 0.118000 Avg: 75.653756 Max: 2999.575000
Std Dev: 468.154469
Time Per Connection:
Min: 0.671000 Avg: 9.406928 Max: 204.730000
Std Dev: 35.030187
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 3033.985025 ms.
Received: 974080 bytes.
Throughtput: 321056.297854 bps.
Connection Latency Stats:
Min: 0.111000 Avg: 155.208753 Max: 3000.497000
Std Dev: 663.287848
Time Per Connection:
Min: 0.679000 Avg: 9.408959 Max: 204.873000
Std Dev: 32.834536
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/small.html"
Time: 3144.740947 ms.
Received: 1948160 bytes.
Throughtput: 619497.768713 bps.
Connection Latency Stats:
Min: 0.108000 Avg: 167.201653 Max: 3000.071000
Std Dev: 686.387666
Time Per Connection:
Min: 0.641000 Avg: 15.800995 Max: 206.783000
Std Dev: 36.228816
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 148.162033 ms.
Received: 1622840 bytes.
Throughtput: 10953143.426471 bps.
Connection Latency Stats:
Min: 0.105000 Avg: 1.806025 Max: 4.593000
Std Dev: 1.521192
Time Per Connection:
Min: 8.541000 Avg: 12.753225 Max: 15.721000
Std Dev: 1.300442
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 282.599893 ms.
Received: 3245680 bytes.
Throughtput: 11485071.596992 bps.
Connection Latency Stats:
Min: 0.112000 Avg: 3.417450 Max: 9.219000
Std Dev: 2.215790
Time Per Connection:
Min: 11.495000 Avg: 23.948650 Max: 31.804000
Std Dev: 3.268516
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 559.781908 ms.
Received: 6491360 bytes.
Throughtput: 11596230.434458 bps.
Connection Latency Stats:
Min: 0.118000 Avg: 7.502713 Max: 18.392000
Std Dev: 4.837060
Time Per Connection:
Min: 6.830000 Avg: 46.830250 Max: 60.662000
Std Dev: 7.252187
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 3465.250934 ms.
Received: 12982720 bytes.
Throughtput: 3746545.415785 bps.
Connection Latency Stats:
Min: 0.126000 Avg: 21.488591 Max: 2999.749000
Std Dev: 166.878118
Time Per Connection:
Min: 4.349000 Avg: 93.539650 Max: 354.871000
Std Dev: 55.384846
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 4345.442959 ms.
Received: 25965440 bytes.
Throughtput: 5975326.392564 bps.
Connection Latency Stats:
Min: 0.189000 Avg: 37.713069 Max: 2999.980000
Std Dev: 166.258221
Time Per Connection:
Min: 12.300000 Avg: 183.756081 Max: 446.081000
Std Dev: 48.814370
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/medium.html"
Time: 4463.603102 ms.
Received: 51930880 bytes.
Throughtput: 11634296.064822 bps.
Connection Latency Stats:
Min: 0.201000 Avg: 98.411286 Max: 3032.507000
Std Dev: 430.320700
Time Per Connection:
Min: 18.125000 Avg: 329.348831 Max: 675.833000
Std Dev: 76.758455
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 7211.775996 ms.
Received: 84708960 bytes.
Throughtput: 11745922.231353 bps.
Connection Latency Stats:
Min: 0.117000 Avg: 6.920425 Max: 18.886000
Std Dev: 6.947600
Time Per Connection:
Min: 683.390000 Avg: 713.840400 Max: 722.247000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 14694.598008 ms.
Received: 169417920 bytes.
Throughtput: 11529265.374262 bps.
Connection Latency Stats:
Min: 0.145000 Avg: 12.874600 Max: 43.658000
Std Dev: 14.009264
Time Per Connection:
Min: 1282.815000 Avg: 1452.229213 Max: 1615.581000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 28862.511904 ms.
Received: 338835840 bytes.
Throughtput: 11739651.805920 bps.
Connection Latency Stats:
Min: 0.162000 Avg: 27.056431 Max: 93.607000
Std Dev: 28.021544
Time Per Connection:
Min: 2598.551000 Avg: 2853.353431 Max: 2993.668000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 57655.446973 ms.
Received: 677671680 bytes.
Throughtput: 11753818.859855 bps.
Connection Latency Stats:
Min: 0.200000 Avg: 117.091334 Max: 172.070000
Std Dev: 45.901947
Time Per Connection:
Min: 3631.605000 Avg: 5514.666400 Max: 13125.003000
Std Dev: 1091.864133
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 115499.745908 ms.
Received: 1355343360 bytes.
Throughtput: 11734600.360736 bps.
Connection Latency Stats:
Min: 0.141000 Avg: 140.627941 Max: 193.562000
Std Dev: 51.017231
Time Per Connection:
Min: 4786.486000 Avg: 11041.919919 Max: 18837.802000
Std Dev: 1412.669489
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://legolas:8080/big.html"
Time: 1687286.072055 ms.
Received: 2698050432 bytes.
Throughtput: 1599047.415068 bps.
Connection Latency Stats:
Min: 0.166000 Avg: 202.958480 Max: 9174.357000
Std Dev: 651.497081
Time Per Connection:
Min: 4797.808000 Avg: 28724.410809 Max: 1678116.725000
Std Dev: 112673.005768
-----------------------------------------------------------------

View File

@@ -0,0 +1,7 @@
/results1.txt/1.1/Tue Feb 21 01:48:04 2006//
/results128.txt/1.1/Tue Feb 21 01:48:04 2006//
/results16.txt/1.1/Tue Feb 21 01:48:04 2006//
/results32.txt/1.1/Tue Feb 21 01:48:04 2006//
/results4.txt/1.1/Tue Feb 21 01:48:04 2006//
/results64.txt/1.1/Tue Feb 21 01:48:04 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/results/dual-same

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,459 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 157.121117 ms.
Received: 48000 bytes.
Throughtput: 305496.809372 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.045117 Max: 0.123000
Std Dev: 0.018722
Time Per Connection:
Min: 1.177000 Avg: 1.485697 Max: 6.781000
Std Dev: 0.438103
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 321.662066 ms.
Received: 96000 bytes.
Throughtput: 298449.864035 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.038610 Max: 0.378000
Std Dev: 0.018726
Time Per Connection:
Min: 0.715000 Avg: 3.124766 Max: 5.429000
Std Dev: 0.371141
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 744.941996 ms.
Received: 192000 bytes.
Throughtput: 257738.187679 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.041108 Max: 0.728000
Std Dev: 0.024306
Time Per Connection:
Min: 1.136000 Avg: 7.356846 Max: 20.471000
Std Dev: 1.660647
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 1398.899969 ms.
Received: 384000 bytes.
Throughtput: 274501.400086 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.040462 Max: 0.129000
Std Dev: 0.008551
Time Per Connection:
Min: 0.589000 Avg: 13.867557 Max: 26.591000
Std Dev: 1.789383
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 2839.034002 ms.
Received: 768000 bytes.
Throughtput: 270514.548073 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.040874 Max: 0.690000
Std Dev: 0.012056
Time Per Connection:
Min: 1.034000 Avg: 28.230802 Max: 40.523000
Std Dev: 2.772514
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 163.605106 ms.
Received: 608800 bytes.
Throughtput: 3721155.266320 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 0.041878 Max: 0.082000
Std Dev: 0.014566
Time Per Connection:
Min: 1.330000 Avg: 1.557277 Max: 2.789000
Std Dev: 0.255577
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 378.678035 ms.
Received: 1217600 bytes.
Throughtput: 3215396.423903 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.041611 Max: 0.146000
Std Dev: 0.012520
Time Per Connection:
Min: 0.695000 Avg: 3.701979 Max: 5.136000
Std Dev: 0.597908
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 776.544936 ms.
Received: 2435200 bytes.
Throughtput: 3135942.156610 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.040822 Max: 0.184000
Std Dev: 0.012193
Time Per Connection:
Min: 0.739000 Avg: 7.655692 Max: 10.882000
Std Dev: 0.891634
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 1698.962010 ms.
Received: 4870400 bytes.
Throughtput: 2866691.528087 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.042468 Max: 0.485000
Std Dev: 0.011234
Time Per Connection:
Min: 0.772000 Avg: 16.818272 Max: 25.597000
Std Dev: 2.953298
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3546.536951 ms.
Received: 9740800 bytes.
Throughtput: 2746566.618105 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.043557 Max: 1.727000
Std Dev: 0.028644
Time Per Connection:
Min: 0.852000 Avg: 35.281555 Max: 243.877000
Std Dev: 5.223378
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 593.236072 ms.
Received: 16228400 bytes.
Throughtput: 27355720.189150 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 0.048387 Max: 0.702000
Std Dev: 0.037346
Time Per Connection:
Min: 1.932000 Avg: 5.830277 Max: 19.369000
Std Dev: 3.278797
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 1109.023953 ms.
Received: 32456800 bytes.
Throughtput: 29266094.668068 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 0.048209 Max: 0.602000
Std Dev: 0.025867
Time Per Connection:
Min: 1.824000 Avg: 10.923607 Max: 25.052000
Std Dev: 3.293931
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 2889.376022 ms.
Received: 64913600 bytes.
Throughtput: 22466303.975971 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 0.050741 Max: 3.043000
Std Dev: 0.080035
Time Per Connection:
Min: 1.328000 Avg: 28.674459 Max: 58.496000
Std Dev: 5.867219
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 5684.607904 ms.
Received: 129827200 bytes.
Throughtput: 22838373.760388 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 0.049289 Max: 0.720000
Std Dev: 0.017615
Time Per Connection:
Min: 4.610000 Avg: 56.588260 Max: 79.093000
Std Dev: 8.889662
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 11182.581107 ms.
Received: 259654400 bytes.
Throughtput: 23219540.954520 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.049498 Max: 0.766000
Std Dev: 0.019345
Time Per Connection:
Min: 2.284000 Avg: 111.200314 Max: 188.556000
Std Dev: 18.598819
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 8981.424078 ms.
Received: 847089600 bytes.
Throughtput: 94315733.522133 bps.
Connection Latency Stats:
Min: 0.045000 Avg: 0.075563 Max: 0.123000
Std Dev: 0.020995
Time Per Connection:
Min: 20.777000 Avg: 89.345648 Max: 119.771000
Std Dev: 8.981165
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 17763.805930 ms.
Received: 1694179200 bytes.
Throughtput: 95372534.844640 bps.
Connection Latency Stats:
Min: 0.048000 Avg: 0.073649 Max: 0.114000
Std Dev: 0.016272
Time Per Connection:
Min: 24.732000 Avg: 176.796884 Max: 216.244000
Std Dev: 13.753839
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 35646.643098 ms.
Received: 3388358400 bytes.
Throughtput: 95054066.962743 bps.
Connection Latency Stats:
Min: 0.046000 Avg: 0.072899 Max: 0.167000
Std Dev: 0.015222
Time Per Connection:
Min: 22.362000 Avg: 354.486076 Max: 433.502000
Std Dev: 26.458439
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 71337.939076 ms.
Received: 6776716800 bytes.
Throughtput: 94994569.337962 bps.
Connection Latency Stats:
Min: 0.044000 Avg: 0.071370 Max: 0.166000
Std Dev: 0.013365
Time Per Connection:
Min: 29.215000 Avg: 709.892776 Max: 854.480000
Std Dev: 46.126455
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 142563.716100 ms.
Received: 13553433600 bytes.
Throughtput: 95069306.348112 bps.
Connection Latency Stats:
Min: 0.039000 Avg: 0.072140 Max: 0.281000
Std Dev: 0.013037
Time Per Connection:
Min: 29.271000 Avg: 1418.605644 Max: 1698.458000
Std Dev: 89.190345
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 2390.214955 ms.
Received: 215993700 bytes.
Throughtput: 90365805.610874 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 0.052782 Max: 0.098000
Std Dev: 0.019091
Time Per Connection:
Min: 8.309000 Avg: 23.656640 Max: 40.256000
Std Dev: 3.074515
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 4943.481920 ms.
Received: 431987400 bytes.
Throughtput: 87385249.304215 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.053464 Max: 0.296000
Std Dev: 0.019649
Time Per Connection:
Min: 1.086000 Avg: 49.050689 Max: 70.082000
Std Dev: 5.690533
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 9936.000043 ms.
Received: 863974800 bytes.
Throughtput: 86953985.131677 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.052548 Max: 0.403000
Std Dev: 0.018671
Time Per Connection:
Min: 0.594000 Avg: 98.713600 Max: 167.284000
Std Dev: 11.145813
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 20095.739074 ms.
Received: 1727949600 bytes.
Throughtput: 85985869.622274 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.051945 Max: 0.335000
Std Dev: 0.015722
Time Per Connection:
Min: 1.592000 Avg: 199.841640 Max: 250.825000
Std Dev: 16.506278
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 39767.329969 ms.
Received: 3455899200 bytes.
Throughtput: 86902972.935846 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.051997 Max: 0.214000
Std Dev: 0.014527
Time Per Connection:
Min: 0.821000 Avg: 395.624899 Max: 447.609000
Std Dev: 27.625976
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 7902.196008 ms.
Received: 691179840 bytes.
Throughtput: 87466805.342917 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.051560 Max: 0.288000
Std Dev: 0.018626
Time Per Connection:
Min: 34.025000 Avg: 749.320527 Max: 858.341000
Std Dev: 110.269283

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 123.654092 ms.
Received: 48000 bytes.
Throughtput: 388179.633101 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.062292 Max: 0.210000
Std Dev: 0.037822
Time Per Connection:
Min: 0.184000 Avg: 1.136163 Max: 47.925000
Std Dev: 3.709907
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 154.796906 ms.
Received: 96000 bytes.
Throughtput: 620167.433163 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 0.097362 Max: 1.585000
Std Dev: 0.101689
Time Per Connection:
Min: 0.216000 Avg: 1.406318 Max: 4.443000
Std Dev: 0.575297
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3017.729990 ms.
Received: 192000 bytes.
Throughtput: 63623.982471 bps.
Connection Latency Stats:
Min: 0.029000 Avg: 7.606702 Max: 2999.818000
Std Dev: 149.780680
Time Per Connection:
Min: 0.223000 Avg: 2.627583 Max: 535.746000
Std Dev: 16.157896
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3429.647990 ms.
Received: 384000 bytes.
Throughtput: 111964.843358 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 19.829821 Max: 2999.678000
Std Dev: 242.136132
Time Per Connection:
Min: 0.222000 Avg: 2.282607 Max: 395.477000
Std Dev: 10.803063
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3495.718002 ms.
Received: 768000 bytes.
Throughtput: 219697.355327 bps.
Connection Latency Stats:
Min: 0.029000 Avg: 25.036567 Max: 2999.800000
Std Dev: 271.793087
Time Per Connection:
Min: 0.179000 Avg: 2.274362 Max: 679.088000
Std Dev: 13.692706
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3267.727941 ms.
Received: 153600 bytes.
Throughtput: 47005.137133 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 169.122391 Max: 3002.142000
Std Dev: 691.081569
Time Per Connection:
Min: 0.244000 Avg: 5.957900 Max: 414.590000
Std Dev: 27.723438
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 85.842889 ms.
Received: 608800 bytes.
Throughtput: 7092026.015530 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.095405 Max: 0.899000
Std Dev: 0.102613
Time Per Connection:
Min: 0.209000 Avg: 0.720505 Max: 2.173000
Std Dev: 0.248837
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 158.689029 ms.
Received: 1217600 bytes.
Throughtput: 7672868.156639 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 0.150624 Max: 2.917000
Std Dev: 0.182828
Time Per Connection:
Min: 0.214000 Avg: 1.368792 Max: 5.384000
Std Dev: 0.573936
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3203.400057 ms.
Received: 2435200 bytes.
Throughtput: 760192.282254 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 9.604887 Max: 2999.442000
Std Dev: 167.385718
Time Per Connection:
Min: 0.226000 Avg: 2.120456 Max: 204.580000
Std Dev: 7.382979
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3237.479033 ms.
Received: 4870400 bytes.
Throughtput: 1504380.399072 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 19.866357 Max: 3000.059000
Std Dev: 242.191468
Time Per Connection:
Min: 0.218000 Avg: 2.360394 Max: 574.555000
Std Dev: 12.731555
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3167.466969 ms.
Received: 9740800 bytes.
Throughtput: 3075264.902847 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 25.042249 Max: 2999.751000
Std Dev: 271.786251
Time Per Connection:
Min: 0.216000 Avg: 2.329006 Max: 541.632000
Std Dev: 11.023099
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 2985.829016 ms.
Received: 1948160 bytes.
Throughtput: 652468.707958 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 159.780020 Max: 3003.213000
Std Dev: 672.693862
Time Per Connection:
Min: 0.295000 Avg: 4.889211 Max: 208.511000
Std Dev: 10.310210
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 244.418912 ms.
Received: 16228400 bytes.
Throughtput: 66395844.182769 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.147935 Max: 1.605000
Std Dev: 0.214439
Time Per Connection:
Min: 0.892000 Avg: 2.218855 Max: 5.483000
Std Dev: 0.808335
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 458.925926 ms.
Received: 32456800 bytes.
Throughtput: 70723396.043173 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.213720 Max: 5.074000
Std Dev: 0.403936
Time Per Connection:
Min: 0.723000 Avg: 4.280071 Max: 13.728000
Std Dev: 1.928665
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3243.504078 ms.
Received: 64913600 bytes.
Throughtput: 20013417.105684 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 9.590362 Max: 3000.226000
Std Dev: 167.422918
Time Per Connection:
Min: 1.005000 Avg: 6.389093 Max: 231.295000
Std Dev: 14.173773
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3383.405113 ms.
Received: 129827200 bytes.
Throughtput: 38371757.342372 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 19.879448 Max: 3000.416000
Std Dev: 242.186594
Time Per Connection:
Min: 0.970000 Avg: 6.655742 Max: 544.011000
Std Dev: 17.361820
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 9216.585930 ms.
Received: 259654400 bytes.
Throughtput: 28172514.419378 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 59.269829 Max: 8999.473000
Std Dev: 592.283348
Time Per Connection:
Min: 0.882000 Avg: 7.357731 Max: 671.580000
Std Dev: 25.699737
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 10954.239996 ms.
Received: 51930880 bytes.
Throughtput: 4740710.448064 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 337.743094 Max: 8998.619000
Std Dev: 1220.109629
Time Per Connection:
Min: 0.801000 Avg: 23.888077 Max: 2031.060000
Std Dev: 145.578896
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 35517.815885 ms.
Received: 847089600 bytes.
Throughtput: 23849709.755511 bps.
Connection Latency Stats:
Min: 0.048000 Avg: 0.078998 Max: 1.205000
Std Dev: 0.082774
Time Per Connection:
Min: 21.419000 Avg: 354.598207 Max: 870.215000
Std Dev: 131.191730
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 65004.314984 ms.
Received: 1694179200 bytes.
Throughtput: 26062565.237533 bps.
Connection Latency Stats:
Min: 0.039000 Avg: 0.114500 Max: 31.000000
Std Dev: 1.094434
Time Per Connection:
Min: 29.345000 Avg: 648.524414 Max: 12009.718000
Std Dev: 629.101982
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 132722.368930 ms.
Received: 3388358400 bytes.
Throughtput: 25529670.901170 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 0.093149 Max: 29.364000
Std Dev: 0.739248
Time Per Connection:
Min: 29.423000 Avg: 1325.118772 Max: 28955.472000
Std Dev: 1499.288661
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 193785.255928 ms.
Received: 6776716800 bytes.
Throughtput: 34970239.441379 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 25.729138 Max: 3080.429000
Std Dev: 277.539490
Time Per Connection:
Min: 29.361000 Avg: 1907.570978 Max: 32951.921000
Std Dev: 3541.355824
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 112997.518088 ms.
Received: 13553433600 bytes.
Throughtput: 119944524.705943 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 77.900535 Max: 28028.431000
Std Dev: 595.767913
Time Per Connection:
Min: 24.167000 Avg: 2227.081672 Max: 87096.401000
Std Dev: 4525.373729
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 282.428922 ms.
Received: 2710686720 bytes.
Throughtput: 9597766059.312283 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.093568 Max: 3.610000
Std Dev: 0.192648
Time Per Connection:
Min: 29.369000 Avg: 1877.608139 Max: 26205.149000
Std Dev: 3523.426380
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 1633.370113 ms.
Received: 215993700 bytes.
Throughtput: 132238063.037502 bps.
Connection Latency Stats:
Min: 0.043000 Avg: 0.407103 Max: 29.142000
Std Dev: 2.691624
Time Per Connection:
Min: 0.456000 Avg: 15.779298 Max: 717.896000
Std Dev: 62.158504
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 3317.948010 ms.
Received: 431987400 bytes.
Throughtput: 130197157.620693 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.893584 Max: 252.917000
Std Dev: 10.007925
Time Per Connection:
Min: 0.455000 Avg: 31.634542 Max: 2565.831000
Std Dev: 119.864392
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 6714.998008 ms.
Received: 863974800 bytes.
Throughtput: 128663448.447747 bps.
Connection Latency Stats:
Min: 0.029000 Avg: 0.391848 Max: 34.456000
Std Dev: 1.273616
Time Per Connection:
Min: 0.458000 Avg: 62.104022 Max: 6715.163000
Std Dev: 373.083595
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 13865.556986 ms.
Received: 1727949600 bytes.
Throughtput: 124621722.856380 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 11.850299 Max: 3008.711000
Std Dev: 183.841589
Time Per Connection:
Min: 0.392000 Avg: 125.776527 Max: 13857.744000
Std Dev: 705.027762
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 27225.890084 ms.
Received: 3455899200 bytes.
Throughtput: 126934296.338299 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 56.425461 Max: 9066.643000
Std Dev: 437.562971
Time Per Connection:
Min: 0.378000 Avg: 213.954368 Max: 27174.920000
Std Dev: 636.623003
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 11.084996 ms.
Received: 691179840 bytes.
Throughtput: 62352736392.536789 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 38.409929 Max: 5323.632000
Std Dev: 347.371878
Time Per Connection:
Min: 0.488000 Avg: 94.228158 Max: 5393.031000
Std Dev: 360.335848
-----------------------------------------------------------------

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 95.468982 ms.
Received: 48000 bytes.
Throughtput: 502781.099831 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.078300 Max: 0.397000
Std Dev: 0.057964
Time Per Connection:
Min: 0.210000 Avg: 0.835468 Max: 14.450000
Std Dev: 1.160496
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 150.943035 ms.
Received: 96000 bytes.
Throughtput: 636001.521501 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.109869 Max: 2.054000
Std Dev: 0.153561
Time Per Connection:
Min: 0.231000 Avg: 1.333181 Max: 4.237000
Std Dev: 0.590864
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3094.651992 ms.
Received: 192000 bytes.
Throughtput: 62042.517376 bps.
Connection Latency Stats:
Min: 0.028000 Avg: 9.514868 Max: 2999.624000
Std Dev: 167.402868
Time Per Connection:
Min: 0.290000 Avg: 2.340824 Max: 416.880000
Std Dev: 12.761878
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3360.065037 ms.
Received: 384000 bytes.
Throughtput: 114283.502181 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 19.788616 Max: 3001.287000
Std Dev: 242.153437
Time Per Connection:
Min: 0.197000 Avg: 2.467545 Max: 617.393000
Std Dev: 15.726754
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3296.100891 ms.
Received: 768000 bytes.
Throughtput: 233002.576524 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 25.015029 Max: 3007.832000
Std Dev: 271.852632
Time Per Connection:
Min: 0.219000 Avg: 2.506475 Max: 737.275000
Std Dev: 14.449248
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 188.549031 ms.
Received: 153600 bytes.
Throughtput: 814642.212561 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 1.261996 Max: 102.693000
Std Dev: 8.632487
Time Per Connection:
Min: 0.204000 Avg: 17.145063 Max: 130.214000
Std Dev: 18.472940
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 87.011924 ms.
Received: 608800 bytes.
Throughtput: 6996742.210521 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.079762 Max: 0.592000
Std Dev: 0.062247
Time Per Connection:
Min: 0.207000 Avg: 0.747600 Max: 2.225000
Std Dev: 0.294174
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 165.825023 ms.
Received: 1217600 bytes.
Throughtput: 7342679.500003 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.115845 Max: 2.316000
Std Dev: 0.148931
Time Per Connection:
Min: 0.259000 Avg: 1.478944 Max: 4.303000
Std Dev: 0.621684
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3189.562094 ms.
Received: 2435200 bytes.
Throughtput: 763490.387845 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 5.865060 Max: 3000.160000
Std Dev: 129.770033
Time Per Connection:
Min: 0.254000 Avg: 2.520234 Max: 203.587000
Std Dev: 9.146104
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3395.553074 ms.
Received: 4870400 bytes.
Throughtput: 1434346.597892 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 19.836588 Max: 2999.750000
Std Dev: 242.168863
Time Per Connection:
Min: 0.240000 Avg: 2.932629 Max: 678.345000
Std Dev: 15.870648
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3339.586977 ms.
Received: 9740800 bytes.
Throughtput: 2916767.872333 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 25.022166 Max: 3000.673000
Std Dev: 271.845867
Time Per Connection:
Min: 0.248000 Avg: 2.704687 Max: 784.386000
Std Dev: 13.821286
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 2992.111939 ms.
Received: 1948160 bytes.
Throughtput: 651098.635157 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 131.553125 Max: 3000.689000
Std Dev: 613.388474
Time Per Connection:
Min: 0.260000 Avg: 7.240769 Max: 217.317000
Std Dev: 16.661305
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 245.972926 ms.
Received: 16228400 bytes.
Throughtput: 65976366.904581 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.149588 Max: 1.933000
Std Dev: 0.198401
Time Per Connection:
Min: 0.740000 Avg: 2.243002 Max: 7.168000
Std Dev: 0.773418
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 475.724041 ms.
Received: 32456800 bytes.
Throughtput: 68226108.423678 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.191350 Max: 6.034000
Std Dev: 0.456478
Time Per Connection:
Min: 0.833000 Avg: 4.464503 Max: 15.109000
Std Dev: 2.092996
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3193.208994 ms.
Received: 64913600 bytes.
Throughtput: 20328641.225463 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 9.584034 Max: 2999.607000
Std Dev: 167.402054
Time Per Connection:
Min: 0.983000 Avg: 7.664036 Max: 227.549000
Std Dev: 13.497401
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3890.170092 ms.
Received: 129827200 bytes.
Throughtput: 33373142.288916 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 19.890956 Max: 3000.239000
Std Dev: 242.145440
Time Per Connection:
Min: 0.802000 Avg: 8.344402 Max: 358.072000
Std Dev: 14.688500
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 9008.114938 ms.
Received: 259654400 bytes.
Throughtput: 28824498.998988 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 60.207300 Max: 8998.763000
Std Dev: 601.586395
Time Per Connection:
Min: 0.935000 Avg: 8.164734 Max: 237.208000
Std Dev: 15.494728
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 10019.829900 ms.
Received: 51930880 bytes.
Throughtput: 5182810.538332 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 443.193573 Max: 9001.341000
Std Dev: 1628.241577
Time Per Connection:
Min: 0.857000 Avg: 17.844870 Max: 1021.740000
Std Dev: 70.289919
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 6214.067035 ms.
Received: 847089600 bytes.
Throughtput: 136318065.962573 bps.
Connection Latency Stats:
Min: 0.044000 Avg: 0.092190 Max: 2.023000
Std Dev: 0.098797
Time Per Connection:
Min: 19.362000 Avg: 61.854603 Max: 1363.956000
Std Dev: 120.026383
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 12582.768092 ms.
Received: 1694179200 bytes.
Throughtput: 134642805.751491 bps.
Connection Latency Stats:
Min: 0.040000 Avg: 0.098550 Max: 1.264000
Std Dev: 0.138304
Time Per Connection:
Min: 29.709000 Avg: 125.429253 Max: 6277.874000
Std Dev: 428.192345
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 19953.753981 ms.
Received: 3388358400 bytes.
Throughtput: 169810573.153721 bps.
Connection Latency Stats:
Min: 0.038000 Avg: 0.168222 Max: 31.947000
Std Dev: 1.288216
Time Per Connection:
Min: 30.146000 Avg: 233.187847 Max: 15639.768000
Std Dev: 694.848444
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 87449.890061 ms.
Received: 6776716800 bytes.
Throughtput: 77492570.834661 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 12.937225 Max: 3004.134000
Std Dev: 193.831867
Time Per Connection:
Min: 30.794000 Avg: 858.187255 Max: 15964.476000
Std Dev: 1153.178060
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 79372.024926 ms.
Received: 13553433600 bytes.
Throughtput: 170758319.605245 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.179009 Max: 74.883000
Std Dev: 1.906747
Time Per Connection:
Min: 29.764000 Avg: 867.450273 Max: 12594.881000
Std Dev: 788.566664
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 1059.141934 ms.
Received: 2710686720 bytes.
Throughtput: 2559323386.326380 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.152271 Max: 32.294000
Std Dev: 1.259967
Time Per Connection:
Min: 30.036000 Avg: 441.384044 Max: 10705.617000
Std Dev: 938.988381
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 1654.556096 ms.
Received: 215993700 bytes.
Throughtput: 130544803.261019 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 1.177403 Max: 37.692000
Std Dev: 4.073313
Time Per Connection:
Min: 0.462000 Avg: 15.091153 Max: 149.987000
Std Dev: 22.915733
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 3473.558057 ms.
Received: 431987400 bytes.
Throughtput: 124364525.642539 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.318726 Max: 47.295000
Std Dev: 1.921736
Time Per Connection:
Min: 0.454000 Avg: 34.107760 Max: 1113.910000
Std Dev: 96.417714
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 6844.196080 ms.
Received: 863974800 bytes.
Throughtput: 126234665.092882 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.709559 Max: 163.856000
Std Dev: 5.745468
Time Per Connection:
Min: 0.447000 Avg: 67.045833 Max: 6844.521000
Std Dev: 408.830235
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 15134.400035 ms.
Received: 1727949600 bytes.
Throughtput: 114173643.883313 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 10.331270 Max: 3017.713000
Std Dev: 169.550578
Time Per Connection:
Min: 0.446000 Avg: 136.507864 Max: 8479.650000
Std Dev: 419.951121
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 25864.137977 ms.
Received: 3455899200 bytes.
Throughtput: 133617412.771938 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 1.106110 Max: 1332.669000
Std Dev: 28.853894
Time Per Connection:
Min: 0.374000 Avg: 263.727890 Max: 10120.556000
Std Dev: 343.185820
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 5995.107102 ms.
Received: 691179840 bytes.
Throughtput: 115290657.579777 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 245.397454 Max: 3019.009000
Std Dev: 822.653220
Time Per Connection:
Min: 0.472000 Avg: 298.417772 Max: 5747.294000
Std Dev: 553.524638
-----------------------------------------------------------------

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 87.686879 ms.
Received: 48000 bytes.
Throughtput: 547402.309119 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.072140 Max: 0.459000
Std Dev: 0.046323
Time Per Connection:
Min: 0.200000 Avg: 0.766835 Max: 7.293000
Std Dev: 0.650824
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 150.449977 ms.
Received: 96000 bytes.
Throughtput: 638085.842170 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.114601 Max: 3.150000
Std Dev: 0.170803
Time Per Connection:
Min: 0.256000 Avg: 1.331192 Max: 4.669000
Std Dev: 0.619414
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3246.501039 ms.
Received: 192000 bytes.
Throughtput: 59140.594040 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 9.492251 Max: 2999.569000
Std Dev: 167.400583
Time Per Connection:
Min: 0.222000 Avg: 2.465104 Max: 320.085000
Std Dev: 12.925879
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3138.094029 ms.
Received: 384000 bytes.
Throughtput: 122367.270201 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 18.886608 Max: 3000.630000
Std Dev: 236.424806
Time Per Connection:
Min: 0.223000 Avg: 2.381568 Max: 416.617000
Std Dev: 13.028912
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3216.682006 ms.
Received: 768000 bytes.
Throughtput: 238755.338139 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 24.998559 Max: 3000.787000
Std Dev: 271.815035
Time Per Connection:
Min: 0.188000 Avg: 2.472025 Max: 352.453000
Std Dev: 10.274167
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 2977.598014 ms.
Received: 153600 bytes.
Throughtput: 51585.203676 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 148.333556 Max: 3000.423000
Std Dev: 648.818922
Time Per Connection:
Min: 0.187000 Avg: 4.252144 Max: 205.180000
Std Dev: 14.990127
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 87.039051 ms.
Received: 608800 bytes.
Throughtput: 6994561.570720 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.089287 Max: 0.508000
Std Dev: 0.060171
Time Per Connection:
Min: 0.178000 Avg: 0.740298 Max: 1.663000
Std Dev: 0.243707
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 161.351961 ms.
Received: 1217600 bytes.
Throughtput: 7546236.148775 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.132010 Max: 2.542000
Std Dev: 0.202801
Time Per Connection:
Min: 0.194000 Avg: 1.428094 Max: 4.685000
Std Dev: 0.655765
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3289.022020 ms.
Received: 2435200 bytes.
Throughtput: 740402.461752 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 7.676101 Max: 2999.531000
Std Dev: 149.765110
Time Per Connection:
Min: 0.193000 Avg: 2.760055 Max: 237.687000
Std Dev: 11.789184
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3524.251945 ms.
Received: 4870400 bytes.
Throughtput: 1381967.031771 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 19.861504 Max: 3000.187000
Std Dev: 242.190702
Time Per Connection:
Min: 0.197000 Avg: 2.809520 Max: 231.395000
Std Dev: 10.584229
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3350.868916 ms.
Received: 9740800 bytes.
Throughtput: 2906947.494540 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 25.040339 Max: 3000.260000
Std Dev: 271.782741
Time Per Connection:
Min: 0.217000 Avg: 2.813015 Max: 1787.607000
Std Dev: 24.928217
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 2989.763910 ms.
Received: 1948160 bytes.
Throughtput: 651609.979427 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 56.770899 Max: 2999.967000
Std Dev: 406.819052
Time Per Connection:
Min: 0.197000 Avg: 3.669198 Max: 205.415000
Std Dev: 12.402331
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 247.940975 ms.
Received: 16228400 bytes.
Throughtput: 65452674.882111 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 0.143933 Max: 2.167000
Std Dev: 0.229616
Time Per Connection:
Min: 0.790000 Avg: 2.280487 Max: 6.463000
Std Dev: 0.838950
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 458.630062 ms.
Received: 32456800 bytes.
Throughtput: 70769019.862860 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.189601 Max: 3.695000
Std Dev: 0.331210
Time Per Connection:
Min: 1.078000 Avg: 4.303232 Max: 11.493000
Std Dev: 1.840863
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3271.533066 ms.
Received: 64913600 bytes.
Throughtput: 19841951.367342 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 9.576734 Max: 3000.298000
Std Dev: 167.424371
Time Per Connection:
Min: 0.779000 Avg: 7.004264 Max: 291.016000
Std Dev: 15.491845
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3408.073996 ms.
Received: 129827200 bytes.
Throughtput: 38094008.566076 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 19.877810 Max: 3000.113000
Std Dev: 242.165939
Time Per Connection:
Min: 0.718000 Avg: 6.870267 Max: 325.669000
Std Dev: 15.223363
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 9002.329881 ms.
Received: 259654400 bytes.
Throughtput: 28843022.132839 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 53.183149 Max: 8998.301000
Std Dev: 463.814402
Time Per Connection:
Min: 0.917000 Avg: 8.472754 Max: 1543.154000
Std Dev: 38.653958
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 8978.491975 ms.
Received: 51930880 bytes.
Throughtput: 5783920.077777 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 309.678334 Max: 8998.599000
Std Dev: 1081.509954
Time Per Connection:
Min: 0.855000 Avg: 10.890426 Max: 220.843000
Std Dev: 26.589323
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 6174.945945 ms.
Received: 847089600 bytes.
Throughtput: 137181702.885973 bps.
Connection Latency Stats:
Min: 0.040000 Avg: 0.277232 Max: 30.733000
Std Dev: 2.237432
Time Per Connection:
Min: 22.324000 Avg: 61.275665 Max: 2090.195000
Std Dev: 155.269942
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 12752.297078 ms.
Received: 1694179200 bytes.
Throughtput: 132852864.830537 bps.
Connection Latency Stats:
Min: 0.041000 Avg: 0.116697 Max: 6.554000
Std Dev: 0.303537
Time Per Connection:
Min: 27.402000 Avg: 126.049100 Max: 9315.619000
Std Dev: 511.004123
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 25359.343897 ms.
Received: 3388358400 bytes.
Throughtput: 133613803.804544 bps.
Connection Latency Stats:
Min: 0.038000 Avg: 0.116187 Max: 14.693000
Std Dev: 0.412419
Time Per Connection:
Min: 29.657000 Avg: 252.932969 Max: 25323.269000
Std Dev: 1074.732002
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 90.911117 ms.
Received: 6776716800 bytes.
Throughtput: 74542223316.687790 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 2.240726 Max: 3925.935000
Std Dev: 84.988871
Time Per Connection:
Min: 26.178000 Avg: 336.572790 Max: 19425.762000
Std Dev: 906.032259
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 76.870963 ms.
Received: 13553433600 bytes.
Throughtput: 176314086568.699860 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.249500 Max: 193.450000
Std Dev: 4.372815
Time Per Connection:
Min: 25.701000 Avg: 694.902171 Max: 38598.049000
Std Dev: 1616.386463
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 19922.899973 ms.
Received: 2710686720 bytes.
Throughtput: 136058843.025739 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 426.367913 Max: 9072.950000
Std Dev: 1622.350470
Time Per Connection:
Min: 30.424000 Avg: 1487.292045 Max: 19937.208000
Std Dev: 2193.319367
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 1638.751059 ms.
Received: 215993700 bytes.
Throughtput: 131803850.785830 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 1.053998 Max: 31.117000
Std Dev: 3.687348
Time Per Connection:
Min: 0.457000 Avg: 15.174207 Max: 740.646000
Std Dev: 50.366896
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 3306.358023 ms.
Received: 431987400 bytes.
Throughtput: 130653545.968720 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 2.330673 Max: 647.021000
Std Dev: 34.627184
Time Per Connection:
Min: 0.457000 Avg: 30.482190 Max: 2280.805000
Std Dev: 135.845786
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 6709.487883 ms.
Received: 863974800 bytes.
Throughtput: 128769112.499340 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.507321 Max: 29.245000
Std Dev: 1.415858
Time Per Connection:
Min: 0.489000 Avg: 65.961961 Max: 6707.828000
Std Dev: 409.822028
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 13428.442957 ms.
Received: 1727949600 bytes.
Throughtput: 128678328.941602 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 12.962692 Max: 3029.104000
Std Dev: 191.669957
Time Per Connection:
Min: 0.454000 Avg: 119.872164 Max: 13432.575000
Std Dev: 576.546510
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 26965.634098 ms.
Received: 3455899200 bytes.
Throughtput: 128159389.372392 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 20.149508 Max: 9031.336000
Std Dev: 274.041387
Time Per Connection:
Min: 0.682000 Avg: 247.507363 Max: 26954.944000
Std Dev: 870.905099
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 3726.975998 ms.
Received: 691179840 bytes.
Throughtput: 185453257.644467 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 91.276663 Max: 8997.897000
Std Dev: 589.477997
Time Per Connection:
Min: 0.446000 Avg: 136.089566 Max: 5359.457000
Std Dev: 568.275807
-----------------------------------------------------------------

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 94.455094 ms.
Received: 48000 bytes.
Throughtput: 508177.993358 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.068025 Max: 0.681000
Std Dev: 0.066166
Time Per Connection:
Min: 0.170000 Avg: 0.835200 Max: 19.601000
Std Dev: 1.614715
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 198.933973 ms.
Received: 96000 bytes.
Throughtput: 482572.175816 bps.
Connection Latency Stats:
Min: 0.029000 Avg: 0.061664 Max: 0.806000
Std Dev: 0.053993
Time Per Connection:
Min: 0.316000 Avg: 1.880609 Max: 24.018000
Std Dev: 2.375786
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 354.312002 ms.
Received: 192000 bytes.
Throughtput: 541895.275765 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.091439 Max: 3.267000
Std Dev: 0.201148
Time Per Connection:
Min: 0.628000 Avg: 3.394812 Max: 30.625000
Std Dev: 1.975538
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 725.942072 ms.
Received: 384000 bytes.
Throughtput: 528967.826314 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 0.055440 Max: 1.636000
Std Dev: 0.065996
Time Per Connection:
Min: 0.582000 Avg: 7.170217 Max: 43.429000
Std Dev: 1.980224
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 1536.018088 ms.
Received: 768000 bytes.
Throughtput: 499994.112093 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.058779 Max: 4.735000
Std Dev: 0.132685
Time Per Connection:
Min: 0.769000 Avg: 15.251857 Max: 60.165000
Std Dev: 2.714467
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 313.666103 ms.
Received: 153600 bytes.
Throughtput: 489692.696453 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.175093 Max: 16.755000
Std Dev: 0.949621
Time Per Connection:
Min: 0.726000 Avg: 30.717854 Max: 109.835000
Std Dev: 11.804567
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 109.421889 ms.
Received: 608800 bytes.
Throughtput: 5563786.251384 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.056077 Max: 0.861000
Std Dev: 0.060995
Time Per Connection:
Min: 0.242000 Avg: 1.000448 Max: 30.191000
Std Dev: 1.809878
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 221.338115 ms.
Received: 1217600 bytes.
Throughtput: 5501085.968929 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.064907 Max: 1.613000
Std Dev: 0.100999
Time Per Connection:
Min: 0.395000 Avg: 2.102601 Max: 20.645000
Std Dev: 2.019843
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 471.212000 ms.
Received: 2435200 bytes.
Throughtput: 5167949.882295 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.055290 Max: 0.983000
Std Dev: 0.054109
Time Per Connection:
Min: 0.577000 Avg: 4.613683 Max: 74.000000
Std Dev: 2.947814
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 911.234932 ms.
Received: 4870400 bytes.
Throughtput: 5344834.609788 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.063571 Max: 3.073000
Std Dev: 0.107007
Time Per Connection:
Min: 0.674000 Avg: 9.001211 Max: 29.821000
Std Dev: 2.006086
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 1945.293012 ms.
Received: 9740800 bytes.
Throughtput: 5007369.039824 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 0.060782 Max: 5.936000
Std Dev: 0.179789
Time Per Connection:
Min: 0.498000 Avg: 19.317911 Max: 103.197000
Std Dev: 4.590278
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 354.337943 ms.
Received: 1948160 bytes.
Throughtput: 5498028.186796 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 0.115519 Max: 12.045000
Std Dev: 0.575362
Time Per Connection:
Min: 0.824000 Avg: 34.653105 Max: 79.063000
Std Dev: 9.468855
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 719.629094 ms.
Received: 16228400 bytes.
Throughtput: 22551061.568492 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 0.075462 Max: 1.731000
Std Dev: 0.132723
Time Per Connection:
Min: 0.989000 Avg: 7.041423 Max: 130.247000
Std Dev: 13.212123
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 1650.776037 ms.
Received: 32456800 bytes.
Throughtput: 19661540.554634 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.103226 Max: 5.140000
Std Dev: 0.424414
Time Per Connection:
Min: 1.130000 Avg: 16.280203 Max: 183.486000
Std Dev: 15.955096
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3552.952111 ms.
Received: 64913600 bytes.
Throughtput: 18270327.875343 bps.
Connection Latency Stats:
Min: 0.038000 Avg: 0.086889 Max: 15.476000
Std Dev: 0.425832
Time Per Connection:
Min: 1.788000 Avg: 35.243502 Max: 256.162000
Std Dev: 17.927544
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 7071.038111 ms.
Received: 129827200 bytes.
Throughtput: 18360415.819566 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.087254 Max: 32.041000
Std Dev: 0.602652
Time Per Connection:
Min: 0.939000 Avg: 70.260761 Max: 257.891000
Std Dev: 24.388180
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 14839.896977 ms.
Received: 259654400 bytes.
Throughtput: 17497048.693101 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.067760 Max: 6.091000
Std Dev: 0.138323
Time Per Connection:
Min: 1.384000 Avg: 147.565553 Max: 394.192000
Std Dev: 29.822434
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 2547.349078 ms.
Received: 51930880 bytes.
Throughtput: 20386244.054598 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.154458 Max: 47.487000
Std Dev: 1.417733
Time Per Connection:
Min: 1.524000 Avg: 243.373022 Max: 475.097000
Std Dev: 95.453300
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 8925.615977 ms.
Received: 847089600 bytes.
Throughtput: 94905449.912190 bps.
Connection Latency Stats:
Min: 0.059000 Avg: 0.092807 Max: 0.152000
Std Dev: 0.021620
Time Per Connection:
Min: 19.150000 Avg: 88.796552 Max: 3351.166000
Std Dev: 263.991526
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 29252.534068 ms.
Received: 1694179200 bytes.
Throughtput: 57915638.899580 bps.
Connection Latency Stats:
Min: 0.047000 Avg: 0.079269 Max: 9.122000
Std Dev: 0.320075
Time Per Connection:
Min: 45.051000 Avg: 291.317470 Max: 6099.883000
Std Dev: 488.701301
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 41454.360949 ms.
Received: 3388358400 bytes.
Throughtput: 81737079.583638 bps.
Connection Latency Stats:
Min: 0.049000 Avg: 0.070868 Max: 0.924000
Std Dev: 0.045642
Time Per Connection:
Min: 38.245000 Avg: 412.962964 Max: 10094.118000
Std Dev: 440.787714
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 79458.696980 ms.
Received: 6776716800 bytes.
Throughtput: 85286029.818298 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.080627 Max: 1.323000
Std Dev: 0.086002
Time Per Connection:
Min: 37.359000 Avg: 790.016586 Max: 8240.649000
Std Dev: 397.080349
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 101461.690113 ms.
Received: 13553433600 bytes.
Throughtput: 133581784.266203 bps.
Connection Latency Stats:
Min: 0.044000 Avg: 0.512769 Max: 1051.763000
Std Dev: 15.185486
Time Per Connection:
Min: 33.242000 Avg: 1009.036995 Max: 15746.147000
Std Dev: 385.906788
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 20222.906066 ms.
Received: 2710686720 bytes.
Throughtput: 134040414.918476 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 143.412292 Max: 3014.705000
Std Dev: 640.338410
Time Per Connection:
Min: 21.336000 Avg: 1783.847067 Max: 9278.715000
Std Dev: 556.138981
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 1867.658924 ms.
Received: 215993700 bytes.
Throughtput: 115649435.365366 bps.
Connection Latency Stats:
Min: 0.037000 Avg: 0.503570 Max: 31.190000
Std Dev: 2.327637
Time Per Connection:
Min: 0.432000 Avg: 17.731412 Max: 478.840000
Std Dev: 39.795335
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 4494.668953 ms.
Received: 431987400 bytes.
Throughtput: 96111060.569730 bps.
Connection Latency Stats:
Min: 0.036000 Avg: 0.201681 Max: 31.010000
Std Dev: 1.459531
Time Per Connection:
Min: 0.492000 Avg: 44.104611 Max: 3896.446000
Std Dev: 148.557457
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 8388.457924 ms.
Received: 863974800 bytes.
Throughtput: 102995664.739737 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.280858 Max: 62.454000
Std Dev: 2.240689
Time Per Connection:
Min: 0.473000 Avg: 82.369248 Max: 3971.182000
Std Dev: 133.597686
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 13521.389006 ms.
Received: 1727949600 bytes.
Throughtput: 127793793.910233 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 10.650965 Max: 3008.314000
Std Dev: 175.996770
Time Per Connection:
Min: 0.914000 Avg: 123.739140 Max: 4122.160000
Std Dev: 106.995254
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 28219.870064 ms.
Received: 3455899200 bytes.
Throughtput: 122463327.864426 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 21.259774 Max: 3006.641000
Std Dev: 251.039499
Time Per Connection:
Min: 0.585000 Avg: 259.035877 Max: 8396.095000
Std Dev: 197.460677
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 4914.458041 ms.
Received: 691179840 bytes.
Throughtput: 140642128.638308 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 153.132800 Max: 3008.299000
Std Dev: 660.035852
Time Per Connection:
Min: 0.707000 Avg: 331.889377 Max: 2009.325000
Std Dev: 160.781757
-----------------------------------------------------------------

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 100.125098 ms.
Received: 48000 bytes.
Throughtput: 479400.281598 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.065980 Max: 0.293000
Std Dev: 0.042994
Time Per Connection:
Min: 0.248000 Avg: 0.898160 Max: 14.541000
Std Dev: 1.539300
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 154.797965 ms.
Received: 96000 bytes.
Throughtput: 620163.192178 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.101206 Max: 2.181000
Std Dev: 0.142686
Time Per Connection:
Min: 0.302000 Avg: 1.390520 Max: 4.500000
Std Dev: 0.581317
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3133.313893 ms.
Received: 192000 bytes.
Throughtput: 61276.975937 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 9.488324 Max: 3000.182000
Std Dev: 167.431448
Time Per Connection:
Min: 0.156000 Avg: 2.277969 Max: 299.403000
Std Dev: 10.356557
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3107.445959 ms.
Received: 384000 bytes.
Throughtput: 123574.152236 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 19.858520 Max: 3013.438000
Std Dev: 242.227370
Time Per Connection:
Min: 0.213000 Avg: 2.493267 Max: 337.066000
Std Dev: 11.967340
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 3239.220916 ms.
Received: 768000 bytes.
Throughtput: 237094.048201 bps.
Connection Latency Stats:
Min: 0.030000 Avg: 25.020148 Max: 3004.761000
Std Dev: 271.854475
Time Per Connection:
Min: 0.168000 Avg: 2.386341 Max: 259.159000
Std Dev: 9.322813
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
Time: 2988.879121 ms.
Received: 153600 bytes.
Throughtput: 51390.502519 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 120.095362 Max: 2999.690000
Std Dev: 586.535126
Time Per Connection:
Min: 0.191000 Avg: 4.151802 Max: 208.849000
Std Dev: 13.266020
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 87.675033 ms.
Received: 608800 bytes.
Throughtput: 6943824.002096 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.084028 Max: 0.415000
Std Dev: 0.059651
Time Per Connection:
Min: 0.232000 Avg: 0.750155 Max: 1.714000
Std Dev: 0.237734
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 151.159924 ms.
Received: 1217600 bytes.
Throughtput: 8055045.077135 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 0.144235 Max: 3.895000
Std Dev: 0.246001
Time Per Connection:
Min: 0.213000 Avg: 1.278797 Max: 8.612000
Std Dev: 0.743403
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3160.025996 ms.
Received: 2435200 bytes.
Throughtput: 770626.571748 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 9.591579 Max: 3000.068000
Std Dev: 167.409912
Time Per Connection:
Min: 0.215000 Avg: 2.170003 Max: 203.656000
Std Dev: 7.266334
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3200.816059 ms.
Received: 4870400 bytes.
Throughtput: 1521611.961068 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 19.857624 Max: 2999.627000
Std Dev: 242.154796
Time Per Connection:
Min: 0.234000 Avg: 2.489916 Max: 609.729000
Std Dev: 13.601895
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 3285.505045 ms.
Received: 9740800 bytes.
Throughtput: 2964780.107402 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 25.016281 Max: 3000.104000
Std Dev: 271.826973
Time Per Connection:
Min: 0.201000 Avg: 2.611213 Max: 390.396000
Std Dev: 10.486515
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
Time: 9154.369104 ms.
Received: 1948160 bytes.
Throughtput: 212812.043950 bps.
Connection Latency Stats:
Min: 0.035000 Avg: 323.653126 Max: 8998.291000
Std Dev: 1223.766380
Time Per Connection:
Min: 0.230000 Avg: 15.273491 Max: 609.653000
Std Dev: 29.134674
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 249.378973 ms.
Received: 16228400 bytes.
Throughtput: 65075254.050405 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 0.144860 Max: 1.592000
Std Dev: 0.198050
Time Per Connection:
Min: 0.906000 Avg: 2.286040 Max: 8.335000
Std Dev: 0.902870
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 456.352918 ms.
Received: 32456800 bytes.
Throughtput: 71122148.508817 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.195185 Max: 5.875000
Std Dev: 0.377826
Time Per Connection:
Min: 0.911000 Avg: 4.268054 Max: 13.396000
Std Dev: 1.866018
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3295.256096 ms.
Received: 64913600 bytes.
Throughtput: 19699106.265438 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 9.568179 Max: 2999.816000
Std Dev: 167.405357
Time Per Connection:
Min: 0.971000 Avg: 6.597404 Max: 254.686000
Std Dev: 14.857947
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 3746.354959 ms.
Received: 129827200 bytes.
Throughtput: 34654270.996860 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 19.885080 Max: 3000.015000
Std Dev: 242.199109
Time Per Connection:
Min: 0.926000 Avg: 7.116299 Max: 738.234000
Std Dev: 20.245374
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 9205.180086 ms.
Received: 259654400 bytes.
Throughtput: 28207422.079422 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 66.777265 Max: 8999.120000
Std Dev: 706.264058
Time Per Connection:
Min: 0.995000 Avg: 6.992090 Max: 901.466000
Std Dev: 22.543850
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
Time: 9027.045914 ms.
Received: 51930880 bytes.
Throughtput: 5752809.999465 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 368.186319 Max: 8999.296000
Std Dev: 1346.176641
Time Per Connection:
Min: 0.882000 Avg: 14.920571 Max: 657.235000
Std Dev: 59.172527
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 35376.128978 ms.
Received: 847089600 bytes.
Throughtput: 23945231.557558 bps.
Connection Latency Stats:
Min: 0.049000 Avg: 0.083302 Max: 1.168000
Std Dev: 0.091856
Time Per Connection:
Min: 29.567000 Avg: 353.282285 Max: 2457.908000
Std Dev: 216.983955
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 67094.939106 ms.
Received: 1694179200 bytes.
Throughtput: 25250476.751097 bps.
Connection Latency Stats:
Min: 0.047000 Avg: 0.080966 Max: 2.853000
Std Dev: 0.122419
Time Per Connection:
Min: 29.551000 Avg: 669.047030 Max: 4280.440000
Std Dev: 434.407098
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 135975.536943 ms.
Received: 3388358400 bytes.
Throughtput: 24918882.294339 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 0.075569 Max: 2.599000
Std Dev: 0.122532
Time Per Connection:
Min: 22.966000 Avg: 1357.511583 Max: 10616.164000
Std Dev: 1166.919683
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 155756.821994 ms.
Received: 6776716800 bytes.
Throughtput: 43508314.520265 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 19.833388 Max: 15039.843000
Std Dev: 339.681305
Time Per Connection:
Min: 29.347000 Avg: 1957.553700 Max: 36004.192000
Std Dev: 3413.487494
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 33158.774043 ms.
Received: 13553433600 bytes.
Throughtput: 408743507.297307 bps.
Connection Latency Stats:
Min: 0.031000 Avg: 2.508118 Max: 3064.434000
Std Dev: 85.485199
Time Per Connection:
Min: 29.415000 Avg: 977.701653 Max: 52125.661000
Std Dev: 2098.897645
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 21105.385107 ms.
Received: 2710686720 bytes.
Throughtput: 128435785.758291 bps.
Connection Latency Stats:
Min: 0.032000 Avg: 562.805541 Max: 20995.633000
Std Dev: 2325.201577
Time Per Connection:
Min: 30.305000 Avg: 1449.867783 Max: 20725.986000
Std Dev: 2393.592446
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 400
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 1644.010902 ms.
Received: 215993700 bytes.
Throughtput: 131382157.928342 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.376335 Max: 30.107000
Std Dev: 2.491935
Time Per Connection:
Min: 0.461000 Avg: 15.853305 Max: 626.539000
Std Dev: 48.804277
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 800
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 3406.353070 ms.
Received: 431987400 bytes.
Throughtput: 126818151.580259 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 0.396401 Max: 8.687000
Std Dev: 1.020329
Time Per Connection:
Min: 0.451000 Avg: 33.288115 Max: 3077.353000
Std Dev: 146.503261
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1600
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 6108.621006 ms.
Received: 863974800 bytes.
Throughtput: 141435325.446865 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 1.736118 Max: 2046.050000
Std Dev: 51.246328
Time Per Connection:
Min: 0.453000 Avg: 61.957966 Max: 6595.869000
Std Dev: 367.016689
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 3200
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 13703.718910 ms.
Received: 1727949600 bytes.
Throughtput: 126093479.539098 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 22.398770 Max: 3012.068000
Std Dev: 254.055611
Time Per Connection:
Min: 0.480000 Avg: 112.041867 Max: 13405.220000
Std Dev: 481.983161
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 6400
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 27090.260103 ms.
Received: 3455899200 bytes.
Throughtput: 127569805.044363 bps.
Connection Latency Stats:
Min: 0.033000 Avg: 32.663193 Max: 9054.356000
Std Dev: 370.152857
Time Per Connection:
Min: 0.425000 Avg: 236.544983 Max: 27102.304000
Std Dev: 1117.224362
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://127.0.0.1:8080/tiny.html"
[JOBM] Got URL "http://127.0.0.1:8080/small.html"
[JOBM] Got URL "http://127.0.0.1:8080/medium.html"
[JOBM] Got URL "http://127.0.0.1:8080/big.html"
Time: 9224.865088 ms.
Received: 691179840 bytes.
Throughtput: 74925739.663021 bps.
Connection Latency Stats:
Min: 0.034000 Avg: 332.719140 Max: 8999.112000
Std Dev: 1280.598884
Time Per Connection:
Min: 0.458000 Avg: 224.062134 Max: 5292.868000
Std Dev: 633.896284
-----------------------------------------------------------------

View File

@@ -0,0 +1,3 @@
/results32.txt/1.1/Tue Feb 21 03:17:06 2006//
/table_results32.log/1.1/Tue Feb 21 06:39:41 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/results/dual-thousand-same

View File

@@ -0,0 +1 @@
/usr/_CVS

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
threads throughput conn-latency time-per-connection
4 413975.723396 0.539654 0.224940
8 413432.936757 1.295861 0.560891
16 453167.275260 0.237708 1.349391
32 2564006259.780908 0.485072 0.897448
64 11619858156.028368 1.962906 1.233124
128 1950476190.476191 0.671579 1.065333

View File

@@ -0,0 +1,3 @@
/results16.txt/1.1/Tue Feb 21 03:16:19 2006//
/results32.txt/1.2/Tue Feb 21 06:39:41 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/results/single-diff

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,528 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3000.741010 ms.
Received: 4800 bytes.
Throughtput: 1599.604892 bps.
Connection Latency Stats:
Min: 0.126000 Avg: 75.291300 Max: 2999.819000
Std Dev: 468.299462
Time Per Connection:
Min: 0.342000 Avg: 2.151675 Max: 19.778000
Std Dev: 3.672439
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 27.545965 ms.
Received: 9600 bytes.
Throughtput: 348508.395214 bps.
Connection Latency Stats:
Min: 0.122000 Avg: 0.168562 Max: 0.360000
Std Dev: 0.073293
Time Per Connection:
Min: 0.535000 Avg: 2.417700 Max: 26.540000
Std Dev: 4.120283
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3013.171910 ms.
Received: 19200 bytes.
Throughtput: 6372.022763 bps.
Connection Latency Stats:
Min: 0.122000 Avg: 75.165619 Max: 2999.699000
Std Dev: 468.264795
Time Per Connection:
Min: 0.568000 Avg: 5.826444 Max: 203.363000
Std Dev: 22.274215
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 2994.746045 ms.
Received: 38400 bytes.
Throughtput: 12822.456203 bps.
Connection Latency Stats:
Min: 0.121000 Avg: 28.307787 Max: 3000.427000
Std Dev: 289.102299
Time Per Connection:
Min: 0.677000 Avg: 12.737453 Max: 202.714000
Std Dev: 25.330459
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 2988.847012 ms.
Received: 76800 bytes.
Throughtput: 25695.527305 bps.
Connection Latency Stats:
Min: 0.120000 Avg: 4.860586 Max: 2999.435000
Std Dev: 118.463602
Time Per Connection:
Min: 0.707000 Avg: 25.890719 Max: 280.066000
Std Dev: 33.610981
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3283.917941 ms.
Received: 153600 bytes.
Throughtput: 46773.397734 bps.
Connection Latency Stats:
Min: 0.120000 Avg: 44.734066 Max: 3000.778000
Std Dev: 362.781715
Time Per Connection:
Min: 0.533000 Avg: 37.406017 Max: 244.238000
Std Dev: 14.537570
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 17.746998 ms.
Received: 60880 bytes.
Throughtput: 3430439.320168 bps.
Connection Latency Stats:
Min: 0.157000 Avg: 0.375875 Max: 0.558000
Std Dev: 0.149474
Time Per Connection:
Min: 1.040000 Avg: 1.332925 Max: 2.210000
Std Dev: 0.224221
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 27.456887 ms.
Received: 121760 bytes.
Throughtput: 4434588.707282 bps.
Connection Latency Stats:
Min: 0.140000 Avg: 0.492413 Max: 1.375000
Std Dev: 0.274700
Time Per Connection:
Min: 0.806000 Avg: 2.167713 Max: 5.081000
Std Dev: 1.074100
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 58.109068 ms.
Received: 243520 bytes.
Throughtput: 4190740.046804 bps.
Connection Latency Stats:
Min: 0.130000 Avg: 0.416556 Max: 1.197000
Std Dev: 0.234685
Time Per Connection:
Min: 0.925000 Avg: 5.317069 Max: 24.702000
Std Dev: 4.768666
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 189.413906 ms.
Received: 487040 bytes.
Throughtput: 2571300.121138 bps.
Connection Latency Stats:
Min: 0.123000 Avg: 0.196109 Max: 1.050000
Std Dev: 0.168748
Time Per Connection:
Min: 2.233000 Avg: 18.690847 Max: 193.580000
Std Dev: 37.351850
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 371.977068 ms.
Received: 974080 bytes.
Throughtput: 2618656.048983 bps.
Connection Latency Stats:
Min: 0.123000 Avg: 0.236445 Max: 2.227000
Std Dev: 0.235374
Time Per Connection:
Min: 2.137000 Avg: 36.457255 Max: 291.189000
Std Dev: 39.388572
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 660.197943 ms.
Received: 1948160 bytes.
Throughtput: 2950872.567361 bps.
Connection Latency Stats:
Min: 0.123000 Avg: 0.342673 Max: 4.050000
Std Dev: 0.357410
Time Per Connection:
Min: 1.732000 Avg: 64.437548 Max: 418.733000
Std Dev: 40.183907
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 148.488990 ms.
Received: 1622840 bytes.
Throughtput: 10929025.767831 bps.
Connection Latency Stats:
Min: 0.135000 Avg: 1.769975 Max: 4.669000
Std Dev: 1.399751
Time Per Connection:
Min: 6.571000 Avg: 12.746325 Max: 20.709000
Std Dev: 2.347006
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 281.802096 ms.
Received: 3245680 bytes.
Throughtput: 11517586.455469 bps.
Connection Latency Stats:
Min: 0.209000 Avg: 3.241400 Max: 6.922000
Std Dev: 1.862164
Time Per Connection:
Min: 8.756000 Avg: 24.038375 Max: 31.340000
Std Dev: 3.194631
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 561.280006 ms.
Received: 6491360 bytes.
Throughtput: 11565279.241689 bps.
Connection Latency Stats:
Min: 0.232000 Avg: 7.850762 Max: 18.663000
Std Dev: 5.112797
Time Per Connection:
Min: 14.048000 Avg: 46.653688 Max: 60.082000
Std Dev: 7.460885
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 1117.242039 ms.
Received: 12982720 bytes.
Throughtput: 11620328.940217 bps.
Connection Latency Stats:
Min: 0.295000 Avg: 14.881838 Max: 22.974000
Std Dev: 5.353888
Time Per Connection:
Min: 7.079000 Avg: 92.842650 Max: 121.204000
Std Dev: 12.466366
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 3022.137941 ms.
Received: 25965440 bytes.
Throughtput: 8591745.480787 bps.
Connection Latency Stats:
Min: 0.159000 Avg: 50.468831 Max: 3000.662000
Std Dev: 310.257512
Time Per Connection:
Min: 6.299000 Avg: 172.123566 Max: 395.219000
Std Dev: 37.234744
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 5775.894904 ms.
Received: 51930880 bytes.
Throughtput: 8990966.916960 bps.
Connection Latency Stats:
Min: 0.271000 Avg: 64.554691 Max: 3021.000000
Std Dev: 372.162983
Time Per Connection:
Min: 4.412000 Avg: 363.032007 Max: 587.070000
Std Dev: 69.002028
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 7224.779045 ms.
Received: 84708960 bytes.
Throughtput: 11724782.096996 bps.
Connection Latency Stats:
Min: 0.146000 Avg: 6.745550 Max: 19.568000
Std Dev: 6.533248
Time Per Connection:
Min: 697.479000 Avg: 714.501050 Max: 738.409000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 14467.338096 ms.
Received: 169417920 bytes.
Throughtput: 11710372.625546 bps.
Connection Latency Stats:
Min: 0.198000 Avg: 12.743700 Max: 44.217000
Std Dev: 12.503666
Time Per Connection:
Min: 1366.233000 Avg: 1432.797737 Max: 1472.198000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 28873.221107 ms.
Received: 338835840 bytes.
Throughtput: 11735297.518072 bps.
Connection Latency Stats:
Min: 0.240000 Avg: 32.349863 Max: 94.779000
Std Dev: 29.162389
Time Per Connection:
Min: 2588.159000 Avg: 2850.858731 Max: 2975.577000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 57716.782053 ms.
Received: 677671680 bytes.
Throughtput: 11741328.187365 bps.
Connection Latency Stats:
Min: 0.368000 Avg: 102.065106 Max: 3066.860000
Std Dev: 410.576170
Time Per Connection:
Min: 2584.592000 Avg: 5512.939284 Max: 5927.129000
Std Dev: 711.731045
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 115435.074957 ms.
Received: 1355343360 bytes.
Throughtput: 11741174.513073 bps.
Connection Latency Stats:
Min: 0.327000 Avg: 132.307141 Max: 3067.662000
Std Dev: 455.072690
Time Per Connection:
Min: 2468.472000 Avg: 10962.102358 Max: 12029.120000
Std Dev: 1689.947282
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 230887.337947 ms.
Received: 2710686720 bytes.
Throughtput: 11740300.460389 bps.
Connection Latency Stats:
Min: 0.279000 Avg: 177.359960 Max: 3089.512000
Std Dev: 553.148019
Time Per Connection:
Min: 2571.280000 Avg: 21884.364620 Max: 24512.096000
Std Dev: 3768.850863
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 1873.120061 ms.
Received: 21599370 bytes.
Throughtput: 11531225.603076 bps.
Connection Latency Stats:
Min: 0.167000 Avg: 10.897525 Max: 19.869000
Std Dev: 5.727393
Time Per Connection:
Min: 15.529000 Avg: 160.713000 Max: 544.478000
Std Dev: 195.247954
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 3684.572926 ms.
Received: 43198740 bytes.
Throughtput: 11724219.026157 bps.
Connection Latency Stats:
Min: 0.165000 Avg: 22.375837 Max: 38.985000
Std Dev: 11.204026
Time Per Connection:
Min: 1.423000 Avg: 314.420087 Max: 1087.872000
Std Dev: 385.613650
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 7368.286078 ms.
Received: 86397480 bytes.
Throughtput: 11725587.074699 bps.
Connection Latency Stats:
Min: 0.126000 Avg: 62.570831 Max: 3055.215000
Std Dev: 238.360480
Time Per Connection:
Min: 0.875000 Avg: 610.727731 Max: 2224.610000
Std Dev: 750.640894
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 14740.007078 ms.
Received: 172794960 bytes.
Throughtput: 11722854.614900 bps.
Connection Latency Stats:
Min: 0.148000 Avg: 135.730072 Max: 3058.549000
Std Dev: 468.608186
Time Per Connection:
Min: 2.323000 Avg: 1219.538628 Max: 9593.513000
Std Dev: 1197.347709
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 29456.851949 ms.
Received: 345589920 bytes.
Throughtput: 11732072.408681 bps.
Connection Latency Stats:
Min: 0.156000 Avg: 199.099208 Max: 3065.951000
Std Dev: 613.365007
Time Per Connection:
Min: 2.327000 Avg: 2540.883597 Max: 5300.178000
Std Dev: 1268.724550
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 58914.683061 ms.
Received: 691179840 bytes.
Throughtput: 11731877.421625 bps.
Connection Latency Stats:
Min: 0.138000 Avg: 261.261434 Max: 3069.021000
Std Dev: 729.115167
Time Per Connection:
Min: 2.215000 Avg: 5271.465298 Max: 7971.162000
Std Dev: 1736.501917
-----------------------------------------------------------------

View File

@@ -0,0 +1,408 @@
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 31.365975 ms.
Received: 4800 bytes.
Throughtput: 153032.069027 bps.
Connection Latency Stats:
Min: 0.120000 Avg: 0.160250 Max: 0.362000
Std Dev: 0.098820
Time Per Connection:
Min: 0.364000 Avg: 2.891100 Max: 17.361000
Std Dev: 4.229995
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 26.580936 ms.
Received: 9600 bytes.
Throughtput: 361161.102280 bps.
Connection Latency Stats:
Min: 0.123000 Avg: 0.161400 Max: 0.355000
Std Dev: 0.070723
Time Per Connection:
Min: 0.634000 Avg: 2.434887 Max: 6.452000
Std Dev: 1.281599
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3006.467883 ms.
Received: 19200 bytes.
Throughtput: 6386.231534 bps.
Connection Latency Stats:
Min: 0.120000 Avg: 75.182100 Max: 2999.911000
Std Dev: 468.297051
Time Per Connection:
Min: 0.577000 Avg: 5.768950 Max: 202.838000
Std Dev: 22.235437
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3022.509889 ms.
Received: 38400 bytes.
Throughtput: 12704.673075 bps.
Connection Latency Stats:
Min: 0.120000 Avg: 131.438350 Max: 3000.607000
Std Dev: 613.629769
Time Per Connection:
Min: 0.518000 Avg: 6.452462 Max: 201.634000
Std Dev: 20.429760
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3109.852082 ms.
Received: 76800 bytes.
Throughtput: 24695.708341 bps.
Connection Latency Stats:
Min: 0.118000 Avg: 32.988853 Max: 3000.159000
Std Dev: 311.999378
Time Per Connection:
Min: 0.747000 Avg: 22.382786 Max: 253.105000
Std Dev: 35.156157
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/tiny.html"
Time: 3093.306000 ms.
Received: 153600 bytes.
Throughtput: 49655.611181 bps.
Connection Latency Stats:
Min: 0.119000 Avg: 54.100180 Max: 3000.661000
Std Dev: 398.518162
Time Per Connection:
Min: 0.600000 Avg: 36.990609 Max: 241.480000
Std Dev: 10.913365
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 18.565897 ms.
Received: 60880 bytes.
Throughtput: 3279130.634154 bps.
Connection Latency Stats:
Min: 0.126000 Avg: 0.362225 Max: 0.747000
Std Dev: 0.169597
Time Per Connection:
Min: 0.847000 Avg: 1.401750 Max: 4.302000
Std Dev: 0.517682
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 29.722000 ms.
Received: 121760 bytes.
Throughtput: 4096628.759447 bps.
Connection Latency Stats:
Min: 0.123000 Avg: 0.405850 Max: 1.425000
Std Dev: 0.263152
Time Per Connection:
Min: 0.837000 Avg: 2.499262 Max: 6.479000
Std Dev: 1.191602
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 3006.959930 ms.
Received: 243520 bytes.
Throughtput: 80985.448989 bps.
Connection Latency Stats:
Min: 0.130000 Avg: 56.641819 Max: 3000.008000
Std Dev: 406.823114
Time Per Connection:
Min: 0.795000 Avg: 6.062700 Max: 203.303000
Std Dev: 22.228398
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 3027.209053 ms.
Received: 487040 bytes.
Throughtput: 160887.468135 bps.
Connection Latency Stats:
Min: 0.125000 Avg: 150.400775 Max: 3000.812000
Std Dev: 653.801217
Time Per Connection:
Min: 0.909000 Avg: 6.020272 Max: 203.128000
Std Dev: 18.424861
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 3230.457092 ms.
Received: 974080 bytes.
Throughtput: 301530.084541 bps.
Connection Latency Stats:
Min: 0.124000 Avg: 239.463045 Max: 3001.279000
Std Dev: 812.282543
Time Per Connection:
Min: 0.836000 Avg: 7.888798 Max: 206.573000
Std Dev: 20.333311
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/small.html"
Time: 3387.126986 ms.
Received: 1948160 bytes.
Throughtput: 575165.917260 bps.
Connection Latency Stats:
Min: 0.121000 Avg: 47.492946 Max: 3000.475000
Std Dev: 371.993163
Time Per Connection:
Min: 0.795000 Avg: 43.387445 Max: 250.171000
Std Dev: 16.273523
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 142.528076 ms.
Received: 1622840 bytes.
Throughtput: 11386107.520619 bps.
Connection Latency Stats:
Min: 0.250000 Avg: 1.335575 Max: 3.028000
Std Dev: 0.759608
Time Per Connection:
Min: 7.916000 Avg: 12.456275 Max: 15.655000
Std Dev: 0.468048
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 285.317074 ms.
Received: 3245680 bytes.
Throughtput: 11375694.950371 bps.
Connection Latency Stats:
Min: 0.165000 Avg: 3.626250 Max: 8.697000
Std Dev: 2.388568
Time Per Connection:
Min: 8.103000 Avg: 23.911550 Max: 32.487000
Std Dev: 4.308938
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 560.719941 ms.
Received: 6491360 bytes.
Throughtput: 11576831.000608 bps.
Connection Latency Stats:
Min: 0.248000 Avg: 6.891806 Max: 14.912000
Std Dev: 3.924927
Time Per Connection:
Min: 13.133000 Avg: 47.138781 Max: 257.795000
Std Dev: 25.482302
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 3986.382000 ms.
Received: 12982720 bytes.
Throughtput: 3256767.665542 bps.
Connection Latency Stats:
Min: 0.255000 Avg: 41.771200 Max: 3000.433000
Std Dev: 287.960200
Time Per Connection:
Min: 4.321000 Avg: 91.530600 Max: 327.811000
Std Dev: 58.473778
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 4621.142928 ms.
Received: 25965440 bytes.
Throughtput: 5618835.081683 bps.
Connection Latency Stats:
Min: 0.191000 Avg: 82.323138 Max: 3001.619000
Std Dev: 403.447108
Time Per Connection:
Min: 5.684000 Avg: 171.756377 Max: 438.219000
Std Dev: 58.726144
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/medium.html"
Time: 4457.988119 ms.
Received: 51930880 bytes.
Throughtput: 11648949.842914 bps.
Connection Latency Stats:
Min: 0.341000 Avg: 36.061173 Max: 50.030000
Std Dev: 10.782136
Time Per Connection:
Min: 20.016000 Avg: 391.792589 Max: 464.708000
Std Dev: 65.604150
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 40
[CONF] Overriding default thread-count with value 4
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 7225.445121 ms.
Received: 84708960 bytes.
Throughtput: 11723701.250352 bps.
Connection Latency Stats:
Min: 0.144000 Avg: 6.453950 Max: 19.021000
Std Dev: 6.632844
Time Per Connection:
Min: 687.428000 Avg: 715.149025 Max: 734.321000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 80
[CONF] Overriding default thread-count with value 8
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 14435.637068 ms.
Received: 169417920 bytes.
Throughtput: 11736088.902579 bps.
Connection Latency Stats:
Min: 0.219000 Avg: 14.603013 Max: 44.722000
Std Dev: 14.314108
Time Per Connection:
Min: 1353.805000 Avg: 1424.340063 Max: 1447.922000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 160
[CONF] Overriding default thread-count with value 16
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 28862.687059 ms.
Received: 338835840 bytes.
Throughtput: 11739580.563391 bps.
Connection Latency Stats:
Min: 0.256000 Avg: 33.266094 Max: 95.289000
Std Dev: 29.698675
Time Per Connection:
Min: 2650.515000 Avg: 2843.939644 Max: 2907.770000
Std Dev: nan
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 320
[CONF] Overriding default thread-count with value 32
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 57688.523895 ms.
Received: 677671680 bytes.
Throughtput: 11747079.561938 bps.
Connection Latency Stats:
Min: 0.320000 Avg: 99.913769 Max: 121.371000
Std Dev: 33.878246
Time Per Connection:
Min: 3157.028000 Avg: 5559.240675 Max: 10701.954000
Std Dev: 1647.866203
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 640
[CONF] Overriding default thread-count with value 64
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 115367.775998 ms.
Received: 1355343360 bytes.
Throughtput: 11748023.642438 bps.
Connection Latency Stats:
Min: 0.335000 Avg: 136.867437 Max: 3120.944000
Std Dev: 315.378974
Time Per Connection:
Min: 3793.476000 Avg: 11041.246536 Max: 18972.974000
Std Dev: 2231.038520
-----------------------------------------------------------------
[MAIN] Initialization Complete. Starting work.
[CONF] Overriding default job-count with value 1280
[CONF] Overriding default thread-count with value 128
[JOBM] Got URL "http://michoacan-lnx:8080/big.html"
Time: 1032576.663965 ms.
Received: 2679096000 bytes.
Throughtput: 2594573.452506 bps.
Connection Latency Stats:
Min: 0.353000 Avg: 327.730089 Max: 21111.386000
Std Dev: 1237.887593
Time Per Connection:
Min: 3723.900000 Avg: 31126.736680 Max: 1023463.665000
Std Dev: 108015.185076
-----------------------------------------------------------------

View File

@@ -0,0 +1,67 @@
my $client;
my $thread_count;
my $job_count;
my $urlfile;
my $server;
my $pool_size;
&varyURLFile();
#&thousandFiles();
sub thousandFiles() {
&initClient();
my $string = "$client job-count=3000 thread-count=32 < urlfile6";
system($string);
}
sub initClient() {
$client = "bin/client";
$thread_count = 2;
$job_count = $thread_count * 100;
$urlfile = "urlfile";
}
sub varyThreadCountClient() {
my $file = pop(@_);
my $i;
my $string = "echo 'Something bad happened if you see this.";
&initClient();
for ($i = 0; $i < 5; $i++) {
$thread_count = $thread_count * 2;
$job_count = $thread_count * 10;
$string = "$client job-count=$job_count thread-count=$thread_count < $file";
system($string);
print "-----------------------------------------------------------------\n";
}
system("$client job-count=1280 thread-count=128 < $file");
print "-----------------------------------------------------------------\n";
}
sub varyURLFile() {
my $j = 0;
&initClient();
for ($j = 1; $j < 6; $j++) {
&varyThreadCountClient("$urlfile$j");
}
}
sub initServer() {
$server = "bin/server";
$pool_size = 2;
}
sub varyThreadCountServer() {
&initServer();
$thread_count = $thread_count * 2;
$job_count = $thread_count * 100;
open(SERVER, "| $server home=home pool-size=$pool_size") or die "Could not open server! $!";
}

View File

@@ -0,0 +1,3 @@
D/client////
D/common////
D/server////

View File

@@ -0,0 +1 @@
cs4210/proj1/src

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1 @@
obj

View File

@@ -0,0 +1,12 @@
/.cvsignore/1.1/Tue Jan 24 02:28:52 2006//
/Makefile/1.7/Sun Feb 19 20:40:03 2006//
/config.c/1.2/Sun Feb 19 19:24:51 2006//
/config.h/1.2/Sun Feb 19 19:24:51 2006//
/job_manager.c/1.13/Mon Feb 20 23:43:11 2006//
/job_manager.h/1.6/Mon Feb 20 23:23:14 2006//
/main.c/1.12/Tue Feb 21 00:56:56 2006//
/stat.c/1.2/Tue Feb 21 00:56:56 2006//
/stat.h/1.2/Tue Feb 21 00:56:56 2006//
/worker.c/1.5/Mon Feb 20 23:05:47 2006//
/worker.h/1.3/Sun Feb 19 03:04:32 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/src/client

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,106 @@
##############################################################################
#
# Generic Makefile. Only need to modify the variables for src, obj,
# and bin directories, and the name of the executable.
#
# $Author: vurazov $
# $Date: 2006/02/19 20:40:03 $
# $Revision: 1.7 $
#
##############################################################################
########################### Directories and Target ###########################
# Source directory:
SRC_DIR = .
# Object directory:
OBJ_DIR = ./obj
# Executable directory:
BIN_DIR = ../../bin
# The static libraries to link with the code:
STATIC_LIBS = ../../bin/libcommon.a
# Name of the executable:
BIN_NAME = client
######################## Compiler and Linker Options #########################
# Compiler:
CC = gcc
# Linker:
LD = gcc
# Preprocessor flags:
DFLAGS =
# Compiler flags:
CFLAGS = -std=c99 -Wall -pedantic -O2 -I..
# Linker flags:
LDFLAGS = -lpthread -lm
############################ Other Programs Used #############################
# Dependency generator:
MDEPEND = $(CC) -M -I..
# Make Dir command:
MKDIR = /bin/mkdir -p
# Clean-up command:
RM = /bin/rm -f
######################### Automatic Object Variables #########################
# The list of source files:
SRCS = $(wildcard $(SRC_DIR)/*.c)
# Generated object files:
OBJS = $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS))
OBDS = $(patsubst $(SRC_DIR)/%.c,%.o,$(SRCS))
# Look for .o files in obj dir:
vpath %.o $(OBJ_DIR)
# Program file:
PROG = $(BIN_DIR)/$(BIN_NAME)
################################### Rules ####################################
# Top-level rule: compile everything
all: $(PROG)
# The program link rule:
$(PROG): $(OBDS) $(BIN_DIR)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(STATIC_LIBS)
# Meta rule for compiling ".c" files
%.o: $(SRC_DIR)/%.c $(OBJ_DIR)
$(CC) $(CFLAGS) $(DFLAGS) -c -o $(OBJ_DIR)/$@ $<
# Rules for obj and bin dirs:
$(OBJ_DIR):
$(MKDIR) $(OBJ_DIR)
$(BIN_DIR):
$(MKDIR) $(BIN_DIR)
# Rule for cleaning up before a recompile:
.PHONY: clean
clean:
$(RM) $(PROG) $(OBJS) .depend
# Rule for creating dependency lists and writing them into a dependency file:
.depend: $(SRCS)
$(MDEPEND) $(SRCS) > .depend
#Include dependency list:
include .depend

View File

@@ -0,0 +1,116 @@
#include <stdio.h>
#include <stdlib.h>
#include "common/util.h"
#include "config.h"
#define CONFIG_PNAME_JOBCOUNT "job-count"
#define CONFIG_PNAME_WORKERCOUNT "thread-count"
#define CONFIG_PNAME_URLFILE "url-file"
#define CONFIG_PNAME_CONFIGFILE "config-file"
#define CONFIG_DVALUE_JOBCOUNT 1
#define CONFIG_DVALUE_WORKERCOUNT 1
#define CONFIG_DVALUE_URLFILE stdin
static int m_job_count = 0;
static int m_worker_count = 0;
static FILE* m_url_file = NULL;
static int m_read_config_file = 0;
int record_parameter(const char* name, const char* value)
{
if (!strcmp(name, CONFIG_PNAME_JOBCOUNT))
{
/* Got job count: */
m_job_count = atoi(value);
printf("[CONF] Overriding default %s with value %d\n",
CONFIG_PNAME_JOBCOUNT, m_job_count);
return 0;
}
else if(!strcmp(name, CONFIG_PNAME_WORKERCOUNT))
{
/* Got worker count: */
m_worker_count = atoi(value);
printf("[CONF] Overriding default %s with value %d\n",
CONFIG_PNAME_WORKERCOUNT, m_worker_count);
return 0;
}
else if(!strcmp(name, CONFIG_PNAME_URLFILE))
{
/* Got url file: */
m_url_file = fopen(value, "r");
if (m_url_file)
{
printf("[CONF] Overriding default %s with value \"%s\"\n",
CONFIG_PNAME_URLFILE, value);
return 0;
}
else
{
fprintf(stderr, "[CONF] Could not open URL file \"%s\"\n", value);
return 1;
}
}
else if(!strcmp(name, CONFIG_PNAME_CONFIGFILE))
{
/* Got config file name: */
if (!m_read_config_file)
{
m_read_config_file = 1;
return parse_file_parameters(fopen(value, "r"), record_parameter);
}
else
{
return 0;
}
}
else
{
/* Unknown parameter: */
fprintf(stderr, "[CONF] Unknown parameter \"%s\"\n", name);
config_print_parameters(stderr);
return 1;
}
}
void config_print_parameters(FILE* out)
{
fprintf(out, "Supported parameters:\n");
fprintf(out, "\t%s - the number of requests to make to the server.\n"
"\t\tDefault value is %d.\n",
CONFIG_PNAME_JOBCOUNT, CONFIG_DVALUE_JOBCOUNT);
fprintf(out, "\t%s - the number of threads to start for making requests.\n"
"\t\tDefault value is %d.\n",
CONFIG_PNAME_WORKERCOUNT, CONFIG_DVALUE_WORKERCOUNT);
fprintf(out, "\t%s - the name of the file from which to read the list of\n"
"\t\tURLs to request.\n"
"\t\tDefault value is stdin.\n",
CONFIG_PNAME_URLFILE);
fprintf(out, "\t%s - the name of a configuration file.\n",
CONFIG_PNAME_CONFIGFILE);
fprintf(out, "\t\n");
}
int config_init(int argc, const char** argv)
{
/* Initialize default values: */
m_job_count = CONFIG_DVALUE_JOBCOUNT;
m_worker_count = CONFIG_DVALUE_WORKERCOUNT;
m_url_file = CONFIG_DVALUE_URLFILE;
return parse_command_parameters(argc, argv, record_parameter);
}
void config_free()
{
if (m_url_file)
{
fclose(m_url_file);
}
}
int config_get_jobcount() { return m_job_count; }
int config_get_workercount() { return m_worker_count; }
FILE* config_get_urlfile() { return m_url_file; }

View File

@@ -0,0 +1,23 @@
#ifndef _CLIENT_CONFIG_H_
#define _CLIENT_CONFIG_H_
#include <stdio.h>
/* Records the parameter with the given name and value. */
int record_parameter(const char* name, const char* value);
/* Given a stream, will print the list of supported parameters to the
* stream. */
void config_print_parameters(FILE* out);
/* Initializes the configuration with the parameters specified. */
int config_init(int argc, const char** argv);
/* Cleans up whatever resources the configuration consumed. */
void config_free();
int config_get_jobcount();
int config_get_workercount();
FILE* config_get_urlfile();
#endif/*_CLIENT_CONFIG_H_*/

View File

@@ -0,0 +1,148 @@
#include <stdlib.h>
#include "common/debug.h"
#include "common/networking.h"
#include "common/queue.h"
#include "common/threading.h"
#include "common/util.h"
#include "job_manager.h"
/* The queue of jobs still to be done. */
static queue_t m_jobs;
static queue_t m_finished_jobs;
static int m_job_count = 0;
static job_t* joblist = NULL;
/* Condition GO */
static pthread_mutex_t go_mutex;
static pthread_cond_t go_cond;
/* Reads the list of URLs from the file and puts them in the queue. */
static void m_read_job_list(queue_t* queue, FILE* url_file)
{
char* url = NULL;
while ((url = read_line(url_file)) != NULL)
{
char* newline = strchr(url, '\n');
sockaddress_t address;
char* path;
char* host;
port_t port;
if (newline) *newline = '\0';
if (strlen(url) < 1)
{
free(url);
continue;
}
if (parse_url(url, &host, &port, &path))
{
fprintf(stderr, "[JOBS] Got bad url \"%s\"\n", url);
free(url);
continue;
}
else if (net_get_hostaddr(&address, host, port))
{
fprintf(stderr, "[JOBS] Got bad url \"%s\"\n", url);
free(url);
continue;
}
else
{
queue_enqueue(queue, (void*) job_new(address, path));
}
printf("[JOBM] Got URL \"%s\"\n", url);
free(url);
free(host);
}
}
void jobs_init(int job_count, FILE* url_file)
{
int i;
queue_t urls;
queue_iterator_t url_iter;
joblist = calloc(job_count, sizeof(job_t));
if (!joblist)
{
fprintf(stderr, "[JOBS] Could not allocate space for enough jobs.\n");
exit(1);
}
pthread_mutex_init(&go_mutex, NULL);
pthread_cond_init(&go_cond, NULL);
queue_initialize(&m_jobs);
queue_initialize(&m_finished_jobs);
queue_initialize(&urls);
m_read_job_list(&urls, url_file);
for (i = 0, iterator_initialize(&url_iter, &urls, 1); i < job_count; i++)
{
job_t* proto_job = (job_t*) iterator_next(&url_iter);
queue_enqueue(&m_jobs, job_init(joblist + i,
proto_job->address, proto_job->path));
}
m_job_count = job_count;
queue_free(&urls); /* TODO: Free the actual proto-jobs inside. */
}
int jobs_remaining()
{
return m_job_count;
}
job_t* jobs_get()
{
return (job_t*) queue_dequeue_nb(&m_jobs);
}
void jobs_complete_job(job_t* job)
{
queue_enqueue(&m_finished_jobs, job);
}
void jobs_clean()
{
}
queue_t* jobs_completed()
{
return &m_finished_jobs;
}
job_t* job_new(sockaddress_t address, char* path)
{
job_t* result = (job_t*) calloc(1, sizeof(job_t));
if (!result)
{
return NULL;
}
return job_init(result, address, path);
}
job_t* job_init(job_t* job, sockaddress_t address, char* path)
{
job->address = address;
job->path = path;
return job;
}
void jobs_wait_to_start()
{
pthread_cond_wait(&go_cond, &go_mutex);
}
void jobs_signal_start()
{
pthread_cond_broadcast(&go_cond);
}

View File

@@ -0,0 +1,54 @@
#ifndef _JOB_MANAGER_H_
#define _JOB_MANAGER_H_
#include <stdio.h>
#include "common/networking.h"
#include "common/queue.h"
typedef struct
{
sockaddress_t address;
char* path;
/* Number of milliseconds to establish connection. */
double connection_latency;
double data_time;
long bytes_received;
} job_t;
/* Initializes the job list. The job_count parameter is the number of jobs to
create, and the url_file is a file that contains the list of URLs, one per
line, to fetch. */
void jobs_init(int job_count, FILE* url_file);
/* Returns the number of jobs remaining to be completed. */
int jobs_remaining();
/* If there are more jobs to be completed, returns the job. Otherwise, returns
NULL. */
job_t* jobs_get();
/* Marks the job as complete. */
void jobs_complete_job(job_t* job);
queue_t* jobs_completed();
/* Frees the resources associated with the job manager. */
void jobs_clean();
/* Allocates a new job, and fills it in with the parameters specified. Returns
NULL, if there was an error. */
job_t* job_new(sockaddress_t address, char* path);
job_t* job_init(job_t* job, sockaddress_t address, char* path);
/* Calling this function will have the current thread wait untill we are ready
to start processing jobs. */
void jobs_wait_to_start();
/* Calling this function will broadcast to all threads that we are ready to
start processing the jobs. */
void jobs_signal_start();
#endif/*_JOB_MANAGER_H_*/

View File

@@ -0,0 +1,83 @@
#include <stdio.h>
#include <stdlib.h>
#include "common/threading.h"
#include "common/timer.h"
#include "common/util.h"
#include "config.h"
#include "job_manager.h"
#include "stat.h"
#include "worker.h"
double get_job_conn_latency(void* j) { return ((job_t*) j)->connection_latency; }
double get_job_data_latency(void* j) { return ((job_t*) j)->data_time; }
double get_job_bytes(void* j) { return ((job_t*) j)->bytes_received; }
int main(int argc, const char** argv) {
time_span_t total;
int result;
stat_t connstats;
stat_t datastats;
double total_time;
long long total_bytes;
/* Initialize configuration: */
if (config_init(argc, argv))
{
return 1;
}
#ifdef WIN32
/* Have to initialize WinSock */
WSADATA uselessData;
result = WSAStartup(MAKEWORD(2, 2), &uselessData);
if (result)
{
fprintf(stderr, "[MAIN] Could not initialize WinSock.\n");
net_report_error();
return result;
}
#endif
jobs_init(config_get_jobcount(), config_get_urlfile());
if (workers_initialize(config_get_workercount()))
{
exit(1);
}
timer_start(&total);
fprintf(stderr, "[MAIN] Initialization Complete. Starting work.\n");
fflush(stderr);
jobs_signal_start();
wait_for_workers();
timer_stop(&total);
fflush(stdout);
fflush(stderr);
total_time = timer_span(&total);
total_bytes = stat_sum(jobs_completed(), get_job_bytes);
fprintf(stderr, "Time: %f ms.\n", total_time);
fprintf(stderr, "Received: %lld bytes.\n", (long long) total_bytes);
fprintf(stderr, "Throughtput: %f bps.\n", 1000 * total_bytes / total_time);
fprintf(stderr, "\n");
stat_compute(&connstats, jobs_completed(), get_job_conn_latency);
stat_compute(&datastats, jobs_completed(), get_job_data_latency);
fprintf(stderr, "Connection Latency Stats:\n");
stat_print(&connstats, stderr);
fprintf(stderr, "\n");
fprintf(stderr, "Time Per Connection:\n");
stat_print(&datastats, stderr);
fprintf(stderr, "\n");
return EXIT_SUCCESS;
}

View File

@@ -0,0 +1,74 @@
#include <math.h>
#include "stat.h"
static inline double min(double a, double b)
{
return (a < b) ? a : b;
}
static inline double max(double a, double b)
{
return (a > b) ? a : b;
}
void stat_compute(stat_t* s, queue_t* q, value_func v)
{
queue_iterator_t i;
void* item;
iterator_initialize(&i, q, 0);
item = iterator_next(&i);
if (item)
{
double c = v(item);
s->min = c;
s->mean = c;
s->stdev = c;
s->max = c;
s->count = 1;
}
else
{
s->min = 0.0;
s->mean = 0.0;
s->stdev = 0.0;
s->max = 0.0;
s->count = 0;
}
while ((item = iterator_next(&i)) != NULL)
{
double c = v(item);
s->min = min(s->min, c);
s->mean += c;
s->stdev += c * c;
s->max = max(s->max, c);
s->count ++;
}
s->mean /= s->count;
s->stdev = sqrt((s->stdev / s->count) - s->mean * s->mean);
}
long long stat_sum(queue_t* q, value_func v)
{
long long result = 0.0;
void* item;
queue_iterator_t i;
iterator_initialize(&i, q, 0);
while ((item = iterator_next(&i)) != NULL)
{
result += (long long) v(item);
}
return result;
}
void stat_print(stat_t* s, FILE* stream)
{
fprintf(stream, "Min: %f\tAvg: %f\tMax: %f\n", s->min, s->mean, s->max);
fprintf(stream, "Std Dev: %f\n", s->stdev);
}

View File

@@ -0,0 +1,28 @@
#ifndef _STAT_H_
#define _STAT_H_
#include <stdio.h>
#include "common/queue.h"
typedef struct
{
double min;
double mean;
double stdev;
double max;
int count;
} stat_t;
typedef double(*value_func)(void*);
/* Fills in the structure s with the statistics about the values gotten from each element of q with function v. */
void stat_compute(stat_t* s, queue_t* q, value_func v);
/* Returns a sum of values over the whole q. */
long long stat_sum(queue_t* q, value_func v);
void stat_print(stat_t* s, FILE* stream);
#endif/*_STAT_H_*/

View File

@@ -0,0 +1,150 @@
#include <stdlib.h>
#include "common/debug.h"
#include "common/networking.h"
#include "common/timer.h"
#include "common/threading.h"
#include "common/util.h"
#include "job_manager.h"
#include "worker.h"
#define BUFFER_SIZE 256
static int m_worker_count;
static pthread_mutex_t worker_count_mutex;
static pthread_cond_t all_done_cond;
/* List of child threads. */
static pthread_t* m_children = NULL;
int workers_initialize(int thread_count)
{
int index;
int result;
m_worker_count = thread_count;
pthread_mutex_init(&worker_count_mutex, NULL);
pthread_cond_init(&all_done_cond, NULL);
/* Spawn children threads. */
m_children = (pthread_t*) calloc(thread_count, sizeof(pthread_t));
if (!m_children)
{
fprintf(stderr, "[WORK] Could not allocate memory.\n");
return 1;
}
for (index = 0; index < thread_count; index++)
{
result = pthread_create(m_children + index, NULL,
worker_run, NULL);
if (result)
{
fprintf(stderr, "[WORK] Could not create child thread.\n");
return result;
}
}
return 0;
}
static void m_read_response(job_t* job, socket_t sock)
{
char buffer[BUFFER_SIZE];
int bytes_received = 0;
time_span_t timer;
timer_start(&timer);
/* First, send the header to the server: */
net_send_string(sock, "GET ", strlen("GET "));
net_send_string(sock, job->path, strlen(job->path));
net_send_string(sock, " HTTP/1.1\r\n\r\n", strlen(" HTTP/1.1\r\n\r\n"));
/* Now, receive stuff from the server: */
do
{
bytes_received = recv(sock, buffer, BUFFER_SIZE, 0);
job->bytes_received += bytes_received;
} while (bytes_received > 0);
timer_stop(&timer);
job->data_time = timer_span(&timer);
DEBUG_PRINTF(("[WORK] Job %p took %f ms.\n", job, job->data_time));
}
static socket_t m_establish_connection(job_t* job)
{
time_span_t connection_latency;
socket_t result = 0;
timer_start(&connection_latency);
result = net_open_data_socket(&(job->address));
timer_stop(&connection_latency);
if (IS_BAD_SOCKET(result))
{
/* Could not open socket: */
fprintf(stderr, "[WORK] Could not open socket to the server.\n");
job->connection_latency = -1;
}
else
{
job->connection_latency = timer_span(&connection_latency);
}
return result;
}
static void m_process_job(job_t* job)
{
socket_t sock = m_establish_connection(job);
if (IS_BAD_SOCKET(sock))
{
return;
}
m_read_response(job, sock);
net_close_socket(sock);
}
void* worker_run(void* p)
{
job_t* cjob = NULL;
DEBUG_PRINTF(("[WORK] Waiting for GO signal.\n"));
/* jobs_wait_to_start();*/
DEBUG_PRINTF(("[WORK] All systems GO.\n"));
while ((cjob = jobs_get()) != NULL)
{
DEBUG_PRINTF(("[WORK] Starting job %p\n", cjob));
m_process_job(cjob);
jobs_complete_job(cjob);
DEBUG_PRINTF(("[WORK] Finished job %p\n\n", cjob));
}
pthread_mutex_lock(&worker_count_mutex);
m_worker_count --;
if (m_worker_count < 1)
{
pthread_cond_broadcast(&all_done_cond);
}
pthread_mutex_unlock(&worker_count_mutex);
return NULL;
}
void wait_for_workers()
{
pthread_cond_wait(&all_done_cond, &worker_count_mutex);
}

View File

@@ -0,0 +1,14 @@
#ifndef _WORKER_H_
#define _WORKER_H_
/* Initializes the number of workers specified. */
int workers_initialize(int thread_count);
/* The worker will attack the queue of jobs to completed and while there are
more jobs to be peformed will do them. */
void* worker_run(void* p);
/* This function will wait until all workers are done. */
void wait_for_workers();
#endif/*_WORKER_H_*/

View File

@@ -0,0 +1,13 @@
/Makefile/1.2/Sat Feb 18 02:10:09 2006//
/debug.h/1.1/Tue Feb 21 00:58:27 2006//
/http.c/1.4/Mon Feb 20 23:05:47 2006//
/http.h/1.1/Thu Feb 16 01:12:25 2006//
/networking.c/1.6/Mon Feb 20 23:05:47 2006//
/networking.h/1.5/Sun Feb 19 08:35:24 2006//
/queue.c/1.5/Sun Feb 19 19:35:47 2006//
/queue.h/1.4/Sun Feb 19 19:35:47 2006//
/threading.h/1.1/Thu Feb 16 01:12:25 2006//
/timer.h/1.3/Sun Feb 19 07:27:08 2006//
/util.c/1.7/Mon Feb 20 16:00:58 2006//
/util.h/1.5/Sun Feb 19 01:42:40 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/src/common

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,103 @@
##############################################################################
#
# Generic Makefile. Only need to modify the variables for src, obj,
# and bin directories, and the name of the executable.
#
# $Author: vurazov $
# $Date: 2006/02/18 02:10:09 $
# $Revision: 1.2 $
#
##############################################################################
########################### Directories and Target ###########################
# Source directory:
SRC_DIR = .
# Object directory:
OBJ_DIR = ./obj
# Executable directory:
BIN_DIR = ../../bin
# Name of the executable:
BIN_NAME = common
######################## Compiler and Linker Options #########################
# Compiler:
CC = gcc
# Linker:
LD = ar
# Preprocessor flags:
DFLAGS =
# Compiler flags:
CFLAGS = -std=c99 -Wall -pedantic -O2
# Linker flags:
LDFLAGS = rcs
############################ Other Programs Used #############################
# Dependency generator:
MDEPEND = $(CC) -M
# Make Dir command:
MKDIR = /bin/mkdir -p
# Clean-up command:
RM = /bin/rm -f
######################### Automatic Object Variables #########################
# The list of source files:
SRCS = $(wildcard $(SRC_DIR)/*.c)
# Generated object files:
OBJS = $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS))
OBDS = $(patsubst $(SRC_DIR)/%.c,%.o,$(SRCS))
# Look for .o files in obj dir:
vpath %.o $(OBJ_DIR)
# Program file:
PROG = $(BIN_DIR)/lib$(BIN_NAME).a
################################### Rules ####################################
# Top-level rule: compile everything
all: $(PROG)
# The program link rule:
$(PROG): $(OBDS) $(BIN_DIR)
$(LD) $(LDFLAGS) $(PROG) $(OBJS)
# Meta rule for compiling ".c" files
%.o: $(SRC_DIR)/%.c $(OBJ_DIR)
$(CC) $(CFLAGS) $(DFLAGS) -c -o $(OBJ_DIR)/$@ $<
# Rules for obj and bin dirs:
$(OBJ_DIR):
$(MKDIR) $(OBJ_DIR)
$(BIN_DIR):
$(MKDIR) $(BIN_DIR)
# Rule for cleaning up before a recompile:
.PHONY: clean
clean:
$(RM) $(PROG) $(OBJS) .depend
# Rule for creating dependency lists and writing them into a dependency file:
.depend: $(SRCS)
$(MDEPEND) $(SRCS) > .depend
#Include dependency list:
include .depend

View File

@@ -0,0 +1,10 @@
#ifndef __DEBUG_H__
#define __DEBUG_H__
#ifdef DEBUG
#define DEBUG_PRINTF(x) printf x
#else
#define DEBUG_PRINTF(x)
#endif
#endif/*__DEBUG_H__*/

View File

@@ -0,0 +1,152 @@
#include <stdlib.h>
#include "debug.h"
#include "http.h"
#include "util.h"
/* The length of the buffer to read the stuff from the socket into. */
#define BUFFER_LENGTH 256
char* http_read_header(socket_t csocket)
{
char* result = NULL;
char buffer[BUFFER_LENGTH];
int bytes_received = 0;
DEBUG_PRINTF(("[HTTP] Reading header.\n"));
do
{
bytes_received = recv(csocket, buffer, BUFFER_LENGTH - 1, 0);
if (bytes_received > 0)
{
char* substr = NULL;
buffer[bytes_received] = '\0';
/* Append buffer to result: */
result = strcatd(result, buffer);
/* See if result now has two CRLFs in a row, to indicate the
end of the header: */
substr = strstr(result, "\r\n\r\n");
if (substr)
{
substr[4] = '\0';
break;
}
}
} while (bytes_received > 0);
DEBUG_PRINTF(("[HTTP] Got header:\n%s\n[HTTP] End header.\n", result));
return result;
}
char* http_get_requesturi(const char* header)
{
char* start = ((char*) strchr(header, ' ')) + 1;
if (start == NULL)
{
return NULL;
}
else
{
const char* stop = strchr(start, ' ');
if (stop == NULL)
{
return NULL;
}
else
{
/* Count the length of the request: */
char* ptr = NULL;
size_t count = 0;
for (ptr = start; ptr != stop; ptr++)
{
count ++;
}
return strncatd(NULL, start, count);
}
}
}
const char* http_get_method(const char* header)
{
/* If header starts with GET, then we have a GET request. */
if (strstr(header, HTTP_METHOD_GET) == header)
{
return HTTP_METHOD_GET;
}
else
{
return NULL;
}
}
void http_send_canned_response(socket_t socket, int status)
{
static const char* html1 = "<html>HTTP Status code ";
static const char* html2 = "</html>";
char buffer[8];
sprintf(buffer, "%d", status);
/* Send the appropriate header: */
http_send_header(socket, status);
/* Send some HTML: */
net_send_string(socket, html1, strlen(html1));
net_send_string(socket, buffer, strlen(buffer));
net_send_string(socket, html2, strlen(html2));
}
void http_send_header(socket_t socket, int status)
{
char buffer[32];
char* header = NULL;
/*
static struct utsname *our_name = NULL;
if (uname(our_name))
{
return NULL;
}
our_name->nodename
*/
/* Make status line: */
sprintf(buffer, "HTTP/1.1 %d %d\r\n", status, status);
header = strcatd(header, buffer);
/* Add various other headers: */
header = strcatd(header, "Content-Type: text/html\r\n");
header = strcatd(header, "Server: CS4210P1/vlad,omar\r\n");
header = strcatd(header, "Connection: Close\r\n");
header = strcatd(header, "\r\n");
net_send_string(socket, header, strlen(header));
free(header);
}
void http_send_text_file(socket_t socket, FILE* f)
{
char buffer[BUFFER_LENGTH];
size_t bytes_read = 0;
while (!feof(f))
{
bytes_read = fread(buffer, sizeof(char), BUFFER_LENGTH - 1, f);
buffer[bytes_read] = '\0';
if (bytes_read > 0)
{
net_send_string(socket, buffer, bytes_read);
}
else
{
break;
}
}
}

View File

@@ -0,0 +1,41 @@
#ifndef _HTTP_H_
#define _HTTP_H_
#include <stdio.h>
#include "networking.h"
/* Some useful request methods: */
#define HTTP_METHOD_GET "GET"
/* Some useful response codes: */
#define HTTP_STATUS_OK 200
#define HTTP_STATUS_BADREQUEST 400
#define HTTP_STATUS_FORBIDDEN 403
#define HTTP_STATUS_NOTFOUND 404
/*#define HTTP_STATUS_INTERNALERROR 500*/
#define HTTP_STATUS_NOTIMPLEMENTED 501
/* Returns a newly allocated string containing the HTTP header read
* from the socket. */
char* http_read_header(socket_t socket);
/* Returns a newly allocated string containing the requested URI from
* the header. */
char* http_get_requesturi(const char* header);
/* Given a request header, returns the type of request method that we
* have. If the method is unsupported, returns NULL. */
const char* http_get_method(const char* header);
/* Sends a hard-coded html response according to the status code passed in. */
void http_send_canned_response(socket_t socket, int status);
/* Sends a response header to the socket, according to the status code
* passed in. */
void http_send_header(socket_t socket, int status);
/* Sends the contents of the file as text through the socket. */
void http_send_text_file(socket_t socket, FILE* f);
#endif/*_HTTP_H_*/

View File

@@ -0,0 +1,164 @@
#include <ctype.h>
#include <stdio.h>
#include "networking.h"
int net_get_hostaddr(sockaddress_t* addr,
const char* hostname, const port_t port)
{
struct hostent* he = NULL;
if (isdigit(hostname[0]))
{
/* First character in host name is a digit... Could be an IP address */
unsigned long address = inet_addr(hostname);
if (address != INADDR_NONE)
{
he = gethostbyaddr((const char*) &address, 4, AF_INET);
}
}
if (he == NULL)
{
/* Well, the IP address bit didn't work. Try host name lookup: */
he = gethostbyname(hostname);
}
if (he == NULL)
{
fprintf(stderr, "[NET] Could not get host information as IP address, nor by name.\n");
net_report_error();
return 1;
}
addr->sin_family = AF_INET;
addr->sin_port = htons(port);
addr->sin_addr = *((struct in_addr*) (he->h_addr));
return 0;
}
socket_t net_open_data_socket(sockaddress_t* addr)
{
int err = 0;
socket_t result = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (IS_BAD_SOCKET(result))
{
fprintf(stderr, "[NET] Could not open client socket.\n");
net_report_error();
return 1;
}
err = connect(result, (struct sockaddr*) addr, sizeof(*addr));
if (err)
{
fprintf(stderr, "[NET] Could not connect on socket.\n");
net_report_error();
return -1;
}
return result;
}
/*
* Creates and initializes a new listening socket, ready to accept connections.
*/
socket_t net_listen_on_port(port_t port)
{
int reuse = 1;
int error_code = 0;
socket_t socket_id = -1;
sockaddress_t sockinfo;
/* Initialize socket using the TCP/IP protocol: */
socket_id = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (IS_BAD_SOCKET(socket_id))
{
fprintf(stderr, "[NET] Could not open listening socket.\n");
net_report_error();
return -1;
}
/* Set socket options to release unused socket numbers: */
error_code = setsockopt(socket_id, SOL_SOCKET, SO_REUSEADDR,
(sockoption_t) &reuse, sizeof(reuse));
if (error_code)
{
fprintf(stderr, "[NET] Could not set socket options.\n");
net_report_error();
return -1;
}
/* Bind the socket: */
sockinfo.sin_family = AF_INET;
sockinfo.sin_port = htons(port);
sockinfo.sin_addr.s_addr = htonl(INADDR_ANY); /* Bind to all interfaces */
error_code = bind(socket_id, (struct sockaddr*) &sockinfo, sizeof(sockinfo));
if (error_code)
{
fprintf(stderr, "[NET] Could not bind socket.\n");
net_report_error();
return -1;
}
/* Start Listening: */
error_code = listen(socket_id, 8);
if (error_code)
{
fprintf(stderr, "[NET] Could not listen on socket.\n");
net_report_error();
return -1;
}
return socket_id;
}
int net_send_string(socket_t socket, const char* data, size_t len)
{
if (send(socket, data, (int) len, 0) < (int) len)
{
fprintf(stderr, "[NET] Could not send data through socket.\n");
net_report_error();
return 1;
}
return 0;
}
int net_close_socket(socket_t socket)
{
int result = shutdown(socket, SHUT_RDWR);
if (result)
{
fprintf(stderr, "[NET] Could not shut down socket.\n");
net_report_error();
}
/* Curiously, the WinSock documentation says that shutdown does not
* actually close the socket, but tells the socket to stop accepting
* and sending data. Apparently, we also need to call this close
* socket deal. */
#ifdef WIN32
result = closesocket(socket);
#else
result = close(socket);
#endif
if (result)
{
fprintf(stderr, "[NET] Could not close socket.\n");
net_report_error();
}
return result;
}
void net_report_error()
{
#ifdef WIN32
int errcode = WSAGetLastError();
#else
int errcode = errno;
#endif
fprintf(stderr, "[NET] \tError #: %d.\n\n", errcode);
}

View File

@@ -0,0 +1,96 @@
#ifndef _NETWORKING_H_
#define _NETWORKING_H_
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/types.h> /* header containing all basic data types */
#include <sys/socket.h> /*header containing socket data types and functions*/
#include <netinet/in.h> /* IPv4 and IPv6 stuff */
#include <netdb.h> /* for DNS - gethostbyname() */
#include <unistd.h>
#include <arpa/inet.h> /* contains all inet_* functions */
#endif
#include <errno.h> /* contains the error functions */
#if 0 /* TODO: Remove this stuff? */
#include <fcntl.h> /* file control */
#endif
#ifdef WIN32
/* Apparently, this socklen_t business is not defined in Win. */
typedef int socklen_t;
#endif
/* The socket type. Typedef'ed to make the code more platform-independent. */
#ifdef WIN32
typedef SOCKET socket_t;
#else
typedef int socket_t;
#endif
/* The setsockopt function takes different parameter type for the
* value of the option in Berkeley sockets and WinSock. */
#ifdef WIN32
typedef const char* sockoption_t;
#else
typedef const void* sockoption_t;
#endif
/* The 'how' parameter to the shutdown function is different in
* Berkeley sockets and WinSock, too. */
#ifndef SHUT_RDWR
#define SHUT_RDWR SD_BOTH
#endif
/* The ways to check for illegal socket in windows and Linux are different: */
#ifdef WIN32
#define IS_BAD_SOCKET(socket) (socket == INVALID_SOCKET)
#else
#define IS_BAD_SOCKET(socket) (socket < 0)
#endif
/* The port type. Typedef'ed in case we want to make this code
* platform-independent at some point and the ports on another
* platform are something other than this. */
typedef unsigned short port_t;
/* This is the struct we will be using for socket addresses. */
typedef struct sockaddr_in sockaddress_t;
/* Given a host name and a port number, fills in the sockaddress struct with the
appropriate information for the host. This function will automagically work both if the host is a host name, or if it's an IP address in dotted notation. **WARNING** This function IS NOT mt-safe! */
int net_get_hostaddr(sockaddress_t* addr,
const char* hostname, const port_t port);
/* Opens a client socket on the specified address. */
socket_t net_open_data_socket(sockaddress_t* addr);
/*
* Creates a new listening socket on the specified port, sets up the
* correct options, binds and starts listening. Returns the id of the
* socket if all these operations were successful, and -1 if there was
* an error at any point. If there is an error, then also this
* function will print out to stderr what the error was. If a valid
* socket id is returned, then accept can be called on the socket to
* accept connections.
*/
socket_t net_listen_on_port(port_t port);
/* Sends the string through the socket. Returns 0 on success, and an
* error code on failure. */
int net_send_string(socket_t socket, const char* data, size_t len);
/*
* Shuts down the socket. Returns zero on success, and error code on
* failure. Also, on failure will print out the error to stderr.
*/
int net_close_socket(socket_t socket);
/*
* Reports the last error to stderr.
*/
void net_report_error();
#endif/*_NETWORKING_H_*/

View File

@@ -0,0 +1,162 @@
#include <stdio.h>
#include <stdlib.h>
#include "queue.h"
void queue_initialize(queue_t* q)
{
q->head = NULL;
q->tail = NULL;
pthread_mutex_init(&(q->mutex), NULL);
pthread_cond_init(&(q->has_stuff), NULL);
}
void queue_free(queue_t* q)
{
sllnode_t* cur = NULL;
pthread_mutex_lock(&(q->mutex));
cur = q->head;
q->head = NULL;
q->tail = NULL;
while (cur)
{
sllnode_t* next = cur->next;
cur->data = NULL;
cur->next = NULL;
free(cur);
cur = next;
}
pthread_mutex_unlock(&(q->mutex));
}
int queue_enqueue(queue_t* q, void* data)
{
/* Make a linked list node */
sllnode_t* node = (sllnode_t*) calloc(1, sizeof(sllnode_t));
if (!node)
{
fprintf(stderr,
"[QUE] Could not allocate memory for linked list node.\n");
return 1;
}
node->next = NULL;
node->data = data;
/* Add node to the end of the queue: */
pthread_mutex_lock(&q->mutex);
if (q->tail != NULL)
{
q->tail->next = node;
}
q->tail = node;
if (q->head == NULL)
{
q->head = node;
}
pthread_mutex_unlock(&(q->mutex));
pthread_cond_signal(&(q->has_stuff));
return 0;
}
void* queue_dequeue(queue_t* q)
{
sllnode_t* node;
void* result;
pthread_mutex_lock(&q->mutex);
while (q->head == NULL)
{
pthread_cond_wait(&(q->has_stuff), &(q->mutex));
}
node = q->head;
q->head = q->head->next;
if (q->head == NULL)
{
q->tail = NULL;
}
pthread_mutex_unlock(&(q->mutex));
node->next = NULL;
result = node->data;
free(node);
return result;
}
void* queue_dequeue_nb(queue_t* q)
{
sllnode_t* node = NULL;
void* result = NULL;
pthread_mutex_lock(&q->mutex);
if (q->head != NULL)
{
node = q->head;
q->head = q->head->next;
if (q->head == NULL)
{
q->tail = NULL;
}
}
pthread_mutex_unlock(&(q->mutex));
if (node != NULL)
{
node->next = NULL;
result = node->data;
free(node);
}
return result;
}
int queue_has_data(queue_t* q)
{
int result = 0;
pthread_mutex_lock(&q->mutex);
result = (q->head != NULL);
pthread_mutex_unlock(&(q->mutex));
return result;
}
void iterator_initialize(queue_iterator_t* iter, queue_t* q, int wrap)
{
iter->q = q;
iter->cur = q->head;
iter->wrap = wrap;
}
void* iterator_next(queue_iterator_t* iter)
{
void* result = NULL;
if (!iter->cur) return NULL;
pthread_mutex_lock(&(iter->q->mutex));
result = iter->cur->data;
iter->cur = iter->cur->next;
if (!iter->cur && iter->wrap) iter->cur = iter->q->head;
pthread_mutex_unlock(&(iter->q->mutex));
return result;
}

View File

@@ -0,0 +1,69 @@
/* queue.h
*
* Here we define a generic MT-safe queue data structure.
*/
#ifndef _QUEUE_H_
#define _QUEUE_H_
#include "threading.h"
typedef struct tagSinglyLinkedList
{
struct tagSinglyLinkedList* next;
void* data;
} sllnode_t;
typedef struct
{
sllnode_t* head;
sllnode_t* tail;
pthread_mutex_t mutex;
pthread_cond_t has_stuff;
} queue_t;
typedef struct
{
queue_t* q;
sllnode_t* cur;
int wrap;
} queue_iterator_t;
/* Initializes the queue q. */
void queue_initialize(queue_t* q);
/* Frees the queue, and its associated structures, but not the data if
there is any in it. */
void queue_free(queue_t* q);
/* Adds a new thing to the end of the queue q. */
int queue_enqueue(queue_t* q, void* data);
/* Removes an item from the queue q, and returns a pointer to it. If the queue
does not contain any items, will wait till data is inserted. */
void* queue_dequeue(queue_t* q);
/* Removes an item from the queue q, and returns a pointer to it. If the queue
does not contain any items, returns null. */
void* queue_dequeue_nb(queue_t* q);
/* Returns true if queue has data, and false if it is empty. */
int queue_has_data(queue_t* q);
/* Initializes the iterator iter over the queue q. If next function is
called on the iterator after this, the head data will be
returned. The wrap parameter will determine whether the iterator will wrap
around to the bedinning of the queue when the end is reached. */
void iterator_initialize(queue_iterator_t* iter, queue_t* q, int wrap);
/* Returns whatever the iterator points to currently (would be the
head of the queue right after the initialize call), and moves the
iterator to the next position. Note that if the end of the queue is
reached, this function will whip around and start from the
beginning again. Note also that bad things may happen if the queue
is modified between calls to this function. */
void* iterator_next(queue_iterator_t* iter);
#endif/*_QUEUE_H_*/

View File

@@ -0,0 +1,8 @@
#ifndef _THREADING_H_
#define _THREADING_H_
#include <pthread.h>
#include <signal.h>
#endif/*_THREADING_H_*/

View File

@@ -0,0 +1,85 @@
#ifndef _TIMER_H_
#define _TIMER_H_
/* In windows, we'll use QueryPerformanceCounter, and in everything
else, we will use gettimeofday (windows does not seem to support
that function. */
#ifdef WIN32
#define _WINSOCKAPI_ /* Have to do this, else windows.h and winsock2.h */
#include <windows.h> /* (from the networking module) start fighting,
as windows.h will include the old
winsock.h. */
#else
#include <sys/time.h>
#endif
/* The units of time we will be storing in our time span for the
beginning and end of the measurement period. */
#ifdef WIN32
typedef LARGE_INTEGER timestamp_t;
#else
typedef struct timeval timestamp_t;
#endif
/* The timespan structure, holding the beginning and ending times for
our measurements. */
typedef struct
{
timestamp_t start;
timestamp_t stop;
} time_span_t;
/* The function to start the timer. It is inlined for better performance. */
#ifdef WIN32
static inline void timer_start(time_span_t* s)
{
QueryPerformanceCounter(&(s->start));
}
#else
static inline void timer_start(time_span_t* s)
{
gettimeofday(&(s->start), NULL);
}
#endif
/* The function to stop the timer. */
#ifdef WIN32
static inline void timer_stop(time_span_t* s)
{
QueryPerformanceCounter(&(s->stop));
}
#else
static inline void timer_stop(time_span_t* s)
{
gettimeofday(&(s->stop), NULL);
}
#endif
/* The function to convert the time stamp to milliseconds. */
#ifdef WIN32
static inline double timer_millis(timestamp_t* value)
{
timestamp_t frequency;
double v, f;
QueryPerformanceFrequency(&frequency);
v = (double) (*value).LowPart;
f = (double) frequency.LowPart;
return 1000 * v / f;
}
#else
static inline double timer_millis(timestamp_t* v)
{
return (v->tv_sec * 1000.0) + (v->tv_usec / 1000.0);
}
#endif
/* The function to calculate the time span in milliseconds. */
static inline double timer_span(time_span_t* s)
{
return timer_millis(&(s->stop)) - timer_millis(&(s->start));
}
#endif/*_TIMER_H_*/

View File

@@ -0,0 +1,203 @@
#include <stdlib.h>
#include "util.h"
#define BUFFER_SIZE 256
char* strcatd(char* dest, const char* src)
{
return strncatd(dest, src, strlen(src));
}
char* strncatd(char* dest, const char* src, size_t len)
{
size_t dest_length = 0;
size_t total_length = 0;
char* result = NULL;
if (dest) { dest_length = strlen(dest); }
total_length = dest_length + len;
result = (char*) realloc(dest, (total_length + 1) * sizeof(char));
if (!result)
{
fprintf(stderr, "[UTIL] Could not allocate memory "
"for dynamic string concatenation.\n");
}
result[dest_length] = '\0';
strncat(result, src, len);
return result;
}
/* TODO: Refactor with the HTTP Header Reading Code */
char* read_line(FILE* stream)
{
char* result = NULL;
char buffer[BUFFER_SIZE];
buffer[0] = '\0';
while (!feof(stream))
{
fgets(buffer, BUFFER_SIZE, stream);
result = strcatd(result, buffer);
if (buffer[strlen(buffer) - 1] == '\n')
{
break;
}
}
return result;
}
int parse_url(const char* url, char** host, port_t* port, char** path)
{
char* durl = strdup(url);
if (strstr(durl, "http://") != durl)
{
/* The URL does not start with http, it is malformed. */
*host = NULL;
*path = NULL;
free(durl);
return 1;
}
else
{
/* Separate the protocol from the rest: */
char* url_start = durl + strlen("http://");
/* Separate the port from the rest: */
char* port_start = strchr(url_start, ':');
/* Separate the host from the path: */
char* path_start = strchr(url_start, '/');
if (port_start)
{
port_start[0] = '\0';
port_start ++;
}
else
{
port_start = "0";
}
if (path_start)
{
path_start[0] = '\0';
path_start ++;
}
else
{
path_start = "";
}
*host = strdup(url_start);
*port = (port_t) atoi(port_start);
*path = strcatd(NULL, "/");
*path = strcatd(*path, path_start);
return 0;
}
}
/* Tries to parse the parameter param. If succeeded, returns zero and
* puts the name of the parameter into opname, and the value of the
* parameter into opvalue. Note that the strings put into output
* parameters are dynamically allocated and need to be freed. */
int m_parse_parameter(const char* param, char** opname, char** opvalue)
{
char* parameter = strdup(param);
if (strstr(parameter, "help") || strstr(parameter, "?"))
{
*opname = strdup("help");
*opvalue = strdup(" ");
free(parameter);
return 0;
}
*opname = strtok(parameter, "=");
*opvalue = strtok(NULL, "=");
if (!*opname || !*opvalue)
{
*opname = NULL;
*opvalue = NULL;
}
else
{
*opname = strdup(*opname);
*opvalue = strdup(*opvalue);
}
free(parameter);
return (*opname == NULL);
}
int parse_command_parameters(int argc, const char** argv,
register_parameter_func f)
{
int i;
for (i = 0; i < argc; i++)
{
char* pname = NULL;
char* pvalue = NULL;
int result = 0;
/* Parse the curren parameter: */
if(m_parse_parameter(argv[i], &pname, &pvalue)) continue;
/* Record the parameter value: */
result = f(pname, pvalue);
free(pname);
free(pvalue);
if (result) return result;
}
return 0;
}
int parse_file_parameters(FILE* stream, register_parameter_func f)
{
char* current_line = NULL;
for (current_line = read_line(stream); current_line;
free(current_line), current_line = read_line(stream))
{
if (current_line[0] != '#')
{
char* pname = NULL;
char* pvalue = NULL;
int result = 0;
/* Parse the curren parameter: */
if(m_parse_parameter(current_line, &pname, &pvalue)) continue;
/* Record the parameter value: */
result = f(pname, pvalue);
free(pname);
free(pvalue);
if (result) break;
}
}
if (current_line)
{
free(current_line);
return 1;
}
else
{
return 0;
}
}

View File

@@ -0,0 +1,57 @@
#ifndef _UTIL_H_
#define _UTIL_H_
#include <stdio.h>
#include <string.h>
#include "networking.h"
/* Windows and Linux have their own wierdness related to strdup. */
#ifdef WIN32
#define strdup _strdup
#else
char* strdup(const char* src);
#endif
/* A function with this signature can be used to register a
* parameter-name/value pair. It should return 0 if the parameter is
* valid and an error code if the parameter is invalid. */
typedef int (*register_parameter_func)(const char* pname, const char* pvalue);
/* Dynamic strcat. Given a dynamically allocated string dest, and a
* string src, will append src to the end of dest, while reallocating
* the string as necessary. If dest is NULL, will allocate a new
* string. If src is NULL, will crash. */
char* strcatd(char* dest, const char* src);
/* Dynamic strncat. Basically, the same as strcatd, but copies only
* len characters from src. */
char* strncatd(char* dest, const char* src, size_t len);
/* Reads until a newline or EOF is encountered in the stream and returns the
result in a newly allocated string. */
char* read_line(FILE* stream);
/* Given a url, parses it into the host name, the port, and the path. If the url
* does not have a host name and a path, or does not begin with "http://"
* protocol, then the url is malformed, host and path are set to NULL, and an
* error code is returned. Otherwise, the host and path are filled with newly
* allocated strings which will need to be freed, and zero is returned. Also, if
* the port is not present in the url, it will be filled in with 0. */
int parse_url(const char* url, char** host, port_t* port, char** path);
/* Parses the command-line parameters and registers them with function
* f. If an illegal parameter is encountered (according to the
* function f), then immediately stops parsing parameters and returns
* and error code. Otherwise, keeps parsing until runs out of the
* parameters, and then returns 0. */
int parse_command_parameters(int argc, const char** argv,
register_parameter_func f);
/* Parses the parameters from the file. If an illegal parameter is
* encountered (according to the function f), then immediately stops
* parsing parameters and returns an error code. Otherwise, keeps
* parsing until runs out of the parameters, and then returns 0. */
int parse_file_parameters(FILE* stream, register_parameter_func f);
#endif/*_UTIL_H_*/

View File

@@ -0,0 +1 @@
obj

View File

@@ -0,0 +1,10 @@
/.cvsignore/1.1/Tue Jan 24 02:28:52 2006//
/Makefile/1.8/Sat Feb 18 02:10:09 2006//
/boss.c/1.11/Mon Feb 20 23:05:47 2006//
/boss.h/1.4/Thu Feb 16 01:13:54 2006//
/client.c/1.27/Mon Feb 20 23:05:47 2006//
/client.h/1.4/Thu Feb 16 01:13:54 2006//
/config.c/1.11/Mon Feb 20 16:00:58 2006//
/config.h/1.7/Sat Feb 18 23:49:55 2006//
/main.c/1.15/Sat Feb 18 23:49:55 2006//
D

View File

@@ -0,0 +1 @@
cs4210/proj1/src/server

View File

@@ -0,0 +1 @@
/usr/_CVS

View File

@@ -0,0 +1,106 @@
##############################################################################
#
# Generic Makefile. Only need to modify the variables for src, obj,
# and bin directories, and the name of the executable.
#
# $Author: vurazov $
# $Date: 2006/02/18 02:10:09 $
# $Revision: 1.8 $
#
##############################################################################
########################### Directories and Target ###########################
# Source directory:
SRC_DIR = .
# Object directory:
OBJ_DIR = ./obj
# Executable directory:
BIN_DIR = ../../bin
# The static libraries to link with the code:
STATIC_LIBS = ../../bin/libcommon.a
# Name of the executable:
BIN_NAME = server
######################## Compiler and Linker Options #########################
# Compiler:
CC = gcc
# Linker:
LD = gcc
# Preprocessor flags:
DFLAGS =
# Compiler flags:
CFLAGS = -std=c99 -Wall -pedantic -O2 -I..
# Linker flags:
LDFLAGS = -lpthread #-lsocket
############################ Other Programs Used #############################
# Dependency generator:
MDEPEND = $(CC) -M -I..
# Make Dir command:
MKDIR = /bin/mkdir -p
# Clean-up command:
RM = /bin/rm -f
######################### Automatic Object Variables #########################
# The list of source files:
SRCS = $(wildcard $(SRC_DIR)/*.c)
# Generated object files:
OBJS = $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS))
OBDS = $(patsubst $(SRC_DIR)/%.c,%.o,$(SRCS))
# Look for .o files in obj dir:
vpath %.o $(OBJ_DIR)
# Program file:
PROG = $(BIN_DIR)/$(BIN_NAME)
################################### Rules ####################################
# Top-level rule: compile everything
all: $(PROG)
# The program link rule:
$(PROG): $(OBDS) $(BIN_DIR)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(STATIC_LIBS)
# Meta rule for compiling ".c" files
%.o: $(SRC_DIR)/%.c $(OBJ_DIR)
$(CC) $(CFLAGS) $(DFLAGS) -c -o $(OBJ_DIR)/$@ $<
# Rules for obj and bin dirs:
$(OBJ_DIR):
$(MKDIR) $(OBJ_DIR)
$(BIN_DIR):
$(MKDIR) $(BIN_DIR)
# Rule for cleaning up before a recompile:
.PHONY: clean
clean:
$(RM) $(PROG) $(OBJS) .depend
# Rule for creating dependency lists and writing them into a dependency file:
.depend: $(SRCS)
$(MDEPEND) $(SRCS) > .depend
#Include dependency list:
include .depend

View File

@@ -0,0 +1,118 @@
#include <stdio.h>
#include <stdlib.h>
#include "common/debug.h"
#include "common/queue.h"
#include "common/threading.h"
#include "boss.h"
#include "client.h"
/* The id of the listening socket. */
static socket_t m_listening_socket = -1;
/* Child count */
static int child_count = 0;
/* List of child threads. */
static pthread_t* m_children = NULL;
/* The queue of client sockets. */
static queue_t m_client_sockets;
int boss_initialize(port_t pnum, int thread_count)
{
int index = 0;
int result = 0;
#ifdef WIN32
/* Have to also initialize WinSock */
WSADATA uselessData;
result = WSAStartup(MAKEWORD(2, 2), &uselessData);
if (result)
{
fprintf(stderr, "[BOSS] Could not initialize WinSock.\n");
net_report_error();
return result;
}
#endif
child_count = thread_count;
/* Make a listening socket: */
m_listening_socket = net_listen_on_port(pnum);
if (IS_BAD_SOCKET(m_listening_socket))
{
return 1;
}
/* Initialize the queue */
queue_initialize(&m_client_sockets);
/* Spawn children threads. */
m_children = (pthread_t*) calloc(thread_count, sizeof(pthread_t));
if (!m_children)
{
fprintf(stderr, "[BOSS] Could not allocate memory.\n");
net_report_error();
return 1;
}
for (index = 0; index < thread_count; index++)
{
result = pthread_create(m_children + index, NULL,
client_run, &m_client_sockets);
if (result)
{
fprintf(stderr, "[BOSS] Could not create child thread.\n");
net_report_error();
return result;
}
}
return 0;
}
void* boss_run(void* param)
{
/* Loop infinitely accepting connections: */
while (1)
{
/* Accept connection */
socket_t client_socket = -1;
sockaddress_t caddr;
socklen_t sizeof_caddr = sizeof(sockaddress_t);
DEBUG_PRINTF(("[BOSS] Waiting for a client connection...\n"));
client_socket = accept(m_listening_socket,
(struct sockaddr*) &caddr, &sizeof_caddr);
if (IS_BAD_SOCKET(client_socket))
{
fprintf(stderr,
"[BOSS] Could not accept client on listening socket\n");
net_report_error();
continue;
}
DEBUG_PRINTF(("[BOSS] Got client on port %d.\n", ntohs(caddr.sin_port)));
/* Enqueue socket to be picked up by a client thread. */
queue_enqueue(&m_client_sockets, (void*) client_socket);
}
return NULL;
}
int boss_clean()
{
/* Kill children */
int index;
for (index = 0; index < child_count; index++)
{
pthread_kill(m_children[index], SIGINT);
}
DEBUG_PRINTF(("[BOSS] Shutting down...\n\n"));
return net_close_socket(m_listening_socket);
}

View File

@@ -0,0 +1,31 @@
#ifndef _BOSS_H_
#define _BOSS_H_
#include "common/networking.h"
/*
* Initializes the boss thread. pnum is the port number on which we
* would like to start listening to connections. Returns zero upon
* success and various numbers on failures. The thread_count parameter
* is the number of child threads to spawn for handling requests.
*/
int boss_initialize(port_t pnum, int thread_count);
/*
* This function loops infinitely and accepts connections, spawning
* worker threads any time somebody wants to connect. Again, the
* function will loop *infinitely*. The thread it runs in needs to be
* killed explicitly. This is because the accept connection function
* is blocking, so there is no way to kill the thread any way, without
* using extreme methods.
*/
void* boss_run(void* param);
/*
* Performs necessary clean-up of the boss thread code after the
* buss_run function has been killed. Namely, closes the listening
* socket, and such.
*/
int boss_clean();
#endif/*_BOSS_H_*/

View File

@@ -0,0 +1,173 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "common/debug.h"
#include "common/http.h"
#include "common/networking.h"
#include "common/queue.h"
#include "common/util.h"
#include "client.h"
#include "config.h"
/* Returns true if the file exists, and false if it does not. */
static int m_file_exists(const char* name)
{
struct stat buf;
int result = !stat(name, &buf);
return result;
}
/* Converts the requested URI to a local file path for the file to
* serve. If the URI is malformed, returns NULL, else returns the
* local file path in a newly allocated string, which needs to be
* freed eventually. */
static char* m_uri_to_local(const char* uri)
{
char* result = NULL;
/* We don't like people who try to go up the directory hierarchy: */
if (strstr(uri, "/.."))
{
return NULL;
}
/* We also don't like people who try to get funky with form parameters: */
if (strstr(uri, "?"))
{
return NULL;
}
/* We also don't like people who provide illegal paths containing
double slashes: */
if (strstr(uri, "//"))
{
return NULL;
}
/* We also don't like people who try funny business with backslashes: */
if (strstr(uri, "\\"))
{
return NULL;
}
/* If we are still here, I suppose we got a well-behaved request. */
result = strcatd(result, config_get_home_dir());
result = strcatd(result, uri);
return result;
}
/* Processes the request. First, parses the header to check what type
* it is, and if it's a GET request, sends out the correct file to the
* client. If any sort of error occurs, will send the correct response
* to the client. */
static void m_process_request(const char* header, socket_t socket)
{
char* req_file = NULL;
char* local_file = NULL;
FILE* input = NULL;
/* Get the request method: */
const char* method = http_get_method(header);
if (strcmp(method, HTTP_METHOD_GET))
{
/* Unsupported method: */
fprintf(stderr, "[CLI] Unsupported method...\n"
" Expected (%p) \"%s\"\n"
" Got (%p) \"%s\"\n",
HTTP_METHOD_GET, HTTP_METHOD_GET, method, method);
http_send_canned_response(socket, HTTP_STATUS_NOTIMPLEMENTED);
return;
}
/* Get the requested file: */
req_file = http_get_requesturi(header);
if (!req_file)
{
/* Could not parse the name out of the header: */
http_send_canned_response(socket, HTTP_STATUS_BADREQUEST);
return;
}
/* Update the file name so it is relative to the document root in
the local system: */
local_file = m_uri_to_local(req_file);
if (!local_file)
{
http_send_canned_response(socket, HTTP_STATUS_BADREQUEST);
free(req_file);
return;
}
/* Check whether the file exists: */
if (!m_file_exists(local_file))
{
http_send_canned_response(socket, HTTP_STATUS_NOTFOUND);
free(req_file);
free(local_file);
return;
}
/* Try to open the file: */
input = fopen(local_file, "r");
if (!input)
{
http_send_canned_response(socket, HTTP_STATUS_FORBIDDEN);
free(req_file);
free(local_file);
return;
}
/* Send the file: */
http_send_header(socket, HTTP_STATUS_OK);
http_send_text_file(socket, input);
/* Clean up: */
free(req_file);
free(local_file);
fclose(input);
}
static void m_handle_client(socket_t csocket)
{
/* Read the header: */
char* header = http_read_header(csocket);
if (!header)
{
DEBUG_PRINTF(("[CLI] Did not get a header...\n"));
return;
}
/* Process the request: */
m_process_request(header, csocket);
/* Free the header string: */
free(header);
/* Clean up the socket: */
DEBUG_PRINTF(("[CLI%d] Shutting down client socket.\n", csocket));
net_close_socket(csocket);
}
void* client_run(void* p)
{
queue_t* q = (queue_t*) p;
while (1)
{
/* This here needs to be done, else we will sometimes crash on
server exit, when the lock in dequeue is killed before the
client thread itself, and hence handle_client was called with
an illegal socket. */
socket_t client = -1;
client = (socket_t) queue_dequeue(q);
if (IS_BAD_SOCKET(client)) break;
else m_handle_client(client);
}
return NULL;
}

View File

@@ -0,0 +1,15 @@
#ifndef _CLIENT_H_
#define _CLIENT_H_
#include "common/threading.h"
/*
* This function will be started in a new thread at the beginning of
* the program and will be passed a queue of client sockets that will
* be populated by the boss thread. This function will spin
* indefinitely consuming the sockets from the queue.
*
*/
void* client_run(void* p);
#endif/*_CLIENT_H_*/

View File

@@ -0,0 +1,96 @@
#include <stdlib.h>
#include "common/util.h"
#include "config.h"
/* Some default values */
#define CONFIG_DVALUE_PORT 1337
#define CONFIG_DVALUE_POOLSIZE 16
#define CONFIG_DVALUE_HOMEDIR "."
/* Some parameter names */
#define CONFIG_PNAME_PORT "port"
#define CONFIG_PNAME_POOLSIZE "pool-size"
#define CONFIG_PNAME_HOMEDIR "home"
/* The port number to run the server on. */
static port_t m_server_port = -1;
/* The number of child threads to create. */
static int m_pool_size = -1;
/* The root directory for the server's files. */
static char* m_home_dir = NULL;
/* Records the parameter. If the name is unknown, prints a warning out
* to the console and usage, and returns an error code. */
int record_parameter(const char* name, const char* value)
{
if (!strcmp(name, CONFIG_PNAME_PORT))
{
/* Got port number: */
m_server_port = atoi(value);
printf("[CONF] Overriding default %s with value %d\n",
CONFIG_PNAME_PORT, m_server_port);
return 0;
}
else if(!strcmp(name, CONFIG_PNAME_POOLSIZE))
{
/* Got pool size: */
m_pool_size = atoi(value);
printf("[CONF] Overriding default %s with value %d\n",
CONFIG_PNAME_POOLSIZE, m_pool_size);
return 0;
}
else if(!strcmp(name, CONFIG_PNAME_HOMEDIR))
{
/* Got home dir: */
free(m_home_dir);
m_home_dir = strdup(value);
printf("[CONF] Overriding default %s with value \"%s\"\n",
CONFIG_PNAME_HOMEDIR, m_home_dir);
return 0;
}
else
{
/* Unknown parameter: */
fprintf(stderr, "[CONF] Unknown parameter \"%s\"\n", name);
config_print_parameters(stderr);
return 1;
}
}
void config_print_parameters(FILE* out)
{
fprintf(out, "Supported parameters:\n");
fprintf(out, "\t%s - the port to listen on. Default value is %d.\n",
CONFIG_PNAME_PORT, CONFIG_DVALUE_PORT);
fprintf(out, "\t%s - the number of threads to pre-create to handle\n"
"\t\tclient requests.\n"
"\t\tDefault value is %d.\n",
CONFIG_PNAME_POOLSIZE, CONFIG_DVALUE_POOLSIZE);
fprintf(out, "\t%s - the root directory for the server's files."
"\n\t\tDefault value is \"%s\".\n",
CONFIG_PNAME_HOMEDIR, CONFIG_DVALUE_HOMEDIR);
fprintf(out, "\t\n");
}
int config_init(int argc, const char** argv)
{
/* Initialize default values: */
m_server_port = CONFIG_DVALUE_PORT;
m_pool_size = CONFIG_DVALUE_POOLSIZE;
m_home_dir = strdup(CONFIG_DVALUE_HOMEDIR);
return parse_command_parameters(argc, argv, record_parameter);
}
void config_free()
{
free(m_home_dir);
}
port_t config_get_port() { return m_server_port; }
int config_get_pool_size() { return m_pool_size; }
const char* config_get_home_dir() { return m_home_dir; }

View File

@@ -0,0 +1,31 @@
#ifndef _SERVER_CONFIG_H_
#define _SERVER_CONFIG_H_
#include <stdio.h>
#include "common/networking.h"
/* Records the parameter with the given name and value. */
int record_parameter(const char* name, const char* value);
/* Initializes the configuration with the parameters specified. */
int config_init(int argc, const char** argv);
/* Cleans up whatever resources the configuration consumed. */
void config_free();
/* Given a stream, will print the list of supported parameters to the
* stream. */
void config_print_parameters(FILE* out);
/* Returns the port to start the server on. */
port_t config_get_port();
/* Returns the number of child threads to spawn for handling client
* requests. */
int config_get_pool_size();
/* Returns the root directory for the server's files. */
const char* config_get_home_dir();
#endif/*_SERVER_CONFIG_H_*/

View File

@@ -0,0 +1,69 @@
#include <stdio.h>
#include <stdlib.h>
#include "common/threading.h"
#include "common/util.h"
#include "boss.h"
#include "config.h"
int main(int argc, const char** argv) {
pthread_t thread_id;
int result;
/* 0. Read configuration parameters: */
if (config_init(argc, argv))
{
return EXIT_FAILURE;
}
/* 1. Initialize the boss: */
result = boss_initialize(config_get_port(), config_get_pool_size());
if (result)
{
config_free();
return EXIT_FAILURE;
}
/* 2. Run the boss thread: */
result = pthread_create(&thread_id, NULL, boss_run, NULL);
if (result)
{
fprintf(stderr, "[MAIN] Could not create boss thread. "
"Error %d.\n\n", result);
boss_clean();
config_free();
return result;
}
printf("[MAIN] The server is now running.\n"
" Hit ENTER key to kill the server.\n");
/* 3. Wait for the user to hit a key in the console to kill the thread: */
result = getchar();
/* 4. If the user hit a key, means we should stop listening. Kill
* the boss thread: */
result = pthread_kill(thread_id, SIGINT);
if (result)
{
fprintf(stderr, "[MAIN] Could not kill boss thread. "
"Error %d.\n\n", result);
}
/* 5. Clean up after ourselves: */
result = boss_clean();
/* 6. Done! */
config_free();
if (result)
{
printf("[MAIN] Program terminated with errors.\n\n");
return EXIT_FAILURE;
}
else
{
printf("[MAIN] Program terminated cleanly.\n\n");
return EXIT_SUCCESS;
}
}

View File

@@ -0,0 +1 @@
http://127.0.0.1:8080/file.html

View File

@@ -0,0 +1 @@
http://legolas:8080/tiny.html

View File

@@ -0,0 +1 @@
http://legolas:8080/small.html

View File

@@ -0,0 +1 @@
http://legolas:8080/medium.html

View File

@@ -0,0 +1 @@
http://legolas:8080/big.html

View File

@@ -0,0 +1,4 @@
http://legolas:8080/tiny.html
http://legolas:8080/small.html
http://legolas:8080/medium.html
http://legolas:8080/big.html

1001
CS4210/cs4210/proj1/urlfile6 Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More