diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-25 05:28:00 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-25 05:28:00 +0000 |
commit | 02c0fe322fdc0a1fa3e8be9fd103505594ddeb2e (patch) | |
tree | 522d3c1352f7c74721f105a32114ec2c26e1d110 /TAO/performance-tests/Thruput | |
parent | 7fb50607bbd98e1b17b1e115ee8224268a377678 (diff) | |
download | ATCD-02c0fe322fdc0a1fa3e8be9fd103505594ddeb2e.tar.gz |
ChangeLogTag:Mon Oct 25 00:24:16 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/performance-tests/Thruput')
-rw-r--r-- | TAO/performance-tests/Thruput/TAO/client.cpp | 108 | ||||
-rw-r--r-- | TAO/performance-tests/Thruput/TAO/server.cpp | 8 | ||||
-rw-r--r-- | TAO/performance-tests/Thruput/TAO/ttcp_decl.h | 2 | ||||
-rw-r--r-- | TAO/performance-tests/Thruput/TAO/utils.cpp | 96 |
4 files changed, 107 insertions, 107 deletions
diff --git a/TAO/performance-tests/Thruput/TAO/client.cpp b/TAO/performance-tests/Thruput/TAO/client.cpp index a2e599fd155..5098c471fd7 100644 --- a/TAO/performance-tests/Thruput/TAO/client.cpp +++ b/TAO/performance-tests/Thruput/TAO/client.cpp @@ -53,7 +53,7 @@ CORBA::Long verbose = 0; // 0=print basic info, 1=print cpu CORBA::Char fmt = 'K'; // output // format:k=kilobits,K=kilobytes, m = megabits, // M = megabytes, g = gigabits, G = gigabytes -CORBA::String title = 0; // title of file to gather statistics +char* title = 0; // title of file to gather statistics char stats[128]; // gathering the statistics unsigned long srcDataSize; // Total amount of source data unsigned long nbytes; // bytes on net @@ -86,59 +86,59 @@ main (int argc, char *argv[]) while ((c = get_opt ()) != -1) { switch (c) - { - case 'i': - ior = ACE_OS::strdup (get_opt.optarg); - break; - case 'L': - title = ACE_OS::strdup (get_opt.optarg); - break; - case 'd': - TAO_debug_level = ACE_OS::atoi (get_opt.optarg); - if (TAO_debug_level > 10) - TAO_debug_level = 10; - break; - case 'l': - buflen = ACE_OS::atoi (get_opt.optarg); - break; - case 'v': - verbose = 1; - break; - case 'm': - fmt = *get_opt.optarg; - break; - case 'S': /* total source data to send. */ - srcDataSize = ACE_OS::atoi (get_opt.optarg); - break; - case 'q': /* Send sequence of desired data type */ - switch(*get_opt.optarg){ - case 's': - dt = SEND_SHORT; - break; - case 'l': - dt = SEND_LONG; - break; - case 'd': - dt = SEND_DOUBLE; - break; - case 'c': - dt = SEND_CHAR; - break; - case 'o': - dt = SEND_OCTET; - break; - case 'S': - dt = SEND_STRUCT; - break; - case 'C': - dt = SEND_COMPOSITE; - break; - } - break; + { + case 'i': + ior = ACE_OS::strdup (get_opt.optarg); + break; + case 'L': + title = ACE_OS::strdup (get_opt.optarg); + break; + case 'd': + TAO_debug_level = ACE_OS::atoi (get_opt.optarg); + if (TAO_debug_level > 10) + TAO_debug_level = 10; + break; + case 'l': + buflen = ACE_OS::atoi (get_opt.optarg); + break; + case 'v': + verbose = 1; + break; + case 'm': + fmt = *get_opt.optarg; + break; + case 'S': /* total source data to send. */ + srcDataSize = ACE_OS::atoi (get_opt.optarg); + break; + case 'q': /* Send sequence of desired data type */ + switch(*get_opt.optarg){ + case 's': + dt = SEND_SHORT; + break; + case 'l': + dt = SEND_LONG; + break; + case 'd': + dt = SEND_DOUBLE; + break; + case 'c': + dt = SEND_CHAR; + break; + case 'o': + dt = SEND_OCTET; + break; + case 'S': + dt = SEND_STRUCT; + break; + case 'C': + dt = SEND_COMPOSITE; + break; + } + break; case 'f': ior = read_ior (get_opt.optarg); break; - default: + default: return print_usage (); } } @@ -149,7 +149,7 @@ main (int argc, char *argv[]) // // Transmitter // - + // get a handle to the ORB orb_ptr = CORBA::ORB_init (argc, argv, "internet", ACE_TRY_ENV); ACE_TRY_CHECK; @@ -163,7 +163,7 @@ main (int argc, char *argv[]) if (!CORBA::is_nil (objref)) { // if it is a valid obj ref, narrow it to a ttcp_sequence - // CORBA object + // CORBA object ttcp_seq = ttcp_sequence::_narrow (objref, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -179,7 +179,7 @@ main (int argc, char *argv[]) // Prepare the Message to be sent // - + // first allocate a buffer of the desired size and alignment errno = 0; if ((buf = (char *) ACE_OS::malloc (buflen)) == (char *) NULL) diff --git a/TAO/performance-tests/Thruput/TAO/server.cpp b/TAO/performance-tests/Thruput/TAO/server.cpp index 62f593b0683..7c7fa6ba0c5 100644 --- a/TAO/performance-tests/Thruput/TAO/server.cpp +++ b/TAO/performance-tests/Thruput/TAO/server.cpp @@ -72,7 +72,7 @@ main (int argc, char **argv) CORBA::Object_var obj_var; const char *oa_name = "RootPOA"; // name of our OA const char *orb_name = "internet"; // name of our ORB - CORBA::String str; // for stringified representation of the object reference + char* str; // for stringified representation of the object reference FILE *ior_file = 0; // initialize the underlying ORB and get a handle to it @@ -146,7 +146,7 @@ main (int argc, char **argv) break; } } - + // // Receiver // @@ -177,7 +177,7 @@ main (int argc, char **argv) { ACE_DEBUG ((LM_DEBUG, "stringified obj reference = %s\n", str)); } - + if (ior_file != 0) { // write ior to a file @@ -190,7 +190,7 @@ main (int argc, char **argv) quantify_clear_data(); quantify_start_recording_data(); #endif /* ACE_HAS_QUANTIFY */ - + // Handle requests for this object until we're killed, or one of the // methods asks us to exit. if (orb_var->run () == -1) diff --git a/TAO/performance-tests/Thruput/TAO/ttcp_decl.h b/TAO/performance-tests/Thruput/TAO/ttcp_decl.h index 8271e8111c7..d0eeba8cc79 100644 --- a/TAO/performance-tests/Thruput/TAO/ttcp_decl.h +++ b/TAO/performance-tests/Thruput/TAO/ttcp_decl.h @@ -32,7 +32,7 @@ ***************/ int err (const char *s); void mes (const char *s); -CORBA::String outfmt (CORBA::Double b); +char* outfmt (CORBA::Double b); void prep_timer (void); CORBA::Double read_timer (CORBA::Char *str, CORBA::Long len); void prusage (CORBA::Char *outp); diff --git a/TAO/performance-tests/Thruput/TAO/utils.cpp b/TAO/performance-tests/Thruput/TAO/utils.cpp index b88157fcd22..28f71d9c856 100644 --- a/TAO/performance-tests/Thruput/TAO/utils.cpp +++ b/TAO/performance-tests/Thruput/TAO/utils.cpp @@ -41,7 +41,7 @@ void mes (const char* s) // does the formatting for the desired units in which the result is to be // displayed -CORBA::String +char* outfmt (CORBA::Double b) { static CORBA::Char obuf[50]; @@ -175,34 +175,34 @@ FillPattern (register CORBA::Char *cp, register CORBA::Long bufLen, CORBA::ULong SeqPtr [i].msgs.length (numUpdates); for (int j = 0; j < numUpdates; ++j) - { - SeqPtr [i].msgs[j].oumh (RtiObjectUpdateMessageHeader ()); - RtiObjectUpdateMessageHeader & oumh = SeqPtr [i].msgs[j].oumh (); - oumh.updateLength = 2001; // redundant - oumh.updateTag = 2002; - oumh.objectHandle = 2003; - oumh.timestamp = 3.14159; - oumh.eventRetractionHandle = 2004; - oumh.classHandle = 2005; - oumh.sendingFederateHandle = 2006; - oumh.userTag = CORBA::string_dup ("beefcake!"); - oumh.regionData.length(0); - oumh.transportationHandle = 1; - oumh.orderingHandle = 1; - oumh.messagePayload.length (numAttrs); - - for (int k = 0; k < numAttrs; ++k) - { - oumh.messagePayload[k] = HandleValuePair (); - HandleValuePair &hvp = oumh.messagePayload[k]; - hvp.handle = k * k; - char *d1 = "somedata"; - hvp.data.length (ACE_OS::strlen (d1)+1); - ACE_OS::strcpy ((char *) hvp.data.get_buffer (), d1); - } - num -= sizeof (SeqPtr [i]); - printf ("SIZE OF RTIPACKET IS %d", sizeof (SeqPtr [i])); - } + { + SeqPtr [i].msgs[j].oumh (RtiObjectUpdateMessageHeader ()); + RtiObjectUpdateMessageHeader & oumh = SeqPtr [i].msgs[j].oumh (); + oumh.updateLength = 2001; // redundant + oumh.updateTag = 2002; + oumh.objectHandle = 2003; + oumh.timestamp = 3.14159; + oumh.eventRetractionHandle = 2004; + oumh.classHandle = 2005; + oumh.sendingFederateHandle = 2006; + oumh.userTag = CORBA::string_dup ("beefcake!"); + oumh.regionData.length(0); + oumh.transportationHandle = 1; + oumh.orderingHandle = 1; + oumh.messagePayload.length (numAttrs); + + for (int k = 0; k < numAttrs; ++k) + { + oumh.messagePayload[k] = HandleValuePair (); + HandleValuePair &hvp = oumh.messagePayload[k]; + hvp.handle = k * k; + char *d1 = "somedata"; + hvp.data.length (ACE_OS::strlen (d1)+1); + ACE_OS::strcpy ((char *) hvp.data.get_buffer (), d1); + } + num -= sizeof (SeqPtr [i]); + printf ("SIZE OF RTIPACKET IS %d", sizeof (SeqPtr [i])); + } fill in the RtiPacket } @@ -396,7 +396,7 @@ prusage (char *outp) break; case 'S': - ACE_OS::sprintf (outp, "%f ", et.system_time); + ACE_OS::sprintf (outp, "%f ", et.system_time); END (outp); break; @@ -406,11 +406,11 @@ prusage (char *outp) break; case 'P': - ACE_OS::sprintf (outp, "%d%%", (int) (t * 100 / ((ms ? ms : 1)))); - END (outp); + ACE_OS::sprintf (outp, "%d%%", (int) (t * 100 / ((ms ? ms : 1)))); + END (outp); break; - /*possible thing to add in is the equivalent for case X, D, K, M, F, and R for prusage_t*/ + /*possible thing to add in is the equivalent for case X, D, K, M, F, and R for prusage_t*/ #if !defined(SYSV) # if defined (ACE_HAS_PRUSAGE_T) case 'W': @@ -420,7 +420,7 @@ prusage (char *outp) break; case 'X': - // ACE_OS::sprintf (outp, "%d", t == 0 ? 0 : (rusage.ru_ixrss) / t); + // ACE_OS::sprintf (outp, "%d", t == 0 ? 0 : (rusage.ru_ixrss) / t); //END (outp); break; @@ -432,23 +432,23 @@ prusage (char *outp) case 'K': //ACE_OS::sprintf (outp, "%d", t == 0 ? 0 : - // (rusage.ru_ixrss + rusage.ru_isrss + rusage.ru_idrss) / t); + // (rusage.ru_ixrss + rusage.ru_isrss + rusage.ru_idrss) / t); //END (outp); break; case 'M': - /* ACE_OS::sprintf (outp, "%d", rusage.ru_maxrss / 2); + /* ACE_OS::sprintf (outp, "%d", rusage.ru_maxrss / 2); END (outp);*/ break; case 'F': - /* + /* ACE_OS::sprintf (outp, "%d", rusage.ru_majflt); - END (outp);*/ + END (outp);*/ break; case 'R': - /*ACE_OS::sprintf (outp, "%d", rusage.ru_minflt); + /*ACE_OS::sprintf (outp, "%d", rusage.ru_minflt); END (outp);*/ break; @@ -462,18 +462,18 @@ prusage (char *outp) END (outp); break; case 'C': - ACE_OS::sprintf (outp, "%d+%d", rusage.pr_vctx, rusage.pr_ictx); + ACE_OS::sprintf (outp, "%d+%d", rusage.pr_vctx, rusage.pr_ictx); END (outp); break; # elif defined (ACE_HAS_GETRUSAGE) - case 'W': + case 'W': i = rusage.ru_nswap;; ACE_OS::sprintf (outp, "%d", i); END (outp); break; case 'X': - ACE_OS::sprintf (outp, "%d", t == 0 ? 0 : (int) ((rusage.ru_ixrss) / t)); + ACE_OS::sprintf (outp, "%d", t == 0 ? 0 : (int) ((rusage.ru_ixrss) / t)); END (outp); break; @@ -485,22 +485,22 @@ prusage (char *outp) case 'K': ACE_OS::sprintf (outp, "%d", t == 0 ? 0 : - (int) ((rusage.ru_ixrss + rusage.ru_isrss + rusage.ru_idrss) / t)); + (int) ((rusage.ru_ixrss + rusage.ru_isrss + rusage.ru_idrss) / t)); END (outp); break; case 'M': - ACE_OS::sprintf (outp, "%ld", rusage.ru_maxrss / 2); + ACE_OS::sprintf (outp, "%ld", rusage.ru_maxrss / 2); END (outp); break; case 'F': ACE_OS::sprintf (outp, "%ld", rusage.ru_majflt); - END (outp); + END (outp); break; case 'R': - ACE_OS::sprintf (outp, "%ld", rusage.ru_minflt); + ACE_OS::sprintf (outp, "%ld", rusage.ru_minflt); END (outp); break; @@ -514,8 +514,8 @@ prusage (char *outp) END (outp); break; - case 'C': - ACE_OS::sprintf (outp, "%ld+%ld", + case 'C': + ACE_OS::sprintf (outp, "%ld+%ld", rusage.ru_nvcsw, rusage.ru_nivcsw); END (outp); break; |