GNUnet 0.21.0
GSF_PeerPerformanceData Struct Reference

Performance data kept for a peer. More...

#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/service/fs/gnunet-service-fs_cp.h>

Collaboration diagram for GSF_PeerPerformanceData:
[legend]

Data Fields

struct GSF_LocalClientlast_client_replies [8]
 List of the last clients for which this peer successfully answered a query. More...
 
GNUNET_PEER_Id last_p2p_replies [8]
 List of the last PIDs for which this peer successfully answered a query; We use 0 to indicate no successful reply. More...
 
struct GNUNET_TIME_Relative avg_reply_delay
 Average delay between sending the peer a request and getting a reply (only calculated over the requests for which we actually got a reply). More...
 
struct GNUNET_TIME_Relative migration_delay
 If we get content we already have from this peer, for how long do we block it? Adjusted based on the fraction of redundant data we receive, between 1s and 1h. More...
 
struct GNUNET_TIME_Absolute migration_blocked_until
 Point in time until which this peer does not want us to migrate content to it. More...
 
struct GNUNET_TIME_Absolute last_request_times [24]
 Transmission times for the last MAX_QUEUE_PER_PEER requests for this peer. More...
 
struct GNUNET_LOAD_Valuetransmission_delay
 How long does it typically take for us to transmit a message to this peer? (delay between the request being issued and the callback being invoked). More...
 
double avg_priority
 Average priority of successful replies. More...
 
GNUNET_PEER_Id pid
 The peer's identity (interned version). More...
 
const struct GNUNET_PeerIdentitypeer
 The peer's identity (pointer). More...
 
uint32_t respect
 Respect rating for this peer. More...
 
unsigned int pending_queries
 Number of pending queries (replies are not counted) More...
 
unsigned int pending_replies
 Number of pending replies (queries are not counted) More...
 

Detailed Description

Performance data kept for a peer.

Definition at line 63 of file gnunet-service-fs_cp.h.

Field Documentation

◆ last_client_replies

struct GSF_LocalClient* GSF_PeerPerformanceData::last_client_replies[8]

List of the last clients for which this peer successfully answered a query.

Definition at line 69 of file gnunet-service-fs_cp.h.

Referenced by clean_local_client(), and GSF_peer_update_responder_client_().

◆ last_p2p_replies

GNUNET_PEER_Id GSF_PeerPerformanceData::last_p2p_replies[8]

List of the last PIDs for which this peer successfully answered a query; We use 0 to indicate no successful reply.

Definition at line 76 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_disconnect_handler(), and GSF_peer_update_responder_peer_().

◆ avg_reply_delay

struct GNUNET_TIME_Relative GSF_PeerPerformanceData::avg_reply_delay

Average delay between sending the peer a request and getting a reply (only calculated over the requests for which we actually got a reply).

Calculated as a moving average: new_delay = ((n-1)*last_delay+curr_delay) / n

Definition at line 84 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_update_performance_().

◆ migration_delay

struct GNUNET_TIME_Relative GSF_PeerPerformanceData::migration_delay

If we get content we already have from this peer, for how long do we block it? Adjusted based on the fraction of redundant data we receive, between 1s and 1h.

Definition at line 91 of file gnunet-service-fs_cp.h.

Referenced by put_migration_continuation().

◆ migration_blocked_until

struct GNUNET_TIME_Absolute GSF_PeerPerformanceData::migration_blocked_until

Point in time until which this peer does not want us to migrate content to it.

Definition at line 97 of file gnunet-service-fs_cp.h.

Referenced by handle_p2p_migration_stop(), and revive_migration().

◆ last_request_times

struct GNUNET_TIME_Absolute GSF_PeerPerformanceData::last_request_times[24]

Transmission times for the last MAX_QUEUE_PER_PEER requests for this peer.

Used as a ring buffer, current offset is stored in 'last_request_times_off'. If the oldest entry is more recent than the 'avg_delay', we should not send any more requests right now.

Definition at line 106 of file gnunet-service-fs_cp.h.

Referenced by peer_transmit().

◆ transmission_delay

struct GNUNET_LOAD_Value* GSF_PeerPerformanceData::transmission_delay

How long does it typically take for us to transmit a message to this peer? (delay between the request being issued and the callback being invoked).

Definition at line 113 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_connect_handler(), GSF_peer_disconnect_handler(), GSF_update_peer_latency_(), handle_p2p_get(), and peer_transmit().

◆ avg_priority

double GSF_PeerPerformanceData::avg_priority

Average priority of successful replies.

Calculated as a moving average: new_avg = ((n-1)*last_avg+curr_prio) / n

Definition at line 119 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_update_performance_().

◆ pid

◆ peer

const struct GNUNET_PeerIdentity* GSF_PeerPerformanceData::peer

The peer's identity (pointer).

Definition at line 129 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_connect_handler(), handle_p2p_get(), and handle_p2p_migration_stop().

◆ respect

uint32_t GSF_PeerPerformanceData::respect

Respect rating for this peer.

Definition at line 134 of file gnunet-service-fs_cp.h.

Referenced by change_peer_respect(), flush_respect(), handle_p2p_put(), and peer_respect_cb().

◆ pending_queries

unsigned int GSF_PeerPerformanceData::pending_queries

Number of pending queries (replies are not counted)

Definition at line 139 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_disconnect_handler(), GSF_peer_transmit_(), and peer_transmit().

◆ pending_replies

unsigned int GSF_PeerPerformanceData::pending_replies

Number of pending replies (queries are not counted)

Definition at line 144 of file gnunet-service-fs_cp.h.

Referenced by GSF_peer_disconnect_handler(), GSF_peer_transmit_(), handle_p2p_get(), and peer_transmit().


The documentation for this struct was generated from the following file: