summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-15 02:06:32 +0000
committersergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-15 02:06:32 +0000
commit7d3e627cc5c434926a82bc753dfe3a2808211a46 (patch)
treed4073c9c4eaa90029101672237bf16be82dad882
parent5985085486d11c6c171801f932b8965940798e77 (diff)
downloadATCD-7d3e627cc5c434926a82bc753dfe3a2808211a46.tar.gz
*** empty log message ***
-rw-r--r--TAO/performance-tests/Cubit/TAO/MT_Cubit/Makefile4
-rw-r--r--TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp7
-rw-r--r--TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp15
-rw-r--r--TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp13
-rw-r--r--TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp18
-rw-r--r--TAO/tests/Cubit/TAO/MT_Cubit/Makefile4
-rw-r--r--TAO/tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp7
-rw-r--r--TAO/tests/Cubit/TAO/MT_Cubit/client.cpp15
-rw-r--r--TAO/tests/Cubit/TAO/MT_Cubit/cubit_i.cpp13
-rw-r--r--TAO/tests/Cubit/TAO/MT_Cubit/server.cpp18
10 files changed, 72 insertions, 42 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Makefile b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Makefile
index 67a90689632..0992cd68e6b 100644
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Makefile
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Makefile
@@ -31,7 +31,7 @@ CUBIT_SVR_OBJS = \
cubit_i.o \
Task_Client.o \
Util_Thread.o \
- tmplinst.o
+ tmplinst.o
CUBIT_CLIENT_OBJS = \
cubitC.o \
@@ -63,7 +63,7 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
#CXX := purify $(CXX)
-LDFLAGS += -L$(TAO_ROOT)/tao -L$(TAO_ROOT)/orbsvcs
+LDFLAGS += -L$(TAO_ROOT)/tao -L$(TAO_ROOT)/orbsvcs
CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT)/tao/compat
# pccTimer will eventually get integrated into ACE. It is specific for ClassiX on VME
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp
index 54921ba1d62..7953c5d4dc2 100644
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp
@@ -26,8 +26,8 @@ Util_Thread::svc (void)
this->ts_->barrier_->wait ();
ACE_DEBUG ((LM_DEBUG,
- "(%t) Threads have bound, "
- "utilization test STARTED\n"));
+ "(%t) )))))))) "
+ "utilization test STARTED at %D\n"));
this->ts_->utilization_task_started_ = 1;
@@ -38,7 +38,8 @@ Util_Thread::svc (void)
this->ts_->timer_.stop ();
ACE_DEBUG ((LM_DEBUG,
- "(%t) utilization test ENDED\n"));
+ "(%t) (((((((( "
+ "utilization test ENDED at %D\n"));
return 0;
}
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp
index 964e09514ba..5f47148b9b6 100644
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp
@@ -104,7 +104,7 @@ output_taskinfo (void)
#endif /* VXWORKS */
void
-output_latency (Task_State &ts)
+output_latency (Task_State *ts)
{
FILE *latency_file_handle = 0;
char latency_file[BUFSIZ];
@@ -112,7 +112,7 @@ output_latency (Task_State &ts)
ACE_OS::sprintf (latency_file,
"cb__%d.txt",
- ts.thread_count_);
+ ts->thread_count_);
ACE_OS::fprintf(stderr,
"--->Output file for latency data is \"%s\"\n",
@@ -121,14 +121,14 @@ output_latency (Task_State &ts)
latency_file_handle = ACE_OS::fopen (latency_file, "w");
// This loop visits each client. thread_count_ is the number of clients.
- for (u_int j = 0; j < ts.thread_count_; j ++)
+ for (u_int j = 0; j < ts->thread_count_; j ++)
{
ACE_OS::sprintf(buffer,
"%s #%d",
j==0? "High Priority": "Low Priority",
j);
// this loop visits each request latency from a client
- for (u_int i = 0; i < (j==0? ts.high_priority_loop_count_:ts.loop_count_)/ts.granularity_; i ++)
+ for (u_int i = 0; i < (j==0? ts->high_priority_loop_count_:ts->loop_count_)/ts->granularity_; i ++)
{
ACE_OS::sprintf(buffer+strlen(buffer),
#if defined (CHORUS)
@@ -136,7 +136,7 @@ output_latency (Task_State &ts)
#else
"\t%f\n",
#endif /* !CHORUS */
- ts.global_jitter_array_[j][i]);
+ ts->global_jitter_array_[j][i]);
fputs (buffer, latency_file_handle);
buffer[0]=0;
}
@@ -212,13 +212,14 @@ do_priority_inversion_test (ACE_Thread_Manager *thread_manager,
ACE_Time_Value delta_t;
timer_.start ();
// execute one computation.
- util_thread.computation ();
+ for (int k=0; k < 1000; k++)
+ util_thread.computation ();
timer_.stop ();
timer_.elapsed_time (delta_t);
// Store the time in milli-seconds.
util_task_duration = (delta_t.sec () *
ACE_ONE_SECOND_IN_MSECS +
- (double)delta_t.usec () / ACE_ONE_SECOND_IN_MSECS);
+ (double)delta_t.usec () / ACE_ONE_SECOND_IN_MSECS) / 1000;
#endif /* !CHORUS */
// The thread priority
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp
index 130435a7855..8d8e00f9ae1 100644
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/cubit_i.cpp
@@ -24,7 +24,18 @@ Cubit_i::cube_octet (CORBA::Octet o,
this->util_started_ = 1;
ts_->barrier_->wait ();
}
-
+
+ if (ts_->run_server_utilization_test_ == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%t) )))))))) "
+ "test STARTED at %D\n"));
+
+ ts_->run_server_utilization_test_ = 1;
+ this->util_started_ = 1;
+ this->ts_->timer_.start ();
+ }
+
return (CORBA::Octet) (o * o * o);
}
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp
index 8cc3822dac2..27252d6dd4d 100644
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp
@@ -808,14 +808,14 @@ main (int argc, char *argv[])
ACE_Time_Value delta_t;
timer_.start ();
// execute computation.
- for (int k=0; k < 1000; k++)
+ for (int k=0; k < 1000; k++)
util_task->computation ();
timer_.stop ();
timer_.elapsed_time (delta_t);
// Store the time in milli-seconds.
util_task_duration = (delta_t.sec () *
ACE_ONE_SECOND_IN_USECS +
- (double)delta_t.usec ())/ 1000;
+ (double)delta_t.usec ()) / 1000;
#endif /* !CHORUS */
}
// Barrier for the multiple clients to synchronize after binding to
@@ -849,12 +849,6 @@ main (int argc, char *argv[])
ts.timer_.elapsed_time (total_elapsed);
- ACE_DEBUG ((LM_DEBUG,
- "(%t) utilization task performed %g computations\n"
- "(%t) each computation had a duration of %f msecs\n",
- util_task->get_number_of_computations (),
- util_task_duration/1000));
-
total_util_task_duration = util_task_duration * util_task->get_number_of_computations ();
total_latency = (total_elapsed.sec () *
@@ -863,6 +857,14 @@ main (int argc, char *argv[])
total_latency_servants = total_latency - total_util_task_duration;
+ ACE_DEBUG ((LM_DEBUG,
+ "(%t) utilization task performed %g computations\n"
+ "(%t) each computation had a duration of %f msecs\n"
+ "(%t) elapsed time is %f msecs\n",
+ util_task->get_number_of_computations (),
+ util_task_duration / 1000,
+ total_latency / 1000));
+
// Calc and print the CPU percentage. I add 0.5 to round to the
// nearest integer before casting it to int.
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/tests/Cubit/TAO/MT_Cubit/Makefile b/TAO/tests/Cubit/TAO/MT_Cubit/Makefile
index 67a90689632..0992cd68e6b 100644
--- a/TAO/tests/Cubit/TAO/MT_Cubit/Makefile
+++ b/TAO/tests/Cubit/TAO/MT_Cubit/Makefile
@@ -31,7 +31,7 @@ CUBIT_SVR_OBJS = \
cubit_i.o \
Task_Client.o \
Util_Thread.o \
- tmplinst.o
+ tmplinst.o
CUBIT_CLIENT_OBJS = \
cubitC.o \
@@ -63,7 +63,7 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
#CXX := purify $(CXX)
-LDFLAGS += -L$(TAO_ROOT)/tao -L$(TAO_ROOT)/orbsvcs
+LDFLAGS += -L$(TAO_ROOT)/tao -L$(TAO_ROOT)/orbsvcs
CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT)/tao/compat
# pccTimer will eventually get integrated into ACE. It is specific for ClassiX on VME
diff --git a/TAO/tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp b/TAO/tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp
index 54921ba1d62..7953c5d4dc2 100644
--- a/TAO/tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp
+++ b/TAO/tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp
@@ -26,8 +26,8 @@ Util_Thread::svc (void)
this->ts_->barrier_->wait ();
ACE_DEBUG ((LM_DEBUG,
- "(%t) Threads have bound, "
- "utilization test STARTED\n"));
+ "(%t) )))))))) "
+ "utilization test STARTED at %D\n"));
this->ts_->utilization_task_started_ = 1;
@@ -38,7 +38,8 @@ Util_Thread::svc (void)
this->ts_->timer_.stop ();
ACE_DEBUG ((LM_DEBUG,
- "(%t) utilization test ENDED\n"));
+ "(%t) (((((((( "
+ "utilization test ENDED at %D\n"));
return 0;
}
diff --git a/TAO/tests/Cubit/TAO/MT_Cubit/client.cpp b/TAO/tests/Cubit/TAO/MT_Cubit/client.cpp
index 964e09514ba..5f47148b9b6 100644
--- a/TAO/tests/Cubit/TAO/MT_Cubit/client.cpp
+++ b/TAO/tests/Cubit/TAO/MT_Cubit/client.cpp
@@ -104,7 +104,7 @@ output_taskinfo (void)
#endif /* VXWORKS */
void
-output_latency (Task_State &ts)
+output_latency (Task_State *ts)
{
FILE *latency_file_handle = 0;
char latency_file[BUFSIZ];
@@ -112,7 +112,7 @@ output_latency (Task_State &ts)
ACE_OS::sprintf (latency_file,
"cb__%d.txt",
- ts.thread_count_);
+ ts->thread_count_);
ACE_OS::fprintf(stderr,
"--->Output file for latency data is \"%s\"\n",
@@ -121,14 +121,14 @@ output_latency (Task_State &ts)
latency_file_handle = ACE_OS::fopen (latency_file, "w");
// This loop visits each client. thread_count_ is the number of clients.
- for (u_int j = 0; j < ts.thread_count_; j ++)
+ for (u_int j = 0; j < ts->thread_count_; j ++)
{
ACE_OS::sprintf(buffer,
"%s #%d",
j==0? "High Priority": "Low Priority",
j);
// this loop visits each request latency from a client
- for (u_int i = 0; i < (j==0? ts.high_priority_loop_count_:ts.loop_count_)/ts.granularity_; i ++)
+ for (u_int i = 0; i < (j==0? ts->high_priority_loop_count_:ts->loop_count_)/ts->granularity_; i ++)
{
ACE_OS::sprintf(buffer+strlen(buffer),
#if defined (CHORUS)
@@ -136,7 +136,7 @@ output_latency (Task_State &ts)
#else
"\t%f\n",
#endif /* !CHORUS */
- ts.global_jitter_array_[j][i]);
+ ts->global_jitter_array_[j][i]);
fputs (buffer, latency_file_handle);
buffer[0]=0;
}
@@ -212,13 +212,14 @@ do_priority_inversion_test (ACE_Thread_Manager *thread_manager,
ACE_Time_Value delta_t;
timer_.start ();
// execute one computation.
- util_thread.computation ();
+ for (int k=0; k < 1000; k++)
+ util_thread.computation ();
timer_.stop ();
timer_.elapsed_time (delta_t);
// Store the time in milli-seconds.
util_task_duration = (delta_t.sec () *
ACE_ONE_SECOND_IN_MSECS +
- (double)delta_t.usec () / ACE_ONE_SECOND_IN_MSECS);
+ (double)delta_t.usec () / ACE_ONE_SECOND_IN_MSECS) / 1000;
#endif /* !CHORUS */
// The thread priority
diff --git a/TAO/tests/Cubit/TAO/MT_Cubit/cubit_i.cpp b/TAO/tests/Cubit/TAO/MT_Cubit/cubit_i.cpp
index 130435a7855..8d8e00f9ae1 100644
--- a/TAO/tests/Cubit/TAO/MT_Cubit/cubit_i.cpp
+++ b/TAO/tests/Cubit/TAO/MT_Cubit/cubit_i.cpp
@@ -24,7 +24,18 @@ Cubit_i::cube_octet (CORBA::Octet o,
this->util_started_ = 1;
ts_->barrier_->wait ();
}
-
+
+ if (ts_->run_server_utilization_test_ == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%t) )))))))) "
+ "test STARTED at %D\n"));
+
+ ts_->run_server_utilization_test_ = 1;
+ this->util_started_ = 1;
+ this->ts_->timer_.start ();
+ }
+
return (CORBA::Octet) (o * o * o);
}
diff --git a/TAO/tests/Cubit/TAO/MT_Cubit/server.cpp b/TAO/tests/Cubit/TAO/MT_Cubit/server.cpp
index 8cc3822dac2..27252d6dd4d 100644
--- a/TAO/tests/Cubit/TAO/MT_Cubit/server.cpp
+++ b/TAO/tests/Cubit/TAO/MT_Cubit/server.cpp
@@ -808,14 +808,14 @@ main (int argc, char *argv[])
ACE_Time_Value delta_t;
timer_.start ();
// execute computation.
- for (int k=0; k < 1000; k++)
+ for (int k=0; k < 1000; k++)
util_task->computation ();
timer_.stop ();
timer_.elapsed_time (delta_t);
// Store the time in milli-seconds.
util_task_duration = (delta_t.sec () *
ACE_ONE_SECOND_IN_USECS +
- (double)delta_t.usec ())/ 1000;
+ (double)delta_t.usec ()) / 1000;
#endif /* !CHORUS */
}
// Barrier for the multiple clients to synchronize after binding to
@@ -849,12 +849,6 @@ main (int argc, char *argv[])
ts.timer_.elapsed_time (total_elapsed);
- ACE_DEBUG ((LM_DEBUG,
- "(%t) utilization task performed %g computations\n"
- "(%t) each computation had a duration of %f msecs\n",
- util_task->get_number_of_computations (),
- util_task_duration/1000));
-
total_util_task_duration = util_task_duration * util_task->get_number_of_computations ();
total_latency = (total_elapsed.sec () *
@@ -863,6 +857,14 @@ main (int argc, char *argv[])
total_latency_servants = total_latency - total_util_task_duration;
+ ACE_DEBUG ((LM_DEBUG,
+ "(%t) utilization task performed %g computations\n"
+ "(%t) each computation had a duration of %f msecs\n"
+ "(%t) elapsed time is %f msecs\n",
+ util_task->get_number_of_computations (),
+ util_task_duration / 1000,
+ total_latency / 1000));
+
// Calc and print the CPU percentage. I add 0.5 to round to the
// nearest integer before casting it to int.
ACE_DEBUG ((LM_DEBUG,