diff options
author | wolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-03-13 04:07:42 +0000 |
---|---|---|
committer | wolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-03-13 04:07:42 +0000 |
commit | 38589e319fe49d087dbc12415cafac56e6dbc881 (patch) | |
tree | 793886982814d6dc1c3f4c77db3e38dfea767f66 | |
parent | fe5020094a7a3d20633efeae86dd023f27310c03 (diff) | |
download | ATCD-38589e319fe49d087dbc12415cafac56e6dbc881.tar.gz |
ChangeLogTag: Fri Mar 13 04:07:28 UTC 2009 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
-rw-r--r-- | CIAO/ChangeLog | 7 | ||||
-rw-r--r-- | CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.cpp | 23 | ||||
-rw-r--r-- | CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h | 8 |
3 files changed, 38 insertions, 0 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 3ac2cfaf4b9..654128b2469 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,10 @@ +Fri Mar 13 04:07:28 UTC 2009 Friedhelm Wolf <fwolf@dre.vanderbilt.edu> + + * DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h + * DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.cpp: + + Added logging functionality for fou shutdown timing. + Fri Mar 13 02:33:32 UTC 2009 Friedhelm Wolf <fwolf@dre.vanderbilt.edu> * DAnCE/tests/CIAO/FTComponents/FTClient.idl diff --git a/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.cpp b/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.cpp index c85c9579968..ce22b76ac00 100644 --- a/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.cpp +++ b/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.cpp @@ -10,6 +10,7 @@ */ //============================================================================= +#include "ace/High_Res_Timer.h" #include "FaultCorrelationManager_Impl.h" #include "ciao/FTComponentServer/CIAO_PropertiesC.h" #include "DAnCE/Logger/Log_Macros.h" @@ -73,6 +74,20 @@ namespace DAnCE this->app_failure_i (fi.host.c_str (), fi.application.c_str ()); + + // add all logged proc_failure info to the log file + std::ofstream out; + out.open ("fou-shutdown.txt", ios_base::app); + + for (SHUTDOWN_TIME_LIST::iterator it = history_.begin (); + it != history_.end (); + ++it) + { + out << it->second << " " << it->first << std::endl; + } + + out.close (); + history_.clear (); } return 0; @@ -102,6 +117,8 @@ namespace DAnCE Deployment::Applications_var apps = dam->getApplications(); + timer_.start (); + for (size_t i = 0; i < apps->length(); ++i) { try @@ -116,6 +133,8 @@ namespace DAnCE } } + timer_.stop (); + Deployment::DeploymentPlan_var plan = dam->getPlan (); this->remove_constraints (plan); @@ -130,6 +149,10 @@ namespace DAnCE "FCM::stop_failover_unit (%C): " "plan was shutdown sucessfully.\n", fou_id)); + + ACE_Time_Value tv; + timer_.elapsed_time (tv); + history_.push_back (TFouShutdownTime (tv.msec (), fou_id)); } catch (const CORBA::Exception & ex) { diff --git a/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h b/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h index 1646f144188..ce599ca05f4 100644 --- a/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h +++ b/CIAO/DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h @@ -16,6 +16,7 @@ #include <list> #include <map> #include <queue> +#include "ace/High_Res_Timer.h" #include "ace/Hash_Map_Manager_T.h" #include "ace/Map_Manager.h" #include "ace/Thread_Mutex.h" @@ -146,6 +147,13 @@ namespace DAnCE ACE_Condition <ACE_Thread_Mutex> new_notification_; std::queue <FailureInfo> notification_queue_; + + ACE_High_Res_Timer timer_; + + typedef std::pair <unsigned long, std::string> TFouShutdownTime; + typedef std::list <TFouShutdownTime> SHUTDOWN_TIME_LIST; + + SHUTDOWN_TIME_LIST history_; }; } |