Clean up remote tracing code, add per-network remote trace settings, add remote trace level, and make local trace output readable again.
This commit is contained in:
parent
c26bf45e28
commit
16613ab5fb
11 changed files with 474 additions and 248 deletions
|
@ -61,7 +61,8 @@ Node::Node(void *uptr,void *tptr,const struct ZT_Node_Callbacks *callbacks,int64
|
|||
_networks(8),
|
||||
_now(now),
|
||||
_lastPingCheck(0),
|
||||
_lastHousekeepingRun(0)
|
||||
_lastHousekeepingRun(0),
|
||||
_lastMemoizedTraceSettings(0)
|
||||
{
|
||||
if (callbacks->version != 0)
|
||||
throw ZT_EXCEPTION_INVALID_ARGUMENT;
|
||||
|
@ -299,6 +300,11 @@ ZT_ResultCode Node::processBackgroundTasks(void *tptr,int64_t now,volatile int64
|
|||
timeUntilNextPingCheck -= (unsigned long)timeSinceLastPingCheck;
|
||||
}
|
||||
|
||||
if ((now - _lastMemoizedTraceSettings) >= 10000) {
|
||||
_lastMemoizedTraceSettings = now;
|
||||
RR->t->updateMemoizedSettings();
|
||||
}
|
||||
|
||||
if ((now - _lastHousekeepingRun) >= ZT_HOUSEKEEPING_PERIOD) {
|
||||
_lastHousekeepingRun = now;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue