예제 #1
0
파일: server.py 프로젝트: jhirniak/sessionj
# tests/src/thesis/benchmark/bmark2/bin/server.py false LOCALHOST 8888 localhost 7777 ORDINARYm 2
# tests/src/thesis/benchmark/bmark2/bin/server.py false CAMELOT 8888 camelot14 7777 ALL 2
##

import socket
import sys
import time

import common 


##
# Command line arguments.
##
if len(sys.argv) != 8:
	common.runtime_error('Usage: server.py <debug> <env> <server_port> <client> <client_port> <version> <repeats>')
debug   = common.parse_boolean(sys.argv[1]) 
env     = sys.argv[2]
sport   = sys.argv[3]
client  = sys.argv[4]      # Use "localhost" if env is localhost
cport   = int(sys.argv[5])
version = sys.argv[6]
repeats = int(sys.argv[7]) # "Outer repeats", i.e. how many times we will recreate the Server per parameter configuration


##
# Main execution command.
## 
if (env == 'LOCALHOST' or env == 'DOC'):
	renv = "bin/sessionj -j '-server' -J " + common.JAVA
elif env == 'CAMELOT':
예제 #2
0
파일: client.py 프로젝트: jhirniak/sessionj
# tests/src/thesis/benchmark/bmark1/bin/client.py false CAMELOT 7777 camelot15 8888 ALL 2 3 FULL
# nohup tests/src/thesis/benchmark/bmark1/bin/client.py false LOCALHOST 7777 localhost 8888 SJm 2 3 BODY < /dev/null 1>foo.txt 2>bar.txt &
##	

import os
import socket
import sys

import common
	

##
# Command line arguments.
##
if len(sys.argv) != 10:
	common.runtime_error('Usage: client.py <debug> <env> <client_port> <serverName> <server_port> <version> <repeats> <iters> <timer>')
debug      = common.parse_boolean(sys.argv[1])
env        = sys.argv[2]
cport      = int(sys.argv[3]) # Client port
serverName = sys.argv[4]
sport      = sys.argv[5]      # Server port
version    = sys.argv[6]
repeats    = int(sys.argv[7])
iters      = sys.argv[8]      # Inner iterations per Server and Client instance 
timer      = sys.argv[9]      # Timer mode: e.g. FULL, BODY, etc.


##
# Main execution command.
## 
if (env == 'LOCALHOST' or env == 'DOC'):