Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16328] Set FASTDDS_STATISTICS CMake option to ON #3135

Merged
merged 6 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ endif()
###############################################################################
# Fast DDS statistics tool default setup
###############################################################################
option(FASTDDS_STATISTICS "Enable Fast DDS Statistics Module" OFF)
option(FASTDDS_STATISTICS "Enable Fast DDS Statistics Module" ON)

###############################################################################
# Compile library.
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/participant/RTPSParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ bool RTPSParticipantImpl::createReceiverResources(
while (!ret && (tries < m_att.builtin.mutation_tries))
{
tries++;
*it_loc = applyLocatorAdaptRule(*it_loc);
applyLocatorAdaptRule(*it_loc);
ret = m_network_Factory.BuildReceiverResources(*it_loc, newItemsBuffer, max_receiver_buffer_size);
}
}
Expand Down
11 changes: 4 additions & 7 deletions src/cpp/statistics/rtps/StatisticsBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
#include <fastrtps/qos/ParameterTypes.h>
#include <rtps/participant/RTPSParticipantImpl.h>

using namespace eprosima::fastdds::statistics;
using eprosima::fastrtps::rtps::RTPSParticipantImpl;

namespace eprosima {
namespace fastdds {
namespace statistics {
Expand Down Expand Up @@ -90,10 +87,6 @@ detail::SampleIdentity_s to_statistics_type(
return *reinterpret_cast<detail::SampleIdentity_s*>(&sample_id);
}

} // statistics
} // fastdds
} // eprosima

StatisticsAncillary* StatisticsListenersImpl::get_aux_members() const
{
return members_.get();
Expand Down Expand Up @@ -644,3 +637,7 @@ void StatisticsParticipantImpl::on_edp_packet(
listener->on_statistics_data(data);
});
}

} // statistics
} // fastdds
} // eprosima
10 changes: 8 additions & 2 deletions src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
#include <fastdds/rtps/reader/RTPSReader.h>
#include <statistics/types/types.h>

using namespace eprosima::fastdds::statistics;

using eprosima::fastrtps::RecursiveTimedMutex;
using eprosima::fastrtps::rtps::RTPSReader;
using eprosima::fastrtps::rtps::GUID_t;

namespace eprosima {
namespace fastdds {
namespace statistics {

StatisticsReaderImpl::StatisticsReaderImpl()
{
init_statistics<StatisticsReaderAncillary>();
Expand Down Expand Up @@ -176,3 +178,7 @@ void StatisticsReaderImpl::on_subscribe_throughput(
});
}
}

} // namespace statistics
} // namespace fastdds
} // namespace eprosima
10 changes: 8 additions & 2 deletions src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
#include <fastdds/rtps/writer/RTPSWriter.h>
#include <statistics/types/types.h>

using namespace eprosima::fastdds::statistics;

using eprosima::fastrtps::RecursiveTimedMutex;
using eprosima::fastrtps::rtps::RTPSWriter;
using eprosima::fastrtps::rtps::GUID_t;

namespace eprosima {
namespace fastdds {
namespace statistics {

StatisticsWriterImpl::StatisticsWriterImpl()
{
init_statistics<StatisticsWriterAncillary>();
Expand Down Expand Up @@ -241,3 +243,7 @@ void StatisticsWriterImpl::on_publish_throughput(
});
}
}

} // namespace statistics
} // namespace fastdds
} // namespace eprosima
1 change: 1 addition & 0 deletions test/blackbox/api/dds-pim/PubSubParticipant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ class PubSubParticipant

if (participant_ != nullptr)
{
participant_qos_ = participant_->get_qos();
type_.reset(new type_support());
participant_->register_type(type_);
return true;
Expand Down
1 change: 0 additions & 1 deletion test/unittest/statistics/dds/StatisticsQosTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#ifdef FASTDDS_STATISTICS
#include <statistics/fastdds/domain/DomainParticipantImpl.hpp>
#include <statistics/fastdds/publisher/PublisherImpl.hpp>
#endif // ifdef FASTDDS_STATISTICS

namespace eprosima {
Expand Down
1 change: 1 addition & 0 deletions versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Forthcoming
* Statistics metrics are only calculated/accumulated when their corresponding DataWriter is enabled (behaviour change)
* Added new log macros `EPROSIMA_LOG_INFO`, `EPROSIMA_LOG_WARNING` and `EPROSIMA_LOG_ERROR`, and change all old macros `logInfo`, `logWarning`, and `logError` in the project.
* Added `ENABLE_OLD_LOG_MACROS` CMake option to support disabling the compilation of old log macros `logInfo`, `logWarning`, and `logError`.
* FASTDDS_STATISTICS build option set to ON by default

Version 2.8.0
-------------
Expand Down