summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-11 22:03:11 +0000
committerpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-11 22:03:11 +0000
commit88f9e0a73788ac5f2c90b919cde8a6ca8d2c3aad (patch)
tree82cab9465dc6ff6fa20c9be07cd5f724eb204982
parentaf464ba15cd0e166256f610862651abd3774d20d (diff)
downloadATCD-RT_Notify_TAO132.tar.gz
ChangeLogTag: Sun Jun 8 19:53:04 2003 Pradeep Gore <pradeep@oomworks.com>RT_Notify_TAO132
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp6
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h2
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp10
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Application_Command.h4
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp8
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h2
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h2
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp28
-rw-r--r--TAO/orbsvcs/tests/Notify/lib/Task_Stats.h2
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_10ms_Lanes/run_test.pl16
11 files changed, 48 insertions, 36 deletions
diff --git a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp
index fb71d3b9bda..b505e4493a3 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.cpp
@@ -176,7 +176,7 @@ TAO_NS_Activation_Manager::activate_suppliers (void)
}
void
-TAO_NS_Activation_Manager::dump_stats (void)
+TAO_NS_Activation_Manager::dump_stats (int dump_samples)
{
char hostname[MAXHOSTNAMELEN];
ACE_OS::hostname (hostname, MAXHOSTNAMELEN);
@@ -198,7 +198,7 @@ TAO_NS_Activation_Manager::dump_stats (void)
if (sup_iter.next (sup_entry) != 0)
{
supplier = sup_entry->int_id_;
- supplier->dump_stats (msg);
+ supplier->dump_stats (msg, dump_samples);
}
}
@@ -213,7 +213,7 @@ TAO_NS_Activation_Manager::dump_stats (void)
if (cons_iter.next (cons_entry) != 0)
{
consumer = cons_entry->int_id_;
- consumer->dump_stats (msg);
+ consumer->dump_stats (msg, dump_samples);
}
}
}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h
index 15be66983f1..5053b66add7 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Activation_Manager.h
@@ -85,7 +85,7 @@ public:
virtual void done (TAO_NS_Periodic_Consumer* consumer);
// Dump stats gathered during exec..
- void dump_stats (void);
+ void dump_stats (int dump_samples);
// Returns 0 if the file could be opened for write.
int ior_output_file (const ACE_TCHAR *file_name);
diff --git a/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp
index 3fcba7cb41f..a3d8133af06 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Application_Command.cpp
@@ -12,6 +12,7 @@ ACE_RCSID(lib, TAO_Application_Command, "$id$")
#include "Priority_Mapping.h"
TAO_NS_Application_Command::TAO_NS_Application_Command (void)
+ : dump_samples_ (0)
{
}
@@ -66,6 +67,13 @@ TAO_NS_Application_Command::init (ACE_Arg_Shifter& arg_shifter)
this->command_ = DUMP_STATE;
arg_shifter.consume_arg ();
+
+ if (arg_shifter.cur_arg_strncasecmp ("-Samples") == 0)
+ {
+ this->dump_samples_ = 1;
+
+ arg_shifter.consume_arg ();
+ }
}
else if (arg_shifter.cur_arg_strncasecmp ("-SignalPeer") == 0)
{
@@ -134,7 +142,7 @@ TAO_NS_Application_Command::handle_dump_stats (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
TAO_NS_Activation_Manager* act_mgr = 0;
LOOKUP_MANAGER->resolve (act_mgr);
- act_mgr->dump_stats ();
+ act_mgr->dump_stats (this->dump_samples_);
}
void
diff --git a/TAO/orbsvcs/tests/Notify/lib/Application_Command.h b/TAO/orbsvcs/tests/Notify/lib/Application_Command.h
index bb52e3ffc7b..1bf92722e81 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Application_Command.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Application_Command.h
@@ -65,6 +65,10 @@ protected:
WAIT_TO_START
};
+ /// Flag used with the DUMP_STATE command that asks for all samples to be put into the
+ /// output data file.
+ int dump_samples_;
+
///= Handlers
virtual void handle_init (ACE_ENV_SINGLE_ARG_DECL);
void handle_run (ACE_ENV_SINGLE_ARG_DECL);
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp
index 182c8015e8e..038d5e90e89 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp
@@ -251,7 +251,7 @@ TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::Structur
}
void
-TAO_NS_Periodic_Consumer::dump_stats (ACE_TCHAR* msg)
+TAO_NS_Periodic_Consumer::dump_stats (ACE_TCHAR* msg, int dump_samples)
{
char buf[BUFSIZ];
ACE_OS::sprintf (buf, "%s.dat", this->name_.c_str ());
@@ -259,9 +259,9 @@ TAO_NS_Periodic_Consumer::dump_stats (ACE_TCHAR* msg)
ACE_CString fname (buf);
ACE_OS::sprintf (buf,
- "%s# Consumer Name = %s, Proxy ID = %d Samples Received = %d\n",
+ "%s# Consumer Name = %s, Proxy ID = %d Load = %ul\n",
msg,
- this->name_.c_str (), this->proxy_id_, this->count_);
+ this->name_.c_str (), this->proxy_id_, this->load_);
- stats_.dump_samples (fname.c_str (), buf);
+ stats_.dump_samples (fname.c_str (), buf, dump_samples);
}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h
index 30fc652e1f2..33981868f82 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.h
@@ -48,7 +48,7 @@ public:
virtual int init_state (ACE_Arg_Shifter& arg_shifter);
/// dump stats
- void dump_stats (ACE_TCHAR* msg);
+ void dump_stats (ACE_TCHAR* msg, int dump_samples);
protected:
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp
index 72bfaea9d9a..b43874cafd4 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp
@@ -336,7 +336,7 @@ TAO_NS_Periodic_Supplier::svc (void)
}
void
-TAO_NS_Periodic_Supplier::dump_stats (ACE_TCHAR* msg)
+TAO_NS_Periodic_Supplier::dump_stats (ACE_TCHAR* msg, int dump_samples)
{
char buf[BUFSIZ];
ACE_OS::sprintf (buf, "%s.dat", this->name_.c_str ());
@@ -346,5 +346,5 @@ TAO_NS_Periodic_Supplier::dump_stats (ACE_TCHAR* msg)
ACE_OS::sprintf (buf,"%s# : Supplier Name = %s, Proxy ID = %d, Event Type = %s, priority %d, period %ld, exec_time %ld, phase %ld, iter_ %d , load_ %d, deadlines missed = %d\n",
msg, this->name_.c_str (), this->proxy_id_, this->event_.type (), priority_, period_, exec_time_, phase_, iter_, load_, this->total_deadlines_missed_);
- stats_.dump_samples (fname.c_str (), buf);
+ stats_.dump_samples (fname.c_str (), buf, dump_samples);
}
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h
index 11aa675f0f7..b65de4fcfed 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h
@@ -56,7 +56,7 @@ public:
virtual int svc (void);
/// Dump stats.
- void dump_stats (ACE_TCHAR* msg);
+ void dump_stats (ACE_TCHAR* msg, int dump_samples);
/// Get the name of the proxy
const char* proxy_name (void);
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp
index 35c5284f909..c13cceca27a 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp
+++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp
@@ -57,7 +57,7 @@ Task_Stats::end_time (ACE_hrtime_t time)
}
void
-Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg)
+Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, int dump_samples)
{
FILE* output_file = ACE_OS::fopen (file_name, "w");
@@ -113,23 +113,27 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg)
this->var_2_ /= this->samples_count_;
- ACE_OS::fprintf (output_file, "## Avg = %u, Var^2 = %u\n"
+ ACE_OS::fprintf (output_file, "## Latency: Avg = %u, Var^2 = %u\n"
, ACE_CU64_TO_CU32 (this->mean_)
, ACE_CU64_TO_CU32 (this->var_2_));
- ACE_DEBUG ((LM_DEBUG, " Avg = %u, Var^2 = %u\n"
- , ACE_CU64_TO_CU32 (this->mean_)
- , ACE_CU64_TO_CU32 (this->var_2_)));
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG, " Latency: Avg = %u, Var^2 = %u\n"
+ , ACE_CU64_TO_CU32 (this->mean_)
+ , ACE_CU64_TO_CU32 (this->var_2_)));
- // dump the samples recorded.
- ACE_OS::fprintf (output_file, "#Invocation time \t Execution time\n");
-
- for (i = 0; i != this->samples_count_; ++i)
+ // if we are asked to, dump the samples recorded.
+ if (dump_samples)
{
- ACE_UINT32 val_1 = Task_Stats::diff_usec (base_time_, time_inv_[i]);
+ ACE_OS::fprintf (output_file, "#Invocation time \t Execution time\n");
+
+ for (i = 0; i != this->samples_count_; ++i)
+ {
+ ACE_UINT32 val_1 = Task_Stats::diff_usec (base_time_, time_inv_[i]);
- ACE_OS::fprintf (output_file, "%u \t %u\n",val_1,
- ACE_CU64_TO_CU32 (time_exec_[i]));
+ ACE_OS::fprintf (output_file, "%u \t %u\n",val_1,
+ ACE_CU64_TO_CU32 (time_exec_[i]));
+ }
}
ACE_OS::fclose (output_file);
diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h
index 8f3ef6acebb..073e2b9ff39 100644
--- a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h
+++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.h
@@ -70,7 +70,7 @@ class TAO_NOTIFY_TEST_Export Task_Stats
/// Record a sample
int sample (ACE_UINT64& inv_start_time, ACE_UINT64& inv_end_time);
- void dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg);
+ void dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, int dump_samples);
protected:
/// Base and end times
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_10ms_Lanes/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_10ms_Lanes/run_test.pl
index 8b4aafa7924..7e98e876d96 100644
--- a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_10ms_Lanes/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_10ms_Lanes/run_test.pl
@@ -19,8 +19,8 @@ if ($opt_h)
exit 0;
}
-$experiment_timeout = 120;
-$startup_timeout = 120;
+$experiment_timeout = 600;
+$startup_timeout = 600;
if ($opt_n)
{
@@ -74,7 +74,9 @@ $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";
+
+#$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -ORBDebugLevel 1";
$Consumer = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver");
@@ -158,13 +160,7 @@ if ($opt_o)
@list=glob("*.dat");
for $file (@list)
{
- copy ("$file", "$results_directory/$file");
- }
-
- @list=glob("*.conf");
- for $file (@list)
- {
- copy ("$file", "$results_directory/$file");
+ move ("$file", "$results_directory/$file");
}
}