diff options
-rw-r--r-- | perf/src/TAO/Roundtrip_Handler.h | 7 | ||||
-rw-r--r-- | perf/src/TAO/client.cpp | 25 | ||||
-rw-r--r-- | perf/src/TAO/server.cpp | 1 |
3 files changed, 28 insertions, 5 deletions
diff --git a/perf/src/TAO/Roundtrip_Handler.h b/perf/src/TAO/Roundtrip_Handler.h index 7e20dbec3aa..081ab2144ce 100644 --- a/perf/src/TAO/Roundtrip_Handler.h +++ b/perf/src/TAO/Roundtrip_Handler.h @@ -9,9 +9,9 @@ #ifndef ROUNDTRIP_HANDLER_H #define ROUNDTRIP_HANDLER_H -
-#include <IceUtil/Mutex.h>
-#include <IceUtil/Monitor.h>
+ +#include <IceUtil/Mutex.h> +#include <IceUtil/Monitor.h> #include <TestS.h> @@ -69,7 +69,6 @@ public: private: bool _finished; - }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/perf/src/TAO/client.cpp b/perf/src/TAO/client.cpp index 9ab07f5a073..a401c9ceff5 100644 --- a/perf/src/TAO/client.cpp +++ b/perf/src/TAO/client.cpp @@ -79,6 +79,7 @@ main(int argc, char *argv[]) bool sendstrings = false; bool sendlongstrings = false; bool sendstructs = false; + long payLoadSize = 0; int i; for(i = 0; i < argc; ++i) @@ -119,6 +120,15 @@ main(int argc, char *argv[]) { sendstructs = true; } + else if(strncmp(argv[i], "--payload=", strlen("--payload=")) == 0) + { + payLoadSize = strtol(argv[i] + strlen("--payload="), 0, 10); + if(errno == ERANGE) + { + cerr << argv[0] << ": payload argument range error: " << argv[i] << endl; + return EXIT_FAILURE; + } + } } if(!latency && !throughput) @@ -194,6 +204,16 @@ main(int argc, char *argv[]) repetitions = 100000; } + Test::ByteSeq seq; + if(payLoadSize > 0) + { + seq.length(payLoadSize); + for(int i = 0; i < payLoadSize; ++i) + { + seq[i] = '0' + (char)(i % 10); + } + } + for(int i = 0; i != repetitions; ++i) { if(oneway) @@ -207,6 +227,11 @@ main(int argc, char *argv[]) ACE_TRY_CHECK; roundtrip_handler_impl->waitFinished(); } + else if(payLoadSize > 0) + { + roundtrip->sendByteSeq(seq ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } else { roundtrip->test_method(ACE_ENV_SINGLE_ARG_PARAMETER); diff --git a/perf/src/TAO/server.cpp b/perf/src/TAO/server.cpp index 64987e0f044..a082beb4993 100644 --- a/perf/src/TAO/server.cpp +++ b/perf/src/TAO/server.cpp @@ -11,7 +11,6 @@ #include <WorkerThread.h> #include <iostream> - int main(int argc, char *argv[]) { |