Skip to content
third assignment for network systems
C++ C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
build/test
src
test
Makefile
README
pa3.pdf
scratch
test_arch.cc
timings
word_list.h

README

example usage: 
host1> make test_arch ARG="per-protocol echo 48484 56789 elra-04.cs.colorado.edu"

host2> make test_arch ARG="per-protocol active 56789 48484 98.245.122.67 "

creates the main test program and runs the per-protocol architecture.
the 'active' flag causes the test program to connect to another instance
of the test program on host 98.245.122.67 which is running under 'echo'
mode (as opposed to 'active' mode). the active program sends 100 messages from
each protocol and records the time it takes for the echo instance to echo each
message back to the active test program. 

if you want to just run a quick test to see if messages are being sent you can run
test_arch and have it send messages to itself:

./build/test_arch per-message active 48484 48484  
dns: 100, rdp: 124, tel: 108, ftp: 126
Total Time Taken: 508063.000000

if you want to see more debug output you can edit the makefile and uncomment the 
NET03_DEBUG_LOG define and comment the NET03_ON_MSG_CALLBACK define. then run
make clean and rerun the above command.


RESULTS:
all the timing results are in the 'timing' text file.

NOTE: if you want to try running the echo tests from the TIMING TESTS section of
the timing file, you have to increase the size of the thread pool in per_message.cc
to 70 or so.
if you leave the size at 25 threads test_arch locks up when run in echo mode 
because each thread that receives a message dispatches a send thread after 
the message goes all the way up to the application level, this causes the 
pool to get depleted too fast. 
Something went wrong with that request. Please try again.