mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-22 23:10:38 +00:00
Add timing instrumentation to jobs() table cull cycle
This commit is contained in:
1 parent
e93e71dc69
commit
9d6bbac9a6
1 file changed
+10
@@ -460,11 +460,14 @@ Transport::DestinationEntry empty_destination_entry;
|
||||
}
|
||||
|
||||
if (OS::time() > (_tables_last_culled + _tables_cull_interval)) {
|
||||
unsigned long _tc0 = millis();
|
||||
|
||||
// Deferred culls: run here instead of per-packet to avoid
|
||||
// O(n log n) sorting on every inbound announce.
|
||||
Identity::deferred_cull_known_destinations();
|
||||
unsigned long _tc1 = millis();
|
||||
cull_announce_table();
|
||||
unsigned long _tc2 = millis();
|
||||
|
||||
// CBA Disabled following since we're calling immediately after adding to path table now
|
||||
// Cull the path table if it has reached its max size
|
||||
@@ -679,9 +682,16 @@ Transport::DestinationEntry empty_destination_entry;
|
||||
ERRORF("jobs: failed to cull tunnel table: %s", e.what());
|
||||
}
|
||||
|
||||
unsigned long _tc3 = millis();
|
||||
|
||||
//#ifndef NDEBUG
|
||||
dump_stats();
|
||||
//#endif
|
||||
unsigned long _tc4 = millis();
|
||||
if ((_tc4 - _tc0) > 100) {
|
||||
Serial.printf("[JOBS-TIMING] cull_kd=%lums cull_at=%lums tables=%lums stats=%lums TOTAL=%lums\n",
|
||||
_tc1 - _tc0, _tc2 - _tc1, _tc3 - _tc2, _tc4 - _tc3, _tc4 - _tc0);
|
||||
}
|
||||
|
||||
_tables_last_culled = OS::time();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user