diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 15:43:39 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 15:43:39 +0000 |
commit | 828df65f19a3b24518677d0b738b2bf6c3289a46 (patch) | |
tree | fca5ad5df9d62a71c432298e3182d63fc6b2bfb7 | |
parent | 3c5ab1ad29b963fb16b48049bc53a2ce5094b6af (diff) | |
download | ATCD-828df65f19a3b24518677d0b738b2bf6c3289a46.tar.gz |
ChangeLogTag: Sun Jun 8 19:53:04 2003 Pradeep Gore <pradeep@oomworks.com>
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Lanes/consumer.conf | 2 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Notify/Lanes/run_test.pl | 1 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl | 44 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl | 48 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl | 46 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Lanes/supplier.conf | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp | 55 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp | 9 |
8 files changed, 186 insertions, 21 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf index 93b10684061..010cd3e95f1 100644 --- a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf +++ b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf @@ -16,7 +16,7 @@ dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_T static Command_Builder "Application -Init" ##----------- Create an RT POA to host local consumer objects----------- -static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -ThreadPoolLanes 4 -Lane 49 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -ThreadPoolLanes 3 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" ##--------- Consumer Admin 1 ------------- static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl index ca598749030..7d47e3d10ad 100755 --- a/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl @@ -29,6 +29,7 @@ $Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_io $Supplier = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); $Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; +#$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -ORBDebugLevel 1"; $Consumer = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl new file mode 100755 index 00000000000..dce441fd4dc --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test_consumer.pl @@ -0,0 +1,44 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "../../../../../bin"; +use PerlACE::Run_Test; + +$experiment_timeout = 60; +$startup_timeout = 60; +$notify_conf = PerlACE::LocalFile ("notify.conf"); +$notify_ior = PerlACE::LocalFile ("notify.ior"); +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$supplier_ior = PerlACE::LocalFile ("supplier.ior"); +$supplier_conf = PerlACE::LocalFile ("supplier.conf"); +$consumer_conf = PerlACE::LocalFile ("consumer.conf"); +$status = 0; + +$Consumer = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; + +if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $Supplier->Kill (); + exit 1; +} + +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Consumer returned $status\n"; + exit 1; + } + + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl new file mode 100755 index 00000000000..bd0015d3dbd --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test_notify.pl @@ -0,0 +1,48 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "../../../../../bin"; +use PerlACE::Run_Test; + +$experiment_timeout = 60; +$startup_timeout = 60; +$notify_conf = PerlACE::LocalFile ("notify.conf"); +$notify_ior = PerlACE::LocalFile ("notify.ior"); +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service"); + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; +#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$status = $Notification->SpawnWaitKill ($experiment_timeout); + + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl new file mode 100755 index 00000000000..5ac9330cab4 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test_supplier.pl @@ -0,0 +1,46 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "../../../../../bin"; +use PerlACE::Run_Test; + +$experiment_timeout = 60; +$startup_timeout = 60; +$notify_ior = PerlACE::LocalFile ("notify.ior"); +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$supplier_ior = PerlACE::LocalFile ("supplier.ior"); +$supplier_conf = PerlACE::LocalFile ("supplier.conf"); +$consumer_conf = PerlACE::LocalFile ("consumer.conf"); +$status = 0; + +$Supplier = new PerlACE::Process ("../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; +#$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -ORBDebugLevel 1"; + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + exit 1; +} + +unlink $supplier_ior; +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$status = $Supplier->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Supplier returned $status\n"; + $Supplier->Kill (); + exit 1; + } + +$Supplier->Kill (); +unlink $supplier_ior; + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf index 60085f0ed5a..6c8a7f59da6 100644 --- a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf +++ b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf @@ -26,7 +26,7 @@ static Command_Builder "Application -Init" ##------- Create Event Channel --------------- static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" -static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 4 -Lane 49 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 3 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" static Command_Builder "Filter -CreateFactory ff ec1" ### --- Create Supplier Admin 1 ---- diff --git a/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp b/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp index 3bb6430883e..51fbf7ae755 100644 --- a/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp +++ b/TAO/orbsvcs/tests/Notify/lib/TAO_NotifyTests.dsp @@ -105,11 +105,15 @@ SOURCE=.\Command_Factory.cpp # End Source File
# Begin Source File
-SOURCE=.\Command_Factory_T.cpp
+SOURCE=.\ConsumerAdmin_Command.cpp
# End Source File
# Begin Source File
-SOURCE=.\ConsumerAdmin_Command.cpp
+SOURCE=.\Direct_Consumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Direct_Supplier.cpp
# End Source File
# Begin Source File
@@ -137,55 +141,55 @@ SOURCE=.\Name.cpp # End Source File
# Begin Source File
-SOURCE=.\Notify_PushConsumer.cpp
+SOURCE=.\Notify_Test_Client.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_PushSupplier.cpp
+SOURCE=.\Options_Parser.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_SequencePushConsumer.cpp
+SOURCE=.\Peer.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_SequencePushSupplier.cpp
+SOURCE=.\Periodic_Consumer.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_StructuredPushConsumer.cpp
+SOURCE=.\Periodic_Consumer_Command.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_StructuredPushSupplier.cpp
+SOURCE=.\Periodic_Supplier.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_Test_Client.cpp
+SOURCE=.\Periodic_Supplier_Command.cpp
# End Source File
# Begin Source File
-SOURCE=.\Options_Parser.cpp
+SOURCE=.\Priority_Mapping.cpp
# End Source File
# Begin Source File
-SOURCE=.\Periodic_Consumer.cpp
+SOURCE=.\PushConsumer.cpp
# End Source File
# Begin Source File
-SOURCE=.\Periodic_Consumer_Command.cpp
+SOURCE=.\PushSupplier.cpp
# End Source File
# Begin Source File
-SOURCE=.\Periodic_Supplier.cpp
+SOURCE=.\Relay_Consumer.cpp
# End Source File
# Begin Source File
-SOURCE=.\Periodic_Supplier_Command.cpp
+SOURCE=.\SequencePushConsumer.cpp
# End Source File
# Begin Source File
-SOURCE=.\Priority_Mapping.cpp
+SOURCE=.\SequencePushSupplier.cpp
# End Source File
# Begin Source File
@@ -193,6 +197,14 @@ SOURCE=.\StructuredEvent.cpp # End Source File
# Begin Source File
+SOURCE=.\StructuredPushConsumer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StructuredPushSupplier.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\SupplierAdmin_Command.cpp
# End Source File
# Begin Source File
@@ -350,7 +362,18 @@ SOURCE=.\Task_Stats.inl # Begin Source File
SOURCE=.\Command_Factory_T.cpp
-# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Consumer_T.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Peer_T.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Supplier_T.cpp
# End Source File
# End Group
# Begin Group "Documentation"
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp index 2c358345d97..35c5284f909 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp @@ -79,7 +79,9 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg) ACE_OS::fprintf (output_file, "%s\n",out_msg); // Calc the mean. - for (size_t i = 0; i != this->samples_count_; ++i) + size_t i = 0; + + for (i = 0; i != this->samples_count_; ++i) { ACE_UINT32 val_2 = Task_Stats::diff_usec (time_inv_[i], time_exec_[i]); @@ -94,7 +96,8 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg) this->mean_ /= this->samples_count_; // Calculate the var^2 - for (size_t i = 0; i != this->samples_count_; ++i) + + for (i = 0; i != this->samples_count_; ++i) { ACE_UINT64 diff = this->time_exec_[i] - this->mean_; @@ -121,7 +124,7 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg) // dump the samples recorded. ACE_OS::fprintf (output_file, "#Invocation time \t Execution time\n"); - for (size_t i = 0; i != this->samples_count_; ++i) + for (i = 0; i != this->samples_count_; ++i) { ACE_UINT32 val_1 = Task_Stats::diff_usec (base_time_, time_inv_[i]); |