diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-25 17:16:46 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-25 17:16:46 +0000 |
commit | 4cf01ac0cb3a03b681eb39a55badcc0c1b353595 (patch) | |
tree | 0d0910ae3acfe8df75f287d007db6ca0f0b39b12 /TAO/IIOP | |
parent | ff5fb4482df10210c6672f477ea3bb144715da1b (diff) | |
download | ATCD-4cf01ac0cb3a03b681eb39a55badcc0c1b353595.tar.gz |
replaced USE_QUANTIFY with ACE_HAS_QUANTIFY
Diffstat (limited to 'TAO/IIOP')
-rw-r--r-- | TAO/IIOP/tests/Thruput_test/server.cpp | 174 | ||||
-rw-r--r-- | TAO/IIOP/tests/Thruput_test/ttcp_decl.h | 76 |
2 files changed, 125 insertions, 125 deletions
diff --git a/TAO/IIOP/tests/Thruput_test/server.cpp b/TAO/IIOP/tests/Thruput_test/server.cpp index 40a79dfd161..56e670e935e 100644 --- a/TAO/IIOP/tests/Thruput_test/server.cpp +++ b/TAO/IIOP/tests/Thruput_test/server.cpp @@ -8,9 +8,9 @@ ACE_RCSID(Thruput_test, server, "$Id$") void print_exception (const CORBA_Exception *x, - const char *info, - FILE *stream - ); + const char *info, + FILE *stream + ); char Usage[] = "\ Usage: server [options] \n\ @@ -22,15 +22,15 @@ Common options:\n\ -d set SO_DEBUG socket option\n\ -b ## set socket buffer size (if supported)\n\ -f X format for rate: k,K = kilo{bit,byte}; m,M = mega; g,G = giga\n\ --L ## Output file name for the data type used\n\ +-L ## Output file name for the data type used\n\ Options specific to -r:\n\ -B for -s, only output full blocks as specified by -l (for TAR)\n\ -T \"touch\": access each byte as it's read\n\ "; #if !defined (__cplusplus) -typedef void (*SIG_TYP)(); -#endif +typedef void (*SIG_TYP)(); +#endif #ifdef SVR4 void @@ -44,51 +44,51 @@ sigpipe () int fromlen; int domain = PF_INET; /* Default is to use Internet domain sockets. */ -char *domainname; /* Rendezvous address for UNIX domain sockets. */ -int fd; /* fd of network socket */ -int buflen = 8 * 1024; /* length of buffer */ -char *buf; /* ptr to dynamic buffer */ -int nbuf = 2 * 1024; /* number of buffers to send in sinkmode */ - -int bufoffset = 0; /* align buffer to this */ -int bufalign = 16 * 1024; /* modulo this */ - -int udp = 0; /* 0 = tcp, !0 = udp */ -int options = 0; /* socket options */ -int one = 1; /* for 4.3 BSD style setsockopt() */ -short port = 5001; /* TCP port number */ +char *domainname; /* Rendezvous address for UNIX domain sockets. */ +int fd; /* fd of network socket */ +int buflen = 8 * 1024; /* length of buffer */ +char *buf; /* ptr to dynamic buffer */ +int nbuf = 2 * 1024; /* number of buffers to send in sinkmode */ + +int bufoffset = 0; /* align buffer to this */ +int bufalign = 16 * 1024; /* modulo this */ + +int udp = 0; /* 0 = tcp, !0 = udp */ +int options = 0; /* socket options */ +int one = 1; /* for 4.3 BSD style setsockopt() */ +short port = 5001; /* TCP port number */ char *host; /* ptr to name of host */ -int trans; /* 0=receive, !0=transmit mode */ -int sinkmode = 0; /* 0=normal I/O, !0=sink/source mode */ -int verbose = 0; /* 0=print basic info, 1=print cpu rate, proc - * resource usage. */ -int nodelay = 0; /* set TCP_NODELAY socket option */ -int b_flag = 0; /* use mread() */ -int sockbufsize = 0; /* socket buffer size to use */ +int trans; /* 0=receive, !0=transmit mode */ +int sinkmode = 0; /* 0=normal I/O, !0=sink/source mode */ +int verbose = 0; /* 0=print basic info, 1=print cpu rate, proc + * resource usage. */ +int nodelay = 0; /* set TCP_NODELAY socket option */ +int b_flag = 0; /* use mread() */ +int sockbufsize = 0; /* socket buffer size to use */ int new_line=0; /* This is a special flag */ int write_to_file=1; /* indecates writing to file (default)*/ -char fmt = 'K'; /* output format:k=kilobits,K=kilobytes, - * m = megabits, M = megabytes, - * g = gigabits, G = gigabytes */ -int touchdata = 0; /* access data after reading */ +char fmt = 'K'; /* output format:k=kilobits,K=kilobytes, + * m = megabits, M = megabytes, + * g = gigabits, G = gigabytes */ +int touchdata = 0; /* access data after reading */ struct hostent *addr; char *title = 0; char stats[128]; -unsigned long srcDataSize; /* Total amount of source data */ -unsigned long nbytes; /* bytes on net */ -unsigned long numCalls; /* # of I/O system calls */ -double cput, realt; /* user, real time (seconds) */ -unsigned long dt; +unsigned long srcDataSize; /* Total amount of source data */ +unsigned long nbytes; /* bytes on net */ +unsigned long numCalls; /* # of I/O system calls */ +double cput, realt; /* user, real time (seconds) */ +unsigned long dt; /* declare struct variables for various message types */ -ttcp_sequence::ShortSeq *sseq; -ttcp_sequence::LongSeq *lseq; -ttcp_sequence::OctetSeq *oseq; -ttcp_sequence::DoubleSeq *dseq; -ttcp_sequence::CharSeq *cseq; -ttcp_sequence::StructSeq *Sseq; +ttcp_sequence::ShortSeq *sseq; +ttcp_sequence::LongSeq *lseq; +ttcp_sequence::OctetSeq *oseq; +ttcp_sequence::DoubleSeq *dseq; +ttcp_sequence::CharSeq *cseq; +ttcp_sequence::StructSeq *Sseq; unsigned short isDone = 0; ttcp_sequence_i *my_ttcp; @@ -101,7 +101,7 @@ static CORBA_Object_ptr fwd_ref; int main (int argc, char *const *argv) { - + unsigned long addr_tmp; int c; unsigned short done = 0; @@ -118,10 +118,10 @@ main (int argc, char *const *argv) fstream iorfile; CORBA_String str; - + if (argc < 2) goto usage; - + orb_ptr = CORBA_ORB_init (argc, argv, orb_name, env); if (env.exception () != 0) { print_exception (env.exception (), "ORB init", stdout); @@ -139,48 +139,48 @@ main (int argc, char *const *argv) while (!done && ((c = getopt (argc, argv, "ui:d:vb:f:l:L:")) != -1)) { switch (c) - { - case 'u': - use_ior = 1; - orb_name = ""; - break; - case 'L': - title = optarg; - break; - case 'd': - TAO_debug_level = atoi(optarg); - if (TAO_debug_level > 10) - TAO_debug_level = 10; - break; - case 'l': - buflen = atoi (optarg); - break; - case 'i': - idle = atoi (optarg); - break; - case 'v': - verbose = 1; - break; - case 'b': + { + case 'u': + use_ior = 1; + orb_name = ""; + break; + case 'L': + title = optarg; + break; + case 'd': + TAO_debug_level = atoi(optarg); + if (TAO_debug_level > 10) + TAO_debug_level = 10; + break; + case 'l': + buflen = atoi (optarg); + break; + case 'i': + idle = atoi (optarg); + break; + case 'v': + verbose = 1; + break; + case 'b': #if defined(SO_SNDBUF) || defined(SO_RCVBUF) - sockbufsize = atoi (optarg); + sockbufsize = atoi (optarg); #else - fprintf (stderr, - "ttcp: -b option ignored: SO_SNDBUF/SO_RCVBUF socket options not supported\n"); + fprintf (stderr, + "ttcp: -b option ignored: SO_SNDBUF/SO_RCVBUF socket options not supported\n"); #endif - break; - case 'f': - fmt = *optarg; - break; - case 'O': - case '?': - done = 1; - break; - default: - goto usage; - } + break; + case 'f': + fmt = *optarg; + break; + case 'O': + case '?': + done = 1; + break; + default: + goto usage; + } } - + // // Receiver // @@ -195,7 +195,7 @@ main (int argc, char *const *argv) } iorfile << ((char *)str) << endl; -#if defined (USE_QUANTIFY) +#if defined (ACE_HAS_QUANTIFY) quantify_clear_data(); quantify_start_recording_data(); #endif @@ -208,10 +208,10 @@ main (int argc, char *const *argv) int result = params->reactor()->handle_events (); if (result == -1) - { - terminationStatus = -1; - break; - } + { + terminationStatus = -1; + break; + } } #endif return 0; diff --git a/TAO/IIOP/tests/Thruput_test/ttcp_decl.h b/TAO/IIOP/tests/Thruput_test/ttcp_decl.h index 769e4bd2915..f5e80420037 100644 --- a/TAO/IIOP/tests/Thruput_test/ttcp_decl.h +++ b/TAO/IIOP/tests/Thruput_test/ttcp_decl.h @@ -32,7 +32,7 @@ #include <netinet/tcp.h> #include <arpa/inet.h> #include <netdb.h> -#include <sys/time.h> /* struct itimerval */ +#include <sys/time.h> /* struct itimerval */ #include <limits.h> #include <sys/un.h> #include <unistd.h> @@ -40,8 +40,8 @@ #include <sys/resource.h> /* File to be included if Quantify is to be used */ -#if defined (USE_QUANTIFY) -#include <quantify.h> +#if defined (ACE_HAS_QUANTIFY) +# include <quantify.h> #endif @@ -70,7 +70,7 @@ struct rusage #define SEND_DOUBLE ((unsigned long)(5)) #define SEND_STRUCT ((unsigned long)(6)) #define SEND_COMPOSITE ((unsigned long)(7)) - + /************** // Prototypes ***************/ @@ -97,35 +97,35 @@ void ProcessArguments(int argc, char **argv, unsigned short isTrans); /* Global variables defined here as extern */ extern int fromlen; -extern int domain; /* Default is to use Internet domain sockets. */ -extern char *domainname; /* Rendezvous address for UNIX domain sockets. */ -extern int fd; /* fd of network socket */ +extern int domain; /* Default is to use Internet domain sockets. */ +extern char *domainname; /* Rendezvous address for UNIX domain sockets. */ +extern int fd; /* fd of network socket */ -extern int buflen; /* length of buffer */ -extern char *buf; /* ptr to dynamic buffer */ -extern int nbuf; /* number of buffers to send in sinkmode */ +extern int buflen; /* length of buffer */ +extern char *buf; /* ptr to dynamic buffer */ +extern int nbuf; /* number of buffers to send in sinkmode */ -extern int bufoffset; /* align buffer to this */ -extern int bufalign; /* modulo this */ +extern int bufoffset; /* align buffer to this */ +extern int bufalign; /* modulo this */ -extern int udp; /* 0 = tcp, !0 = udp */ -extern int options; /* socket options */ -extern int one; /* for 4.3 BSD style setsockopt() */ -extern short port; /* TCP port number */ +extern int udp; /* 0 = tcp, !0 = udp */ +extern int options; /* socket options */ +extern int one; /* for 4.3 BSD style setsockopt() */ +extern short port; /* TCP port number */ extern char *host; /* ptr to name of host */ -extern int trans; /* 0=receive, !0=transmit mode */ -extern int sinkmode; /* 0=normal I/O, !0=sink/source mode */ -extern int verbose; /* 0=print basic info, 1=print cpu rate, proc - * resource usage. */ -extern int nodelay; /* set TCP_NODELAY socket option */ -extern int b_flag; /* use mread() */ -extern int sockbufsize; /* socket buffer size to use */ +extern int trans; /* 0=receive, !0=transmit mode */ +extern int sinkmode; /* 0=normal I/O, !0=sink/source mode */ +extern int verbose; /* 0=print basic info, 1=print cpu rate, proc + * resource usage. */ +extern int nodelay; /* set TCP_NODELAY socket option */ +extern int b_flag; /* use mread() */ +extern int sockbufsize; /* socket buffer size to use */ extern int new_line; /* This is a special flag */ extern int write_to_file; /* indecates writing to file (default)*/ -extern char fmt; /* output format:k=kilobits,K=kilobytes, - * m = megabits, M = megabytes, - * g = gigabits, G = gigabytes */ -extern int touchdata; /* access data after reading */ +extern char fmt; /* output format:k=kilobits,K=kilobytes, + * m = megabits, M = megabytes, + * g = gigabits, G = gigabytes */ +extern int touchdata; /* access data after reading */ extern struct hostent *addr; extern int errno; @@ -134,20 +134,20 @@ extern char *optarg; extern char *title; extern char stats[128]; -extern unsigned long srcDataSize; /* Total amount of source data */ -extern unsigned long nbytes; /* bytes on net */ -extern unsigned long numCalls; /* # of I/O system calls */ -extern double cput, realt; /* user, real time (seconds) */ -extern unsigned long dt; +extern unsigned long srcDataSize; /* Total amount of source data */ +extern unsigned long nbytes; /* bytes on net */ +extern unsigned long numCalls; /* # of I/O system calls */ +extern double cput, realt; /* user, real time (seconds) */ +extern unsigned long dt; extern unsigned short isDone; /* declare struct variables for various message types */ -extern ttcp_sequence::ShortSeq *sseq; -extern ttcp_sequence::LongSeq *lseq; -extern ttcp_sequence::OctetSeq *oseq; -extern ttcp_sequence::DoubleSeq *dseq; -extern ttcp_sequence::CharSeq *cseq; -extern ttcp_sequence::StructSeq *Sseq; +extern ttcp_sequence::ShortSeq *sseq; +extern ttcp_sequence::LongSeq *lseq; +extern ttcp_sequence::OctetSeq *oseq; +extern ttcp_sequence::DoubleSeq *dseq; +extern ttcp_sequence::CharSeq *cseq; +extern ttcp_sequence::StructSeq *Sseq; #endif |