mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
collect and save participation agreed/declined stats
This commit is contained in:
parent
f8a7beb001
commit
fd3dab35cc
6 changed files with 90 additions and 9 deletions
15
Profiling.h
15
Profiling.h
|
@ -7,12 +7,23 @@
|
|||
namespace i2p
|
||||
{
|
||||
namespace data
|
||||
{
|
||||
{
|
||||
const char PEER_PROFILES_DIRECTORY[] = "peerProfiles";
|
||||
const char PEER_PROFILE_PREFIX[] = "profile-";
|
||||
// sections
|
||||
const char PEER_PROFILE_SECTION_PARTICIPATION[] = "participation";
|
||||
// params
|
||||
const char PEER_PROFILE_PARTICIPATION_AGREED[] = "agreed";
|
||||
const char PEER_PROFILE_PARTICIPATION_DECLINED[] = "declined";
|
||||
|
||||
class RouterProfile
|
||||
{
|
||||
public:
|
||||
|
||||
RouterProfile (const IdentHash& identHash);
|
||||
void Save ();
|
||||
|
||||
void TunnelBuildResponse (uint8_t ret);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -22,7 +33,7 @@ namespace data
|
|||
uint32_t m_NumTunnelsDeclined;
|
||||
};
|
||||
|
||||
std::shared_ptr<RouterProfile> GetProfile (const IdentHash& identHash);
|
||||
std::shared_ptr<RouterProfile> GetRouterProfile (const IdentHash& identHash);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue