diff options
author | msmit <msmit@remedy.nl> | 2010-04-09 12:52:45 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2010-04-09 12:52:45 +0000 |
commit | 929bdaf3b1bc4bc7c0817af0ed596ad5fc80a4ac (patch) | |
tree | 290b5d7b8b2ca8d0a655e0023bcbb995d1f243ae | |
parent | c6402405812f590d27523491fcae35503c4033b9 (diff) | |
download | ATCD-929bdaf3b1bc4bc7c0817af0ed596ad5fc80a4ac.tar.gz |
Fri Apr 9 12:49:53 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl:
* connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver.idl:
* connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.h:
* connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.cpp:
* connectors/dds4ccm/performance-tests/Throughput/SecConnector/Throughput_Sec_Connector.idl:
* connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender.idl:
* connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.h:
* connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.cpp:
Moved connector declaration to the namespace of the test.
Give an error when this test does not run.
Also made some layout changes.
9 files changed, 79 insertions, 62 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 1db0cb40e6f..386294df8e6 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,17 @@ +Fri Apr 9 12:49:53 UTC 2010 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl: + * connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver.idl: + * connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.h: + * connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.cpp: + * connectors/dds4ccm/performance-tests/Throughput/SecConnector/Throughput_Sec_Connector.idl: + * connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender.idl: + * connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.h: + * connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.cpp: + Moved connector declaration to the namespace of the test. + Give an error when this test does not run. + Also made some layout changes. + Fri Apr 9 12:28:34 UTC 2010 Marcel Smit <msmit@remedy.nl> * connectors/dds4ccm/performance-tests/LatencyTT/Connector/LatencyTT_Test_Connector.idl: diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl index 4eb4f351cf1..4ecaf3d3b8c 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Connector/Throughput_Connector.idl @@ -16,14 +16,10 @@ #pragma ciao lem "Connector/Throughput_ConnectorE.idl" -module CCM_DDS -{ - module ::CCM_DDS::Typed < ::ThroughputTest, ::ThroughputTestSeq> ThroughputTest; -}; - module Throughput { - connector Throughput_Connector : ::CCM_DDS::ThroughputTest::DDS_Event + module ::CCM_DDS::Typed < ::ThroughputTest, ::ThroughputTestSeq> ThroughputTestConn; + connector Throughput_Connector : ThroughputTestConn::DDS_Event { }; }; diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver.idl b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver.idl index d06bc495572..af7b9f8159e 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver.idl +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver.idl @@ -15,8 +15,8 @@ module Throughput { component Receiver { - port CCM_DDS::ThroughputTest::DDS_Listen info_listen; - port CCM_DDS::ThroughputCommand::DDS_Listen command_listen; + port ThroughputTestConn::DDS_Listen info_listen; + port ThroughputCommandConn::DDS_Listen command_listen; }; }; diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.cpp index 395e67f6c9f..888b315e3e0 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.cpp +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.cpp @@ -28,6 +28,7 @@ namespace CIAO_Throughput_Receiver_Impl { this->callback_.record_data(const_cast<ThroughputTest&> (an_instance)); } + void ThroughputTest_Listener_exec_i::on_many_data ( const ThroughputTestSeq & /*data_seq*/, @@ -53,7 +54,7 @@ namespace CIAO_Throughput_Receiver_Impl const ThroughputCommand & an_instance, const ::CCM_DDS::ReadInfo & /*info*/) { - this->callback_.handle_run(const_cast<ThroughputCommand&> (an_instance)); + this->callback_.handle_run (const_cast<ThroughputCommand&> (an_instance)); } void @@ -107,23 +108,23 @@ namespace CIAO_Throughput_Receiver_Impl void Receiver_exec_i::handle_run(ThroughputCommand & an_instance) { - if( an_instance.command == THROUGHPUT_COMMAND_START) - { - this->log_ = true; - this->reset_results(); - this->interval_data_length_ = an_instance.data_length; - this->demand_ = an_instance.current_publisher_effort; - ACE_High_Res_Timer::gettimeofday_hr ().to_usec (this->first_time_); - } - if( an_instance.command == THROUGHPUT_COMMAND_COMPLETE) - { - this->log_ = false; - ACE_UINT64 last_time; - ACE_High_Res_Timer::gettimeofday_hr ().to_usec (last_time); - this->interval_time_ = (last_time - this->first_time_); - ++this->run_; - this->show_results(); - } + if (an_instance.command == THROUGHPUT_COMMAND_START) + { + this->log_ = true; + this->reset_results(); + this->interval_data_length_ = an_instance.data_length; + this->demand_ = an_instance.current_publisher_effort; + ACE_High_Res_Timer::gettimeofday_hr ().to_usec (this->first_time_); + } + if (an_instance.command == THROUGHPUT_COMMAND_COMPLETE) + { + this->log_ = false; + ACE_UINT64 last_time; + ACE_High_Res_Timer::gettimeofday_hr ().to_usec (last_time); + this->interval_time_ = (last_time - this->first_time_); + ++this->run_; + this->show_results(); + } } void @@ -131,7 +132,7 @@ namespace CIAO_Throughput_Receiver_Impl { ++this->count_; // total count of all received messages - if(this->log_.value()) + if (this->log_.value ()) { ++this->interval_messages_received_; this->interval_bytes_received_ += this->interval_data_length_; @@ -170,7 +171,7 @@ namespace CIAO_Throughput_Receiver_Impl } } - ::CCM_DDS::ThroughputTest::CCM_Listener_ptr + ::Throughput::ThroughputTestConn::CCM_Listener_ptr Receiver_exec_i::get_info_listen_data_listener (void) { return new ThroughputTest_Listener_exec_i (*this); @@ -182,7 +183,7 @@ namespace CIAO_Throughput_Receiver_Impl return ::CCM_DDS::CCM_PortStatusListener::_nil (); } - ::CCM_DDS::ThroughputCommand::CCM_Listener_ptr + ::Throughput::ThroughputCommandConn::CCM_Listener_ptr Receiver_exec_i::get_command_listen_data_listener (void) { return new ThroughputCommand_Listener_exec_i (*this); @@ -228,8 +229,8 @@ namespace CIAO_Throughput_Receiver_Impl } else { - ACE_DEBUG((LM_DEBUG, "SUMMARY RECEIVER:\n " - "No samples received\n ")); + ACE_ERROR ((LM_ERROR, "ERROR RECEIVER: " + "No samples received\n")); } } diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.h b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.h index a5cd941b6e4..f758eabfc54 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.h +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Receiver/Throughput_Receiver_exec.h @@ -25,7 +25,7 @@ namespace CIAO_Throughput_Receiver_Impl // ThroughputTest_Listener_exec_i //============================================================ class RECEIVER_EXEC_Export ThroughputTest_Listener_exec_i - : public virtual ::CCM_DDS::ThroughputTest::CCM_Listener, + : public virtual ::Throughput::ThroughputTestConn::CCM_Listener, public virtual ::CORBA::LocalObject { public: @@ -48,7 +48,7 @@ namespace CIAO_Throughput_Receiver_Impl // ThroughputCommand_Listener_exec_i //============================================================ class RECEIVER_EXEC_Export ThroughputCommand_Listener_exec_i - : public virtual ::CCM_DDS::ThroughputCommand::CCM_Listener, + : public virtual ::Throughput::ThroughputCommandConn::CCM_Listener, public virtual ::CORBA::LocalObject { public: @@ -84,13 +84,13 @@ namespace CIAO_Throughput_Receiver_Impl void handle_run (ThroughputCommand & an_instance); void show_results (void); - virtual ::CCM_DDS::ThroughputTest::CCM_Listener_ptr + virtual ::Throughput::ThroughputTestConn::CCM_Listener_ptr get_info_listen_data_listener (void); virtual ::CCM_DDS::CCM_PortStatusListener_ptr get_info_listen_status (void); - virtual ::CCM_DDS::ThroughputCommand::CCM_Listener_ptr + virtual ::Throughput::ThroughputCommandConn::CCM_Listener_ptr get_command_listen_data_listener (void); virtual ::CCM_DDS::CCM_PortStatusListener_ptr diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/SecConnector/Throughput_Sec_Connector.idl b/CIAO/connectors/dds4ccm/performance-tests/Throughput/SecConnector/Throughput_Sec_Connector.idl index 1416c4049d2..0ec6de8e1c8 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/SecConnector/Throughput_Sec_Connector.idl +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/SecConnector/Throughput_Sec_Connector.idl @@ -16,14 +16,10 @@ #pragma ciao lem "SecConnector/Throughput_Sec_ConnectorE.idl" -module CCM_DDS -{ - module ::CCM_DDS::Typed < ::ThroughputCommand, ::ThroughputCommandSeq> ThroughputCommand; -}; - module Throughput { - connector Throughput_Sec_Connector : ::CCM_DDS::ThroughputCommand::DDS_Event + module ::CCM_DDS::Typed < ::ThroughputCommand, ::ThroughputCommandSeq> ThroughputCommandConn; + connector Throughput_Sec_Connector : ThroughputCommandConn::DDS_Event { }; }; diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender.idl b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender.idl index fffaec9df29..53e2a5f83fd 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender.idl +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender.idl @@ -17,15 +17,17 @@ module Throughput { component Sender { - port CCM_DDS::ThroughputTest::DDS_Write info_write; - port CCM_DDS::ThroughputCommand::DDS_Write command_write; + port ThroughputTestConn::DDS_Write info_write; + port ThroughputCommandConn::DDS_Write command_write; + + provides CCM_DDS::ConnectorStatusListener connector_status; + attribute unsigned long start_load; attribute unsigned long incr_load; attribute unsigned long long max_load; attribute unsigned short recover_time; attribute unsigned short datalen; //minimal 24 attribute unsigned short number_of_sub; //number of subscribers - provides CCM_DDS::ConnectorStatusListener connector_status; }; }; diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.cpp b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.cpp index 6b66800715c..4c8a63e6e32 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.cpp @@ -61,8 +61,8 @@ namespace CIAO_Throughput_Sender_Impl ::DDS::Entity_ptr the_entity, ::DDS::StatusKind status_kind) { - if((!CORBA::is_nil(the_entity)) && - (status_kind == DDS::PUBLICATION_MATCHED_STATUS)) + if (!CORBA::is_nil (the_entity) && + status_kind == DDS::PUBLICATION_MATCHED_STATUS) { ::DDS::PublicationMatchedStatus_var stat; DDS::DataWriter_var wr = ::DDS::DataWriter::_narrow(the_entity); @@ -74,7 +74,7 @@ namespace CIAO_Throughput_Sender_Impl wr->get_publication_matched_status(stat.out()); if (retval == DDS::RETCODE_OK) { - if (stat.in ().current_count >= this->number_of_subscribers_ + 1 && + if (stat.in ().current_count >= this->number_of_subscribers_ && !this->started_.value ()) { ACE_DEBUG ((LM_DEBUG, "ConnectorStatusListener_exec_i::on_unexpected_status - " @@ -345,8 +345,8 @@ namespace CIAO_Throughput_Sender_Impl Sender_exec_i::datalen (::CORBA::UShort datalen) { this->overhead_size_ = sizeof(CORBA::ULong) + sizeof(CORBA::ULongLong); - if((datalen <= this->overhead_size_) || - (datalen > MAX_DATA_SEQUENCE_LENGTH)) + if (datalen <= this->overhead_size_ || + datalen > MAX_DATA_SEQUENCE_LENGTH) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: datalen has to be bigger" @@ -378,10 +378,10 @@ namespace CIAO_Throughput_Sender_Impl this->writer_ = this->context_->get_connection_info_write_data (); this->cmd_writer_ = this->context_->get_connection_command_write_data (); - if(CORBA::is_nil(this->writer_)) - { - throw ::CORBA::INTERNAL (); - } + if(CORBA::is_nil (this->writer_.in ())) + { + throw ::CORBA::INTERNAL (); + } } catch (const CORBA::Exception& ex) { @@ -411,11 +411,11 @@ namespace CIAO_Throughput_Sender_Impl Sender_exec_i::stop (void) { if (this->ticker_) - { - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); - delete this->ticker_; - this->ticker_ = 0; - } + { + this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + delete this->ticker_; + this->ticker_ = 0; + } } void @@ -427,8 +427,16 @@ namespace CIAO_Throughput_Sender_Impl void Sender_exec_i::ccm_remove (void) { - ACE_DEBUG ((LM_DEBUG, "SUMMARY SENDER number of messages sent: %u\n", - (this->number_of_msg_))); + if (this->number_of_msg_ == 0) + { + ACE_ERROR ((LM_ERROR, "ERROR SENDER: No messages " + "sent during test.\n")); + } + else + { + ACE_DEBUG ((LM_DEBUG, "SUMMARY SENDER number of messages sent: %u\n", + this->number_of_msg_)); + } } extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr diff --git a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.h b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.h index 699bd428f72..c22b75926d3 100644 --- a/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.h +++ b/CIAO/connectors/dds4ccm/performance-tests/Throughput/Sender/Throughput_Sender_exec.h @@ -111,8 +111,8 @@ namespace CIAO_Throughput_Sender_Impl private: ::Throughput::CCM_Sender_Context_var context_; - CCM_DDS::ThroughputTest::Writer_var writer_; - CCM_DDS::ThroughputCommand::Writer_var cmd_writer_; + ::Throughput::ThroughputTestConn::Writer_var writer_; + ::Throughput::ThroughputCommandConn::Writer_var cmd_writer_; WriteTicker *ticker_; |