Mercurial > hg > freeDiameter
diff libfdcore/fdcore-internal.h @ 1240:0420ccc4671a
Add a counter for the sent requests for which we did not wait for an answer. It might be relevant this value contributes to the load estimate of the remote peer, but it is not very reliable
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Thu, 10 Oct 2013 16:30:55 +0200 |
parents | 8f9684264fe0 |
children | 239ba25870d8 |
line wrap: on
line diff
--- a/libfdcore/fdcore-internal.h Thu Oct 10 16:19:23 2013 +0200 +++ b/libfdcore/fdcore-internal.h Thu Oct 10 16:30:55 2013 +0200 @@ -129,6 +129,8 @@ struct fd_list srs; /* requests ordered by hop-by-hop id */ struct fd_list exp; /* requests that have a timeout set, ordered by timeout */ long cnt; /* number of requests in the srs list */ + long cnt_lost; /* number of requests that have not been answered in time. + It is decremented when an unexpected answer is received, so this may not be accurate. */ pthread_mutex_t mtx; /* mutex to protect these lists */ pthread_cond_t cnd; /* cond var used by the thread that handles timeouts */ pthread_t thr; /* the thread that handles timeouts (expirecb called in separate forked threads) */