mirror of https://github.com/PurpleI2P/i2pd
Profiling added
parent
3f4bd13091
commit
a6f78134c0
@ -0,0 +1,19 @@
|
|||||||
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
#include <boost/property_tree/ini_parser.hpp>
|
||||||
|
#include "Profiling.h"
|
||||||
|
|
||||||
|
namespace i2p
|
||||||
|
{
|
||||||
|
namespace data
|
||||||
|
{
|
||||||
|
RouterProfile::RouterProfile (const IdentHash& identHash):
|
||||||
|
m_IdentHash (identHash), m_NumTunnelsAgreed (0), m_NumTunnelsDeclined (0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<RouterProfile> GetProfile (const IdentHash& identHash)
|
||||||
|
{
|
||||||
|
return std::make_shared<RouterProfile> (identHash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef PROFILING_H__
|
||||||
|
#define PROFILING_H__
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include "Identity.h"
|
||||||
|
|
||||||
|
namespace i2p
|
||||||
|
{
|
||||||
|
namespace data
|
||||||
|
{
|
||||||
|
class RouterProfile
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
RouterProfile (const IdentHash& identHash);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
IdentHash m_IdentHash;
|
||||||
|
// participation
|
||||||
|
uint32_t m_NumTunnelsAgreed;
|
||||||
|
uint32_t m_NumTunnelsDeclined;
|
||||||
|
};
|
||||||
|
|
||||||
|
std::shared_ptr<RouterProfile> GetProfile (const IdentHash& identHash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue