-/**
- * Information about a benchmarking partner
- */
-struct BenchmarkPartner
-{
- /**
- * The peer itself this partner belongs to
- */
- struct BenchmarkPeer *me;
-
- /**
- * The partner peer
- */
- struct BenchmarkPeer *dest;
-
- /**
- * Core transmit handles
- */
- struct GNUNET_CORE_TransmitHandle *cth;
-
- /**
- * Transport transmit handles
- */
- struct GNUNET_TRANSPORT_TransmitHandle *tth;
-
- /**
- * Number of messages sent to this partner
- */
- unsigned int messages_sent;
-
- /**
- * Number of bytes sent to this partner
- */
- unsigned int bytes_sent;
-
- /**
- * Number of messages received from this partner
- */
- unsigned int messages_received;
-
- /**
- * Number of bytes received from this partner
- */
- unsigned int bytes_received;
-};
-
-/**
- * Connect peers with testbed
- */
-struct TestbedConnectOperation
-{
- /**
- * The benchmarking master initiating this connection
- */
- struct BenchmarkPeer *master;
-
- /**
- * The benchmarking slave to connect to
- */
- struct BenchmarkPeer *slave;
-
- /**
- * Testbed operation to connect peers
- */
- struct GNUNET_TESTBED_Operation *connect_op;
-};
-
-/**
- * Information we track for a peer in the testbed.
- */
-struct BenchmarkPeer
-{
- /**
- * Handle with testbed.
- */
- struct GNUNET_TESTBED_Peer *peer;
-
- /**
- * Unique identifier
- */
- int no;
-
- /**
- * Is this peer a measter: GNUNET_YES/GNUNET_NO
- */
- int master;
-
- /**
- * Peer ID
- */
- struct GNUNET_PeerIdentity id;
-
- /**
- * Testbed operation to get peer information
- */
- struct GNUNET_TESTBED_Operation *peer_id_op;
-
- /**
- * Testbed operation to connect to ATS performance service
- */
- struct GNUNET_TESTBED_Operation *ats_perf_op;
-
- /**
- * Testbed operation to connect to core
- */
- struct GNUNET_TESTBED_Operation *comm_op;
-
- /**
- * ATS performance handle
- */
- struct GNUNET_ATS_PerformanceHandle *ats_perf_handle;
-
- /**
- * Masters only:
- * Testbed connect operations to connect masters to slaves
- */
- struct TestbedConnectOperation *core_connect_ops;
-
- /**
- * Core handle
- */
- struct GNUNET_CORE_Handle *ch;
-
- /**
- * Core handle
- */
- struct GNUNET_TRANSPORT_Handle *th;
-
- /**
- * Masters only:
- * Peer to set ATS preferences for
- */
- struct BenchmarkPeer *pref_partner;
-
- /**
- * Masters only
- * Progress task
- */
- GNUNET_SCHEDULER_TaskIdentifier ats_task;
-
- /**
- * Masters only
- * Progress task
- */
- double pref_value;
-
- /**
- * Array of partners with num_slaves entries (if master) or
- * num_master entries (if slave)
- */
- struct BenchmarkPartner *partners;
-
- /**
- * Number of core connections
- */
- int core_connections;
-
- /**
- * Masters only:
- * Number of connections to slave peers
- */
- int core_slave_connections;
-
- /**
- * Total number of messages this peer has sent
- */
- unsigned int total_messages_sent;
-
- /**
- * Total number of bytes this peer has sent
- */
- unsigned int total_bytes_sent;
-
- /**
- * Total number of messages this peer has received
- */
- unsigned int total_messages_received;
-
- /**
- * Total number of bytes this peer has received
- */
- unsigned int total_bytes_received;
-};
-
-/**
- * Overall state of the performance benchmark
- */
-struct BenchmarkState
-{
- /* Are we connected to ATS service of all peers: GNUNET_YES/NO */
- int connected_ATS_service;
-
- /* Are we connected to CORE service of all peers: GNUNET_YES/NO */
- int connected_COMM_service;
-
- /* Are we connected to all peers: GNUNET_YES/NO */
- int connected_PEERS;
-
- /* Are we connected to all slave peers on CORE level: GNUNET_YES/NO */
- int connected_CORE;
-
- /* Are we connected to CORE service of all peers: GNUNET_YES/NO */
- int benchmarking;
-};
-