mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'tor-gitlab/mr/336'
This commit is contained in:
commit
7d9403b422
4
changes/ticket40314
Normal file
4
changes/ticket40314
Normal file
@ -0,0 +1,4 @@
|
||||
o Minor feature (Vote document):
|
||||
- Add the "stats" line in a directory authority vote in order to report
|
||||
various statistics that the authority has computed for the relays. This
|
||||
will help us diagnose better the network. Close ticket 40314.
|
@ -15,11 +15,11 @@
|
||||
#include "feature/nodelist/fmt_routerstatus.h"
|
||||
|
||||
#include "core/or/policies.h"
|
||||
#include "feature/nodelist/routerlist.h"
|
||||
#include "feature/dirauth/dirvote.h"
|
||||
|
||||
#include "feature/nodelist/routerinfo_st.h"
|
||||
#include "feature/nodelist/routerlist.h"
|
||||
#include "feature/nodelist/vote_routerstatus_st.h"
|
||||
#include "feature/stats/rephist.h"
|
||||
|
||||
#include "lib/crypt_ops/crypto_format.h"
|
||||
|
||||
@ -195,6 +195,15 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
|
||||
digest256_to_base64(ed_b64, (const char*)vrs->ed25519_id);
|
||||
smartlist_add_asprintf(chunks, "id ed25519 %s\n", ed_b64);
|
||||
}
|
||||
|
||||
/* We'll add a series of statistics to the vote per relays so we are
|
||||
* able to assess what each authorities sees and help our health and
|
||||
* performance work. */
|
||||
time_t now = time(NULL);
|
||||
smartlist_add_asprintf(chunks, "stats wfu=%.6f tk=%lu mtbf=%.0f\n",
|
||||
rep_hist_get_weighted_fractional_uptime(rs->identity_digest, now),
|
||||
rep_hist_get_weighted_time_known(rs->identity_digest, now),
|
||||
rep_hist_get_stability(rs->identity_digest, now));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user