make profiling far stricter for path builds

This commit is contained in:
Jeff Becker 2021-05-04 17:01:29 -04:00
parent 26e182955c
commit 955071ba5c
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 6 additions and 3 deletions

View File

@ -50,17 +50,20 @@ namespace llarp
{
Profiling();
inline static const int profiling_chances = 4;
/// generic variant
bool
IsBad(const RouterID& r, uint64_t chances = 8) EXCLUDES(m_ProfilesMutex);
IsBad(const RouterID& r, uint64_t chances = profiling_chances) EXCLUDES(m_ProfilesMutex);
/// check if this router should have paths built over it
bool
IsBadForPath(const RouterID& r, uint64_t chances = 8) EXCLUDES(m_ProfilesMutex);
IsBadForPath(const RouterID& r, uint64_t chances = profiling_chances) EXCLUDES(m_ProfilesMutex);
/// check if this router should be connected directly to
bool
IsBadForConnect(const RouterID& r, uint64_t chances = 8) EXCLUDES(m_ProfilesMutex);
IsBadForConnect(const RouterID& r, uint64_t chances = profiling_chances)
EXCLUDES(m_ProfilesMutex);
void
MarkConnectTimeout(const RouterID& r) EXCLUDES(m_ProfilesMutex);