Skip to content

Commit

Permalink
log probeId in PROBING_REPORT messages
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Oct 3, 2024
1 parent 82455e4 commit 3f7ffbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Jerboa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ export class Jerboa {
const nodes = this.getOutgoingLinks();
if (nodes.length === 0) {
if (process.env.PROBING_REPORT) {
console.log('finished ', [], [this.name, nackSender].concat(debugInfo.backtracked));
console.log(`finished (${probeId})`, [], [this.name, nackSender].concat(debugInfo.backtracked));
}
} else {
if (process.env.PROBING_REPORT) {
console.log('backtracked', [ this.name ], [nackSender].concat(debugInfo.backtracked));
console.log(`backtracked (${probeId})`, [ this.name ], [nackSender].concat(debugInfo.backtracked));
}
const newStep = randomStringFromArray(nodes);
// console.log(`${this.name} sends probe message to ${newStep} for probeId ${probeId} after receiving nack from ${nackSender}`);
Expand All @@ -345,7 +345,7 @@ export class Jerboa {
// }
// console.log(`Found loop`, loop, ` pos ${pos}`);
if (process.env.PROBING_REPORT) {
console.log(`found loop `, path, loop);
console.log(`found loop (${probeId})`, path, loop);
}
return true;
}
Expand Down Expand Up @@ -406,7 +406,7 @@ export class Jerboa {
return;
} else if (debugInfo.backtracked.length > 0) {
if (process.env.PROBING_REPORT) {
console.log(`backtracked`, debugInfo.path.concat([sender, this.name]), debugInfo.backtracked);
console.log(`backtracked (${probeId})`, debugInfo.path.concat([sender, this.name]), debugInfo.backtracked);
}
}
// console.log(' did we print?', sender, this.name, path, backtracked);
Expand Down

0 comments on commit 3f7ffbc

Please sign in to comment.