This project is read-only.
Project Description
This project contains a harness to test the latency of WCF (and .NET Remoting) for different bindings, serializers, parameters (and sizes), OneWay/TwoWay, etc. It can be used to test the latency behavior for a large set of scenarios, and can easily be customized to assess the latency of your chosen implementation.

See here for more documentation and results.

0. .NET 3.0 or 3.5
1. Msmq (for netMsmq measurements)
2. Visual Studio 2008 (to compile the solution).

Build process:
0. Make sure you have the WcfLatencyTestHarness solution in D:\WcfLatencyTestHarness. You can use subst to get a D drive if you don't have one.
N.B. You can use a different dir, but I have never tested this, and it will need changing some/all of the config files (and the CopyToBin.Release.bat file).
1. Rebuild WcfLatencyTestHarness.sln in release mode (for optimal measurements).
2. Execute CopyToBin.Release.bat. This will copy all necessary release binaries and configuration files to D:\WcfLatencyTestHarness\Bin. Special attention should go to the WcfServices.*.dll assemblies (i.e. WcfServices.PerCall.OneWay.DefaultSF.dll), because those assemblies contain all the wcf services to be possibly tested.

1. Every exe file has it's own configuration file, and during the execution of the tests, some of those config files are copied over to make sure the wcf services and clients are configured correctly at start-up. During the tests, the wcf service and client processes are started and killed as needed.
2. The most important configuration file is the AppSettings.config. This contains all settings like:
a. Paths to executables (psexec, pskill, logman)
b. Executable names (WcfLatencyTestHarness executable names)
c. Output paths (performance counter output, measurement output)
d. Config paths: binding config files
e. Msmq queue name
f. NumberOfMessagesInSession: Howmany messages should be sent within one session before ending the current one and starting a new one?
g. WaitTimeBetweenMessagesInMSecs: How many milliseconds to wait between each message?
h. TestCleanupTimeMSecs: Howmany milliseconds to wait after each test?
i. OneWayLatencyTestCount: The framework "calibrates" how long a oneway nettcp call takes by having the client call the service (oneway nettcp) and having the service ping back to the client using oneway nettcp, and measuring the time it takes for every roundtrip. The OneWayLatencyTestCount is the number of those roundtrips. This procedure is used to calculate the correction that needs to be performed in OneWay scenarios (because in OneWay scenarios, the service uses oneway nettcp to ping back to the client to indicate receipt of the message).
j. RequestedXxx: These are the wcf settings that you will play around with mostly. All possible values are indicated in the AppSettings.config, you can remove any if you're not interested in it (i.e. the Remote scenarios)"
k. RequestedScopes:
1. Direct: similar to regular .NET method call (no thead/AppDomain/Process/Machine boundaries). This setting is here to be able to compare other measurements with direct .NET method calls.
2. SameAppDomain: Opens the wcf host within the same AppDomain (and thus same process) as the client.
3. SameProcess: Opens the wcf host within the same process, but constructs a seperate AppDomain, in which the wcf host will live.
4. SameMachine: Opens the wcf host in a seperate process.
5. Remote: Opens the wcf host in a seperate process on a different machine (needs correct user rights for psexec!).
l. RequestedInstancingModes: The Wcf instancing modes.
m. RequestedBindings: The Wcf bindings, with addition of Roman Kiss's nullTransport binding.
n. RequestedBindingConfigTags: tag to differentiate between test categories (Default, MessageSecurity, TransportSecurity). I have only tested the Default.
o. RequestedCallModes: The Wcf call modes.
p. RequestedSerializers:
1. DefaultSF: The default Wcf DataContractSerializer
2. PORDCSF: The PreserveObjectReferenceDataContractSerializer
3. NDCSF: The NetDataContractSerializer
4. XMLSF: The Xml Serializer
q. RequestedMethods: Which methods to call?
r. RequestedDataSizes: What should be the size of the data, transferred on each method call?
s. UseUniqueDataInAdvancedContainer: In the object graph (in the AdvancedContainer), can we reuse objects, or should each object have it's own memory?

Instructions for execution of tests:
1. Manipulate AppSettings.config as necessary.
2. open command prompt in D:\WcfLatencyTestHarness\Bin and execute WcfSvcRunner.exe.
3. Watch the tests complete (might take some time!)
4. Check Output dir for measurements and performance counter measurements.

Last edited Sep 15, 2010 at 8:21 AM by BVeldhoen, version 1


No comments yet.