summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog13
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/generate.sh41
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/processor_util.sh19
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/schedulability.sh19
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/taskcount.sh17
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/utilization.sh17
-rw-r--r--TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.cpp4
-rw-r--r--TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.h3
-rw-r--r--TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.idl3
-rw-r--r--TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.mpc6
-rw-r--r--TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.cpp24
-rw-r--r--TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.h3
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/client-rt.cpp13
-rwxr-xr-xTAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/server-rt.cpp10
14 files changed, 108 insertions, 84 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 3cd0bddd404..67bec117885 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Tue May 5 19:21:34 UTC 2009 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
+
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.idl
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.h
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.cpp
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/client-rt.cpp
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.mpc
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.h
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/server-rt.cpp
+ * orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.cpp:
+
+ Adopted new client and server executables.
+
Fri Apr 17 21:42:53 UTC 2009 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
* orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer:
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/generate.sh b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/generate.sh
index 127111ed440..6b29e940fcc 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/generate.sh
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/generate.sh
@@ -1,6 +1,7 @@
#!/bin/bash
DECORAM_BIN=../../bin
DATA_DIR=$1
+REPEAT=20
#experiment parameters
INTERVAL_NUMBER=1
@@ -12,25 +13,27 @@ SS_LOWER=0.005
if [ ! -d ./$DATA_DIR ]; then mkdir ./$DATA_DIR; fi
-for TASK_NO in 10 20 40 80 160; do \
- echo "run tgen for $TASK_NO tasks..." && \
- $DECORAM_BIN/tgen \
- -n $TASK_NO \
- -i $INTERVAL_NUMBER \
- -m $MAXIMUM_LOAD \
- -p $PERIOD_UPPER \
- -l $PERIOD_LOWER \
- -s $SS_UPPER \
- -z $SS_LOWER > ./$DATA_DIR/$TASK_NO-tasks.input && \
- for BACKUP_NO in 1 2 3 4; do \
- for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
- echo "run $ALGORITHM for $BACKUP_NO backups..." && \
- echo "start $ALGORITHM with $TASK_NO tasks and $BACKUP_NO backups at `date`" >> ./$DATA_DIR/timing.log && \
- $DECORAM_BIN/$ALGORITHM \
- ./$DATA_DIR/$TASK_NO-tasks.input \
- $[ $TASK_NO * $BACKUP_NO ] \
- $BACKUP_NO > ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt && \
- echo "stop $ALGORITHM with $TASK_NO tasks and $BACKUP_NO backups at `date`" >> ./$DATA_DIR/timing.log; \
+for RUN in `/usr/bin/seq $REPEAT`; do \
+ for TASK_NO in 10 20 40 80 160; do \
+ echo "run $RUN of tgen for $TASK_NO tasks..." && \
+ $DECORAM_BIN/tgen \
+ -n $TASK_NO \
+ -i $INTERVAL_NUMBER \
+ -m $MAXIMUM_LOAD \
+ -p $PERIOD_UPPER \
+ -l $PERIOD_LOWER \
+ -s $SS_UPPER \
+ -z $SS_LOWER > ./$DATA_DIR/$RUN-$TASK_NO-tasks.input && \
+ for BACKUP_NO in 1 2 3 4; do \
+ for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
+ echo "run $RUN for $ALGORITHM for $BACKUP_NO backups..." && \
+ echo "start $ALGORITHM with $TASK_NO tasks and $BACKUP_NO backups at `date`" >> ./$DATA_DIR/$RUN-timing.log && \
+ $DECORAM_BIN/$ALGORITHM \
+ ./$DATA_DIR/$RUN-$TASK_NO-tasks.input \
+ $[ $TASK_NO * $BACKUP_NO ] \
+ $BACKUP_NO > ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt && \
+ echo "stop $ALGORITHM with $TASK_NO tasks and $BACKUP_NO backups at `date`" >> ./$DATA_DIR/$RUN-timing.log; \
+ done; \
done; \
done; \
done
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/processor_util.sh b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/processor_util.sh
index dc6a79241d1..9fa2494b739 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/processor_util.sh
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/processor_util.sh
@@ -3,18 +3,21 @@ EXPERIMENT_NAME=processor_util
DECORAM_BIN=../../bin
DATA_DIR=$1
RESULT_DIR=$DATA_DIR/$EXPERIMENT_NAME
+REPEAT=20
if [ ! -d ./$DATA_DIR ]; then echo Directory $DATA_DIR does not exist && exit; fi
if [ ! -d ./$RESULT_DIR ]; then mkdir -p ./$RESULT_DIR; fi
-for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
- for TASK_NO in 10 20 40 80 160; do \
- echo "$TASK_NO tasks:" >> ./$RESULT_DIR/$EXPERIMENT_NAME-$ALGORITHM.dat && \
- for BACKUP_NO in 1 2 3 4; do \
- if [ -s ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
- echo "count processors used by $ALGORITHM for $BACKUP_NO backups and $TASK_NO tasks ..." && \
- echo "$BACKUP_NO backups: `$DECORAM_BIN/scheck -c -f ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt`" >> ./$RESULT_DIR/$EXPERIMENT_NAME-$ALGORITHM.dat; \
- fi;\
+for RUN in `/usr/bin/seq $REPEAT`; do \
+ for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
+ for TASK_NO in 10 20 40 80 160; do \
+ echo "$TASK_NO tasks:" >> ./$RESULT_DIR/$RUN-$EXPERIMENT_NAME-$ALGORITHM.dat && \
+ for BACKUP_NO in 1 2 3 4; do \
+ if [ -s ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
+ echo "count processors used in run $RUN by $ALGORITHM for $BACKUP_NO backups and $TASK_NO tasks ..." && \
+ echo "$BACKUP_NO backups: `$DECORAM_BIN/scheck -c -f ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt`" >> ./$RESULT_DIR/$RUN-$EXPERIMENT_NAME-$ALGORITHM.dat; \
+ fi;\
+ done; \
done; \
done; \
done \ No newline at end of file
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/schedulability.sh b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/schedulability.sh
index 2a9d0572fde..48b54ab7824 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/schedulability.sh
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/schedulability.sh
@@ -3,18 +3,21 @@ EXPERIMENT_NAME=schedulability
DECORAM_BIN=../../bin
DATA_DIR=$1
RESULT_DIR=$DATA_DIR/$EXPERIMENT_NAME
+REPEAT=20
if [ ! -d ./$DATA_DIR ]; then echo Directory $DATA_DIR does not exist && exit; fi
if [ ! -d ./$RESULT_DIR ]; then mkdir -p ./$RESULT_DIR; fi
-for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
- for TASK_NO in 10 20 40 80 160; do \
- echo "$TASK_NO tasks:" >> ./$RESULT_DIR/$EXPERIMENT_NAME-$ALGORITHM.dat && \
- for BACKUP_NO in 1 2 3 4; do \
- if [ -s ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
- echo "check schedulability of $ALGORITHM result for $BACKUP_NO backups and $TASK_NO tasks ..." && \
- echo "$BACKUP_NO backups: `$DECORAM_BIN/scheck -f ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt`" >> ./$RESULT_DIR/$EXPERIMENT_NAME-$ALGORITHM.dat; \
- fi;\
+for RUN in `/usr/bin/seq $REPEAT`; do \
+ for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
+ for TASK_NO in 10 20 40 80 160; do \
+ echo "$TASK_NO tasks:" >> ./$RESULT_DIR/$RUN-$EXPERIMENT_NAME-$ALGORITHM.dat && \
+ for BACKUP_NO in 1 2 3 4; do \
+ if [ -s ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
+ echo "check schedulability of run $RUN of $ALGORITHM result for $BACKUP_NO backups and $TASK_NO tasks ..." && \
+ echo "$BACKUP_NO backups: `$DECORAM_BIN/scheck -f ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt`" >> ./$RESULT_DIR/$RUN-$EXPERIMENT_NAME-$ALGORITHM.dat; \
+ fi;\
+ done; \
done; \
done; \
done \ No newline at end of file
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/taskcount.sh b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/taskcount.sh
index 77c41a01c44..516e674e008 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/taskcount.sh
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/taskcount.sh
@@ -3,17 +3,20 @@ EXPERIMENT_NAME=taskcount
DECORAM_BIN=../../bin
DATA_DIR=$1
RESULT_DIR=$DATA_DIR/$EXPERIMENT_NAME
+REPEAT=20
if [ ! -d ./$DATA_DIR ]; then echo Directory $DATA_DIR does not exist && exit; fi
if [ ! -d ./$RESULT_DIR ]; then mkdir -p ./$RESULT_DIR; fi
-for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
- for TASK_NO in 10 20 40 80 160; do \
- for BACKUP_NO in 1 2 3 4; do \
- if [ -s ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
- echo "calculate number of tasks of $ALGORITHM result for $BACKUP_NO backups and $TASK_NO tasks ..." && \
- $DECORAM_BIN/scheck -t -f ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt > ./$RESULT_DIR/$EXPERIMENT_NAME-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt; \
- fi;\
+for RUN in `/usr/bin/seq $REPEAT`; do \
+ for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
+ for TASK_NO in 10 20 40 80 160; do \
+ for BACKUP_NO in 1 2 3 4; do \
+ if [ -s ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
+ echo "calculate number of tasks for run $RUN of $ALGORITHM result for $BACKUP_NO backups and $TASK_NO tasks ..." && \
+ $DECORAM_BIN/scheck -t -f ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt > ./$RESULT_DIR/$RUN-$EXPERIMENT_NAME-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt; \
+ fi;\
+ done; \
done; \
done; \
done \ No newline at end of file
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/utilization.sh b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/utilization.sh
index c91cd7b5c32..b507b38dec1 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/utilization.sh
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/experiments/packing/utilization.sh
@@ -3,17 +3,20 @@ EXPERIMENT_NAME=utilization
DECORAM_BIN=../../bin
DATA_DIR=$1
RESULT_DIR=$DATA_DIR/$EXPERIMENT_NAME
+REPEAT=20
if [ ! -d ./$DATA_DIR ]; then echo Directory $DATA_DIR does not exist && exit; fi
if [ ! -d ./$RESULT_DIR ]; then mkdir -p ./$RESULT_DIR; fi
-for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
- for TASK_NO in 10 20 40 80 160; do \
- for BACKUP_NO in 1 2 3 4; do \
- if [ -s ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
- echo "calculate utilization of $ALGORITHM result for $BACKUP_NO backups and $TASK_NO tasks ..." && \
- $DECORAM_BIN/scheck -u -f ./$DATA_DIR/$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt > ./$RESULT_DIR/$EXPERIMENT_NAME-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt; \
- fi;\
+for RUN in `/usr/bin/seq $REPEAT`; do \
+ for ALGORITHM in pftrmff aftrmff frftrmff bsftrmbf bsftrmwf bsftrmbfnf bsftrmwfnf; do \
+ for TASK_NO in 10 20 40 80 160; do \
+ for BACKUP_NO in 1 2 3 4; do \
+ if [ -s ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt ]; then \
+ echo "calculate utilization of run $RUN of $ALGORITHM result for $BACKUP_NO backups and $TASK_NO tasks ..." && \
+ $DECORAM_BIN/scheck -u -f ./$DATA_DIR/$RUN-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt > ./$RESULT_DIR/$RUN-$EXPERIMENT_NAME-$ALGORITHM-$BACKUP_NO-backups-$TASK_NO-tasks.txt; \
+ fi;\
+ done; \
done; \
done; \
done \ No newline at end of file
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.cpp
index 1ed8649ac7d..4ada76ec746 100644
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.cpp
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.cpp
@@ -13,8 +13,10 @@ Client_Timer_Handler::Client_Timer_Handler (unsigned long iterations,
unsigned long log_start,
const std::string & filename,
const ACE_Time_Value & period,
+ const ACE_Time_Value & execution_time,
bool logging)
: period_ (period),
+ execution_time_ (execution_time),
invocations_ (0),
logfile_ (filename),
max_iterations_ (iterations),
@@ -65,7 +67,7 @@ Client_Timer_Handler::handle_timeout (const ACE_Time_Value &,
// we have to do some profiling first to see how we can achieve
// the correct execution time.
- server_processing_time = worker_->run_task (execution_time);
+ server_processing_time = worker_->run_task (execution_time_.msec ());
timer_.stop ();
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.h
index 03b4ae40c47..36e858cdb5e 100644
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.h
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Client_Timer_Handler.h
@@ -16,6 +16,7 @@ class Client_Timer_Handler : public ACE_Event_Handler
unsigned long log_start,
const std::string & filename,
const ACE_Time_Value & period,
+ const ACE_Time_Value & execution_time,
bool logging = false);
~Client_Timer_Handler ();
@@ -39,6 +40,8 @@ class Client_Timer_Handler : public ACE_Event_Handler
ACE_Time_Value period_;
+ ACE_Time_Value execution_time_;
+
unsigned long invocations_;
std::string logfile_;
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.idl b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.idl
index 295a0e60fc9..ecd1e63b48a 100644
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.idl
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.idl
@@ -4,7 +4,8 @@ module DeCoRAM
{
interface Worker : ReplicatedApplication
{
- unsigned long run_task (in double execution_time);
+ void run_task (in double execution_time,
+ in boolean ignore);
void stop ();
};
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.mpc b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.mpc
index 9a6055e4b40..b7ca47a8fe5 100644
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.mpc
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker.mpc
@@ -9,14 +9,14 @@ project(*idl): taoidldefaults {
custom_only = 1
}
-project(*Server): lwft_server, lwft_client, naming, rtcorba {
+project(*Server): lwft_server, lwft_client, naming, rtcorba, rtportableserver {
after += *idl
libs += LWFT_StateSyncAgent
Source_Files {
Worker_i.cpp
- server.cpp
+ server-rt.cpp
}
Source_Files {
@@ -32,7 +32,7 @@ project(*Client): lwft_client, naming, rtcorba, portableserver {
after += *idl
Source_Files {
- client.cpp
+ client-rt.cpp
Client_Timer_Handler.cpp
WorkerC.cpp
TriggerS.cpp
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.cpp
index afdef051022..fee3ae4250a 100644
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.cpp
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.cpp
@@ -56,28 +56,20 @@ Worker_i::Worker_i (CORBA::ORB_ptr orb,
task_.activate ();
}
-CORBA::ULong
-Worker_i::run_task (CORBA::Double execution_time)
+void
+Worker_i::run_task (CORBA::Double execution_time,
+ bool ignore)
{
- ACE_DEBUG ((LM_EMERGENCY, "x(%d) ", state_));
-
- timer_.start ();
-
/* do prime number calculation here */
- ++state_;
-
- agent_->state_changed (object_id_.c_str ());
-
- timer_.stop ();
-
- timer_.elapsed_time (last_execution_time_);
+ if (!ignore)
+ {
+ ++state_;
- ACE_DEBUG ((LM_TRACE, "x=%d ", last_execution_time_.msec ()));
+ agent_->state_changed (object_id_.c_str ());
+ }
task_.signal ();
-
- return last_execution_time_.msec ();
}
void Worker_i::stop ()
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.h
index 56fe515e824..36d8b709565 100644
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.h
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/Worker_i.h
@@ -38,7 +38,8 @@ class Worker_i : public POA_DeCoRAM::Worker
StateSynchronizationAgent_ptr agent,
long invocations);
- virtual CORBA::ULong run_task (CORBA::Double execution_time);
+ virtual void run_task (CORBA::Double execution_time,
+ bool ignore);
virtual void set_state (const CORBA::Any & state_value);
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/client-rt.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/client-rt.cpp
index f95a58aea4f..20e3e326fb4 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/client-rt.cpp
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/client-rt.cpp
@@ -13,6 +13,7 @@
#include "ace/Array_Base.h"
#include "ace/Task.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Throughput_Stats.h"
#include "tao/ORB_Core.h"
#include "tao/debug.h"
@@ -187,7 +188,6 @@ parse_args (int argc, char *argv[])
"\t-q <prime number> (defaults to %d)\n"
"\t-r <rates file> (defaults to %s)\n"
"\t-t <time for test> (defaults to %d)\n"
- "\t-u <continuous worker priority> (defaults to %d)\n"
"\t-v <priority setting: AT_THREAD_CREATION = 0, AFTER_THREAD_CREATION = 1> (defaults to %s)\n"
"\t-w <work> (defaults to %d)\n"
"\t-x <shutdown server> (defaults to %d)\n"
@@ -195,7 +195,6 @@ parse_args (int argc, char *argv[])
"\t-z <timeout for max throughput measurement> (defaults to %d)\n"
"\n",
argv [0],
- continuous_workers,
count_missed_end_deadlines,
do_dump_history,
individual_continuous_worker_stats,
@@ -250,8 +249,7 @@ start_synchronization (DeCoRAM::Worker_ptr test,
i < synchronization_iterations;
++i)
{
- // test->method (0, 0, work,
- //prime_number, 0);
+ test->run_task (2, true);
}
}
catch (const CORBA::Exception& ex)
@@ -383,8 +381,7 @@ max_throughput (DeCoRAM::Worker_ptr test,
if (now > end)
break;
- // test->method (0, 0, work,
- // prime_number, 0);
+ test->run_task (2, true);
++calls_made;
}
@@ -715,7 +712,7 @@ Paced_Worker::svc (void)
ACE_DEBUG ((LM_DEBUG, "******************************\n"));
- this->test_->dump ();
+ // this->test_->dump ();
}
catch (const CORBA::Exception& ex)
{
@@ -921,7 +918,7 @@ Task::svc (void)
if (shutdown_server)
{
- test->shutdown ();
+ server1->stop ();
}
}
catch (const CORBA::Exception& ex)
diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/server-rt.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/server-rt.cpp
index 5d4a82b00e5..6825729e113 100755
--- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/server-rt.cpp
+++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/RTCORBA/ClientServer/server-rt.cpp
@@ -92,7 +92,7 @@ parse_args (int argc, char *argv[])
default_thread_priority,
lanes_file,
number_of_lanes,
- ior_output,
+ ior_output.c_str (),
static_threads),
-1);
}
@@ -339,10 +339,10 @@ Task::svc (void)
agent_,
invocations);
- int result = create_object (root_poa.in (),
- orb_.in (),
- &server_impl,
- ior_output.c_str ());
+ result = create_object (root_poa.in (),
+ orb_.in (),
+ &server_impl,
+ ior_output.c_str ());
CORBA::Object_var obj = root_poa->servant_to_reference (&server_impl);