diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-25 03:45:35 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-25 03:45:35 +0000 |
commit | af5d4fb409a00c736933e3de5927275c63f6eddb (patch) | |
tree | 8c1b72ad5d9152bea64abf7f0c1d395384fd1152 | |
parent | 99f9889d1a0dab0ccf681f58ac7860a38afe8425 (diff) | |
download | ATCD-af5d4fb409a00c736933e3de5927275c63f6eddb.tar.gz |
ChangeLogTag:Tue Aug 24 22:40:39 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-99c | 20 | ||||
-rw-r--r-- | TAO/performance-tests/Latency/Makefile | 4 | ||||
-rw-r--r-- | TAO/performance-tests/Latency/client.cpp | 15 | ||||
-rw-r--r-- | TAO/performance-tests/Latency/java_server.java | 5 | ||||
-rwxr-xr-x | TAO/performance-tests/Latency/run_test.pl | 2 | ||||
-rwxr-xr-x | TAO/performance-tests/Latency/scalability.pl | 89 | ||||
-rw-r--r-- | TAO/performance-tests/Latency/st_client.cpp | 15 |
7 files changed, 138 insertions, 12 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index e97755f534d..6097bf46b96 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,23 @@ +Tue Aug 24 22:40:39 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * performance-tests/Latency/Makefile: + Fixed the rules to compile the java version + + * performance-tests/Latency/scalability.pl: + Added a new driver program to run a scalability test + + * performance-tests/Latency/client.cpp: + * performance-tests/Latency/st_client.cpp: + Added options to disable the shutdown message when the client + dies. + + * performance-tests/Latency/java_server.java: + Visibroker3.4 does not have the ORB.run() method (added in CORBA + 2.3) + + * performance-tests/Latency/run_test.pl: + Minor cosmetic fixes. + Tue Aug 24 21:08:45 1999 Jeff Parsons <parsons@cs.wustl.edu> * TAO_IDL/be/be_visitor_enum/enum_ch.cpp: diff --git a/TAO/performance-tests/Latency/Makefile b/TAO/performance-tests/Latency/Makefile index da05a2cf6d0..66cbfdefcb6 100644 --- a/TAO/performance-tests/Latency/Makefile +++ b/TAO/performance-tests/Latency/Makefile @@ -83,10 +83,12 @@ endif # AMI Test.java: test.idl idl2java test.idl +java_version: java_client.class java_server.class + java_client.class: Test.java vbjc java_client.java -java_server.class: +java_server.class: Test.java vbjc java_server.java realclean: clean diff --git a/TAO/performance-tests/Latency/client.cpp b/TAO/performance-tests/Latency/client.cpp index 8acd6e47ce2..382dbd563cc 100644 --- a/TAO/performance-tests/Latency/client.cpp +++ b/TAO/performance-tests/Latency/client.cpp @@ -13,11 +13,12 @@ const char *ior = "file://test.ior"; int nthreads = 5; int niterations = 5; int period = -1; +int do_shutdown = 1; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "k:n:i:p:"); + ACE_Get_Opt get_opts (argc, argv, "k:n:i:p:x"); int c; while ((c = get_opts ()) != -1) @@ -35,6 +36,9 @@ parse_args (int argc, char *argv[]) case 'p': period = ACE_OS::atoi (get_opts.optarg); break; + case 'x': + do_shutdown = 0; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, @@ -42,6 +46,8 @@ parse_args (int argc, char *argv[]) "-k <ior> " "-n <nthreads> " "-i <niterations> " + "-p <period> " + "-x (disable shutdown) " "\n", argv [0]), -1); @@ -165,8 +171,11 @@ main (int argc, char *argv[]) } throughput.dump_results ("Aggregated", gsf); - server->shutdown (ACE_TRY_ENV); - ACE_TRY_CHECK; + if (do_shutdown) + { + server->shutdown (ACE_TRY_ENV); + ACE_TRY_CHECK; + } } ACE_CATCHANY { diff --git a/TAO/performance-tests/Latency/java_server.java b/TAO/performance-tests/Latency/java_server.java index 6bc02c99744..4c2c63ee749 100644 --- a/TAO/performance-tests/Latency/java_server.java +++ b/TAO/performance-tests/Latency/java_server.java @@ -29,15 +29,12 @@ public class java_server { + orb.object_to_string(test) + ">"); - orb.run (); - - /* + try { Thread.currentThread().join(); } catch(InterruptedException e) { System.out.println(e); } - */ } } diff --git a/TAO/performance-tests/Latency/run_test.pl b/TAO/performance-tests/Latency/run_test.pl index 7be2430c464..4cdf8c6c076 100755 --- a/TAO/performance-tests/Latency/run_test.pl +++ b/TAO/performance-tests/Latency/run_test.pl @@ -9,7 +9,7 @@ unshift @INC, '../../../bin'; require ACEutils; $client_conf="client.conf"; -$server_conf="client.conf"; +$server_conf="server.conf"; $threads='4'; $iorfile = "test.ior"; diff --git a/TAO/performance-tests/Latency/scalability.pl b/TAO/performance-tests/Latency/scalability.pl new file mode 100755 index 00000000000..3fb0c1c5033 --- /dev/null +++ b/TAO/performance-tests/Latency/scalability.pl @@ -0,0 +1,89 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +unshift @INC, '../../../bin'; +require ACEutils; + +$client_conf="client.conf"; +$server_conf="server.conf"; +$iterations = 10000; + +$iorfile = "test.ior"; + +print STDERR "================ Java server test\n"; + +unlink $iorfile; + +$SV = Process::Create ("vbj", + "java_server", + " -D -OAid TPool" + ." -D -OAthreadMax 0" + ." -D -OAthreadMin 16"); + +if (ACE::waitforfile_timed ($iorfile, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +for ($i = 1; $i != 65; ++$i) { + $CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", + " -ORBSvcConf client.conf " + . " -k file://$iorfile " + . " -n $i -i $iterations -p 10 -x"); + + # Each iteration should take 100 seconds + $client = $CL->TimedWait (120); + if ($client == -1) { + print STDERR "ERROR: client <$i> timedout\n"; + $CL->Kill (); $CL->TimedWait (1); + } +} + +$server = $SV->Terminate (); $SV->TimedWait (10); +if ($server == -1) { + print STDERR "ERROR: server timedout\n"; + $SV->Kill (); $SV->TimedWait (1); +} + +print STDERR "================ C++ server test\n"; + +unlink $iorfile; + +$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", + " -ORBSvcConf $server_conf" + . " -o $iorfile -n 16"); + +if (ACE::waitforfile_timed ($iorfile, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +for ($i = 1; $i != 65; ++$i) { + $CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", + " -ORBSvcConf client.conf " + . " -k file://$iorfile " + . " -n $i -i $iterations -p 10 -x"); + + # Each iteration should take 100 seconds + $client = $CL->TimedWait (120); + if ($client == -1) { + print STDERR "ERROR: client <$i> timedout\n"; + $CL->Kill (); $CL->TimedWait (1); + } +} + +$server = $SV->Terminate (); $SV->TimedWait (10); +if ($server == -1) { + print STDERR "ERROR: server timedout\n"; + $SV->Kill (); $SV->TimedWait (1); +} + +unlink $iorfile; + +exit 0; diff --git a/TAO/performance-tests/Latency/st_client.cpp b/TAO/performance-tests/Latency/st_client.cpp index e73f2dd8da9..19eadf9361c 100644 --- a/TAO/performance-tests/Latency/st_client.cpp +++ b/TAO/performance-tests/Latency/st_client.cpp @@ -11,11 +11,12 @@ ACE_RCSID(Latency, st_client, "$Id$") const char *ior = "file://test.ior"; int niterations = 100; int period = -1; +int do_shutdown = 1; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "k:n:i:p:"); + ACE_Get_Opt get_opts (argc, argv, "k:i:p:"); int c; while ((c = get_opts ()) != -1) @@ -30,12 +31,17 @@ parse_args (int argc, char *argv[]) case 'p': period = ACE_OS::atoi (get_opts.optarg); break; + case 'x': + do_shutdown = 0; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " "-k <ior> " "-i <niterations> " + "-p <period> " + "-x (disable shutdown) " "\n", argv [0]), -1); @@ -140,8 +146,11 @@ main (int argc, char *argv[]) ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); client.dump_stats ("Single thread", gsf); - server->shutdown (ACE_TRY_ENV); - ACE_TRY_CHECK; + if (do_shutdown) + { + server->shutdown (ACE_TRY_ENV); + ACE_TRY_CHECK; + } } ACE_CATCHANY { |