Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A raw network sender, to try sending and receiving without (necessari…
…ly) streams in the middle
- Loading branch information
Michael Bridgen
committed
Sep 9, 2009
1 parent
34f0e98
commit 9240a4b
Showing
4 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from net.grinder.script.Grinder import grinder | ||
from sender_grinder_util import SenderTestRunner | ||
from sender import NetworkSender | ||
|
||
HOST = grinder.properties.getProperty("streams.test.host") | ||
PORT = int(grinder.properties.getProperty("streams.test.port")) | ||
|
||
class TestRunner(SenderTestRunner): | ||
def __init__(self): | ||
netSender = NetworkSender((HOST, PORT)) | ||
SenderTestRunner.__init__(self, netSender) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
grinder.script = ../../src/raw_network_receiver.py | ||
|
||
# The number of worker processes each agent should start. This must be 1 unless | ||
# you have an affinity for "socket in use" errors | ||
grinder.processes = 1 | ||
|
||
# The number of worker threads each worker process should start. This has only | ||
# been tested with a value of 1 but theoretically this will clear the received | ||
# message queue using multiple threads. | ||
grinder.threads = 1 | ||
|
||
# The number of runs each worker process will perform. 0 means run for ever. | ||
# This can be synchronized with the sender test to automatically exit when a | ||
# known number of messages have been received | ||
grinder.runs = 100000 | ||
|
||
# Disable use of the console. The receiver must be running before the | ||
# Orchestrator is started, and the sending tests obviously rely on that | ||
# therefore this dependency must be managed externally | ||
grinder.useConsole=false | ||
|
||
# The port to listen to. Defaults to 55555 | ||
streams.test.port=12345 | ||
|
||
# The host of the shared message store. This must be the same as used by the | ||
# sender. The default is 127.0.0.1 | ||
streams.test.msg_store.host=127.0.0.1 | ||
|
||
# The port of the shared message store. This must be the same as used by the | ||
# sender. The default is 11211 | ||
streams.test.msg_store.port=11211 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# The file name of the script to run. | ||
# | ||
# Relative paths are evaluated from the directory containing the | ||
# properties file. The default is "grinder.py". | ||
grinder.script = ../../src/raw_network_sender.py | ||
|
||
# The number of worker processes each agent should start. The default | ||
# is 1. | ||
grinder.processes = 1 | ||
|
||
# The number of worker threads each worker process should start. The | ||
# default is 1. | ||
grinder.threads = 1 | ||
|
||
# The number of runs each worker process will perform. When using the | ||
# console this is usually set to 0, meaning "run until the console | ||
# sneds a stop or reset signal". The default is 1. | ||
grinder.runs = 100000 | ||
|
||
# The IP address or host name that the agent and worker processes use | ||
# to contact the console. The default is all the network interfaces | ||
# of the local machine. | ||
; grinder.consoleHost = consolehost | ||
|
||
# The IP port that the agent and worker processes use to contact the | ||
# console. Defaults to 6372. | ||
; grinder.consolePort | ||
|
||
# The host of the shared message store. This must be the same as used by the | ||
# sender. The default is 127.0.0.1 | ||
streams.test.msg_store.host=127.0.0.1 | ||
|
||
# The port of the shared message store. This must be the same as used by the | ||
# sender. The default is 11211 | ||
streams.test.msg_store.port=11211 | ||
|
||
# The host and port to send requests to. Mandatory parameter. | ||
streams.test.host=127.0.0.1 | ||
streams.test.port=12345 | ||
|
||
# The target number of messages per second to send per thread. | ||
# 0 is no target rate, i.e., go as fast as possible | ||
streams.test.msg_rate=100 | ||
|
||
# The file containing the message set to send. Each line in the file is treated | ||
# as a message. There is no default value. | ||
streams.test.message_set_file=test/performance/src/test-messages.txt | ||
|
||
# The regular expression to use to extract messages from the source file. The | ||
# default is <label network=".*">(.*)</label> | ||
#streams.test.extract_msg_re= | ||
|
||
# The regular expression to use to insert an ID into a message. The default is | ||
# $, i.e., at the end of the message | ||
#streams.test.insert_id_re= |