diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-02-16 19:41:52 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-02-16 19:41:52 +0000 |
commit | bd7da7097e458f7bbf0a28bb50d59f15a8810798 (patch) | |
tree | d6eaae959e91bd985133aafac21f71fc55909461 /perf/src | |
parent | Added dummy client/server for Ice/IceE latency test (diff) | |
download | ice-bd7da7097e458f7bbf0a28bb50d59f15a8810798.tar.bz2 ice-bd7da7097e458f7bbf0a28bb50d59f15a8810798.tar.xz ice-bd7da7097e458f7bbf0a28bb50d59f15a8810798.zip |
Add request id
Diffstat (limited to 'perf/src')
-rwxr-xr-x | perf/src/Ice/dummy/Client.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/perf/src/Ice/dummy/Client.cpp b/perf/src/Ice/dummy/Client.cpp index 1afcfda0f1a..b48c40fd929 100755 --- a/perf/src/Ice/dummy/Client.cpp +++ b/perf/src/Ice/dummy/Client.cpp @@ -39,12 +39,12 @@ typedef int ssize_t; using namespace std; -const char request[41] = { 0x49, 0x63, 0x65, 0x50, 0x01, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, - 0x63, 0x79, 0x00, 0x00, 0x04, 0x70, 0x69, 0x6e, - 0x67, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x00 }; +char request[41] = { 0x49, 0x63, 0x65, 0x50, 0x01, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x00, 0x00, 0x04, 0x70, 0x69, 0x6e, + 0x67, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, + 0x00 }; int main(int argc, char* argv[]) @@ -89,6 +89,12 @@ main(int argc, char* argv[]) int repetitions = 100000; for(int i = 0; i < repetitions; ++i) { + char* id = reinterpret_cast<char*>(&repetitions); + for(unsigned int j = 0; j < sizeof(int); ++j) + { + request[j + 14] = id[j]; + } + if(::send(fd, request, 41, 0) != 41) { cerr << "Send request failed!" << endl; |