18#include <catch2/catch_amalgamated.hpp>
23 YARP_REQUIRE_PLUGIN(
"stats_monitor",
"portmonitor")
24 YARP_REQUIRE_PLUGIN(
"throttleDown",
"portmonitor")
34 std::string s1 =
"/stats_monitor/send/recv/stats:o";
35 std::string s2 =
"/stats_monitor/recv/send/stats:o";
37 SECTION(
"Test that normally the portmonitor is not used")
43 receiver.
open(
"/recv");
63 SECTION(
"Test standard usage of stats_monitor")
69 receiver.
open(
"/recv");
89 SECTION(
"Test usage of environment variable YARP_CONNECTIONS_STATS_ENABLE")
97 receiver.
open(
"/recv");
119 SECTION(
"Test multiple monitors concatenation using environment variable")
126 sender.
open(
"/send");
127 receiver.
open(
"/recv");
149 SECTION(
"Test multiple monitors concatenation (send version)")
154 sender.
open(
"/send");
155 receiver.
open(
"/recv");
157 yarp::os::Network::connect(
"/send",
"/recv",
"tcp+send.portmonitor+type.dll+file.throttleDown+period_ms.500+file1.stats_monitor+type1.dll");
static Carrier * getCarrierTemplate(const std::string &name)
Get template for carrier.
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
static bool exists(const std::string &port, bool quiet=true, bool checkVer=true)
Check for a port to be ready and responsive.
static bool setLocalMode(bool flag)
Chooses whether communication is process-local.
Utilities for manipulating the YARP network, including initialization and shutdown.
A mini-server for network communication.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
bool set_bool(const std::string &key, bool value)
Set a bool to an environment variable (as 1 or 0).
bool unset(const std::string &key)
Remove an environment variable.
void delay(double seconds)
Wait for a certain number of seconds.
The main, catch-all namespace for YARP.
TEST_CASE("pm::stats_monitorTest", "[yarp::pm]")