diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-30 19:34:27 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-30 19:34:27 +0000 |
commit | 03154c9a5b9e8628d31bd9032549327d51304645 (patch) | |
tree | f4f85e04edaef6ed998a7953275ad3dcf1911fef /performance-tests/RPC/client.cpp | |
parent | 73efbc1d2ad02533d865e1b14008ffc8d8bc82fb (diff) | |
download | ATCD-pre_multiple_profile_server.tar.gz |
This commit was manufactured by cvs2svn to create tagpre_multiple_profile_server
'pre_multiple_profile_server'.
Diffstat (limited to 'performance-tests/RPC/client.cpp')
-rw-r--r-- | performance-tests/RPC/client.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/performance-tests/RPC/client.cpp b/performance-tests/RPC/client.cpp deleted file mode 100644 index 440b623470e..00000000000 --- a/performance-tests/RPC/client.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Id$ - */ -#include "ace/Stats.h" -#include "ace/High_Res_Timer.h" -#include "ace/Get_Opt.h" - -#include "ping.h" - -int main (int argc, char* argv[]) -{ - const char* host = 0; - int nsamples = 10000; - int c; - - ACE_Get_Opt getopt (argc, argv, "h:i:"); - - while ((c = getopt ()) != -1) - { - switch ((char) c) - { - case 'h': - host = getopt.optarg; - break; - - case 'i': - nsamples = ACE_OS::atoi (getopt.optarg); - break; - } - } - - if (host == 0) - { - ACE_DEBUG ((LM_DEBUG, "Usage: client -h host -i iterations\n")); - return 1; - } - - CLIENT *cl = - clnt_create (host, PINGPROG, PINGVERS, "tcp"); - - if (cl == 0) - { - ACE_DEBUG ((LM_DEBUG, "Cannot create client handle\n")); - return 1; - } - - ACE_Throughput_Stats throughput; - - ACE_hrtime_t test_start = ACE_OS::gethrtime (); - for (int i = 0; i != nsamples; ++i) - { - ACE_hrtime_t start = ACE_OS::gethrtime (); - - int p = 0; - (void) ping_1 (&p, cl); - - ACE_hrtime_t end = ACE_OS::gethrtime (); - - throughput.sample (end - test_start, - end - start); - - } - - ACE_DEBUG ((LM_DEBUG, "Calibrating high resolution timer . . .")); - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, " done\n")); - - throughput.dump_results ("Client", gsf); - - - return 0; -} |