summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-03-07 07:52:10 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-03-07 07:52:10 +0000
commitccddecef986ca4a15098b321c0f9a9739395c0c2 (patch)
tree56d82cfcc4e53d7553504c999f9d8d7f88961b1e /TAO/performance-tests/Cubit
parentd77d3e036e7e80f0dc5004e72e11c2526e02f473 (diff)
downloadATCD-ccddecef986ca4a15098b321c0f9a9739395c0c2.tar.gz
ChangeLogTag:Tue Mar 06 23:43:07 2001 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/performance-tests/Cubit')
-rw-r--r--TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp589
-rw-r--r--TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp19
2 files changed, 321 insertions, 287 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp
index 3abf0e683c1..81a18dd43e6 100644
--- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp
+++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp
@@ -1214,8 +1214,6 @@ Cubit_Client::print_stats (const char *call_name,
int
Cubit_Client::run ()
{
- ACE_DECLARE_NEW_CORBA_ENV;
-
u_int i;
ACE_Profile_Timer timer;
@@ -1224,371 +1222,405 @@ Cubit_Client::run ()
// Show the results one type at a time.
- // VOID
- if (this->check_enabled (TAO_ENABLE_CUBIT_VOID))
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
{
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
-
- for (i = 0; i < this->loop_count_; ++i)
+ // VOID
+ if (this->check_enabled (TAO_ENABLE_CUBIT_VOID))
{
- this->cube_void (i,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_void (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_void",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // SHORT
- if (this->check_enabled (TAO_ENABLE_CUBIT_SHORT))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_void",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // SHORT
+ if (this->check_enabled (TAO_ENABLE_CUBIT_SHORT))
{
- this->cube_short (i,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_short (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_short",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // OCTET
- if (this->check_enabled (TAO_ENABLE_CUBIT_OCTET))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_short",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // OCTET
+ if (this->check_enabled (TAO_ENABLE_CUBIT_OCTET))
{
- this->cube_octet (i,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_octet (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_octet",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // LONG
- if (this->check_enabled (TAO_ENABLE_CUBIT_LONG))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_octet",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // LONG
+ if (this->check_enabled (TAO_ENABLE_CUBIT_LONG))
{
- this->cube_long (i,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
- this->print_stats ("cube_long",
- elapsed_time);
- }
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_long (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- // STRUCT
- if (this->check_enabled (TAO_ENABLE_CUBIT_STRUCT))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
+ this->print_stats ("cube_long",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // STRUCT
+ if (this->check_enabled (TAO_ENABLE_CUBIT_STRUCT))
{
- this->cube_struct (i,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_struct (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_struct",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // UNION
- if (this->check_enabled (TAO_ENABLE_CUBIT_UNION))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_struct",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // UNION
+ if (this->check_enabled (TAO_ENABLE_CUBIT_UNION))
{
- this->cube_union (ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_union (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_union_stub call",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // SMALL LONG SEQUENCES
- if (this->check_enabled (TAO_ENABLE_CUBIT_SMALL_LONG_SEQ))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_union_stub call",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // SMALL LONG SEQUENCES
+ if (this->check_enabled (TAO_ENABLE_CUBIT_SMALL_LONG_SEQ))
{
- this->cube_long_sequence (this->loop_count_,
- 4,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_long_sequence (this->loop_count_,
+ 4,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_small_sequence<long>",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // LARGE LONG SEQUENCES
- if (this->check_enabled (TAO_ENABLE_CUBIT_LARGE_LONG_SEQ))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_small_sequence<long>",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // LARGE LONG SEQUENCES
+ if (this->check_enabled (TAO_ENABLE_CUBIT_LARGE_LONG_SEQ))
{
- this->cube_long_sequence (this->loop_count_,
- 1024,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_long_sequence (this->loop_count_,
+ 1024,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_large_sequence<long>",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // SMALL OCTET SEQUENCES
- if (this->check_enabled (TAO_ENABLE_CUBIT_SMALL_OCTET_SEQ))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_large_sequence<long>",
+ elapsed_time);
+ }
- if (bytes_in_octet_sequence_ > 0)
+ // SMALL OCTET SEQUENCES
+ if (this->check_enabled (TAO_ENABLE_CUBIT_SMALL_OCTET_SEQ))
{
- ACE_DEBUG ((LM_DEBUG,
- "Running sequence<octet> test with %u bytes "
- "in the sequence.\n", bytes_in_octet_sequence_));
- for (i = 0; i < this->loop_count_; ++i)
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
+
+ if (bytes_in_octet_sequence_ > 0)
{
- this->cube_octet_sequence (this->loop_count_,
- bytes_in_octet_sequence_,
- ACE_TRY_ENV);
+ ACE_DEBUG ((LM_DEBUG,
+ "Running sequence<octet> test with %u bytes "
+ "in the sequence.\n", bytes_in_octet_sequence_));
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_octet_sequence (this->loop_count_,
+ bytes_in_octet_sequence_,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
}
+ else
+ {
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_octet_sequence (this->loop_count_,
+ 16,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
+ }
+
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
+
+ this->print_stats ("cube_small_sequence<octet>",
+ elapsed_time);
}
- else
+
+ // LARGE OCTET SEQUENCES
+ if (this->check_enabled (TAO_ENABLE_CUBIT_LARGE_OCTET_SEQ))
{
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
+
for (i = 0; i < this->loop_count_; ++i)
{
this->cube_octet_sequence (this->loop_count_,
- 16,
+ 4096,
ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- }
- timer.stop ();
- timer.elapsed_time (elapsed_time);
-
- this->print_stats ("cube_small_sequence<octet>",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // LARGE OCTET SEQUENCES
- if (this->check_enabled (TAO_ENABLE_CUBIT_LARGE_OCTET_SEQ))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_large_sequence<octet>",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // SMALL MANY SEQUENCES
+ if (this->check_enabled (TAO_ENABLE_CUBIT_SMALL_STRUCT_SEQ))
{
- this->cube_octet_sequence (this->loop_count_,
- 4096,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_many_sequence (this->loop_count_,
+ 4,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_large_sequence<octet>",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // SMALL MANY SEQUENCES
- if (this->check_enabled (TAO_ENABLE_CUBIT_SMALL_STRUCT_SEQ))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_small_sequence<many>",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // LARGE MANY SEQUENCES
+ if (this->check_enabled (TAO_ENABLE_CUBIT_LARGE_STRUCT_SEQ))
{
- this->cube_many_sequence (this->loop_count_,
- 4,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_many_sequence (this->loop_count_,
+ 1024,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- this->print_stats ("cube_small_sequence<many>",
- elapsed_time);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- // LARGE MANY SEQUENCES
- if (this->check_enabled (TAO_ENABLE_CUBIT_LARGE_STRUCT_SEQ))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->print_stats ("cube_large_sequence<many>",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // MIXIN
+ if (this->check_enabled (TAO_ENABLE_CUBIT_MIXIN))
{
- this->cube_many_sequence (this->loop_count_,
- 1024,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_short (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- this->print_stats ("cube_large_sequence<many>",
- elapsed_time);
- }
+ this->cube_octet (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- // MIXIN
- if (this->check_enabled (TAO_ENABLE_CUBIT_MIXIN))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ this->cube_long (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- for (i = 0; i < this->loop_count_; ++i)
- {
- this->cube_short (i,
- ACE_TRY_ENV);
- this->cube_octet (i,
- ACE_TRY_ENV);
- this->cube_long (i,
- ACE_TRY_ENV);
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
+ this->print_stats ("cube mixin (short/octet/long)",
+ elapsed_time);
}
- timer.stop ();
- timer.elapsed_time (elapsed_time);
- this->print_stats ("cube mixin (short/octet/long)",
- elapsed_time);
- }
+ // RTI
+ if (this->check_enabled (TAO_ENABLE_CUBIT_RTI_DATA))
+ {
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- // RTI
- if (this->check_enabled (TAO_ENABLE_CUBIT_RTI_DATA))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_rti_data (this->loop_count_,
+ 2,
+ 5,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- for (i = 0; i < this->loop_count_; ++i)
- {
- this->cube_rti_data (this->loop_count_,
- 2,
- 5,
- ACE_TRY_ENV);
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
+
+ this->print_stats ("cube_rti_data",
+ elapsed_time);
}
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ // ONEWAY
+ if (this->check_enabled (TAO_ENABLE_CUBIT_ONE_WAY))
+ {
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- this->print_stats ("cube_rti_data",
- elapsed_time);
- }
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_oneway (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- // ONEWAY
- if (this->check_enabled (TAO_ENABLE_CUBIT_ONE_WAY))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- for (i = 0; i < this->loop_count_; ++i)
- {
- this->cube_oneway (i,
- ACE_TRY_ENV);
+ this->print_stats ("cube_oneway",
+ elapsed_time);
}
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ // ANY - LONG
+ if (this->check_enabled (TAO_ENABLE_CUBIT_ANY))
+ {
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- this->print_stats ("cube_oneway",
- elapsed_time);
- }
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_any (i,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- // ANY - LONG
- if (this->check_enabled (TAO_ENABLE_CUBIT_ANY))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
+ this->print_stats ("cube_any",
+ elapsed_time);
+ }
- for (i = 0; i < this->loop_count_; ++i)
+ // ANY - STRUCT
+ if (this->check_enabled (TAO_ENABLE_CUBIT_ANY_STRUCT))
{
- this->cube_any (i,
- ACE_TRY_ENV);
- }
+ this->call_count_ = 0;
+ this->error_count_ = 0;
+ timer.start ();
- timer.stop ();
- timer.elapsed_time (elapsed_time);
- this->print_stats ("cube_any",
- elapsed_time);
- }
+ for (i = 0; i < this->loop_count_; ++i)
+ {
+ this->cube_any_struct (i,
+ ACE_TRY_ENV);
- // ANY - STRUCT
- if (this->check_enabled (TAO_ENABLE_CUBIT_ANY_STRUCT))
- {
- this->call_count_ = 0;
- this->error_count_ = 0;
- timer.start ();
+ ACE_TRY_CHECK;
+ }
- for (i = 0; i < this->loop_count_; ++i)
- {
- this->cube_any_struct (i,
- ACE_TRY_ENV);
- }
+ timer.stop ();
+ timer.elapsed_time (elapsed_time);
- timer.stop ();
- timer.elapsed_time (elapsed_time);
+ this->print_stats ("cube_any_struct",
+ elapsed_time);
+ }
- this->print_stats ("cube_any_struct",
- elapsed_time);
+ this->shutdown_server (this->shutdown_,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
-
- this->shutdown_server (this->shutdown_,
- ACE_TRY_ENV);
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Cubit_Client::run");
+ }
+ ACE_ENDTRY;
return this->error_count_ == 0 ? 0 : 1;
}
@@ -1613,6 +1645,7 @@ Cubit_Client::shutdown_server (int do_shutdown,
"Cubit::shutdown_server");
}
ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
}
return 0;
diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp
index e7873b79c7b..6ba2e717743 100644
--- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp
+++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp
@@ -27,16 +27,17 @@ svr_worker (void *arg)
ACE_TRY_NEW_ENV
{
- if (cubit_server.init (args.argc (),
- args.argv (),
- ACE_TRY_ENV) == -1)
+ int result = cubit_server.init (args.argc (),
+ args.argv (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ if (result == -1)
return (void *) 1;
- else
- {
- barrier->wait ();
- cubit_server.run (ACE_TRY_ENV);
- }
- ACE_TRY_CHECK;
+
+ barrier->wait ();
+ cubit_server.run (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
ACE_CATCH (CORBA::SystemException, sysex)
{