mirror of
https://github.com/nmap/nmap.git
synced 2025-12-25 08:59:01 +00:00
Avoid a few extra gettimeofday calls
This commit is contained in:
@@ -2519,9 +2519,11 @@ static void printAnyStats(UltraScanInfo *USI) {
|
||||
const HostScanStats *hss;
|
||||
struct ultra_timing_vals hosttm;
|
||||
|
||||
gettimeofday(&USI->now, NULL);
|
||||
|
||||
/* Print debugging states for each host being scanned */
|
||||
if (o.debugging > 2) {
|
||||
log_write(LOG_PLAIN, "**TIMING STATS** (%.4fs): IP, probes active/freshportsleft/retry_stack/outstanding/retranwait/onbench, cwnd/ssthresh/delay, timeout/srtt/rttvar/\n", o.TimeSinceStart());
|
||||
log_write(LOG_PLAIN, "**TIMING STATS** (%.4fs): IP, probes active/freshportsleft/retry_stack/outstanding/retranwait/onbench, cwnd/ssthresh/delay, timeout/srtt/rttvar/\n", o.TimeSinceStart(&USI->now));
|
||||
log_write(LOG_PLAIN, " Groupstats (%d/%d incomplete): %d/*/*/*/*/* %.2f/%d/* %d/%d/%d\n",
|
||||
USI->numIncompleteHosts(), USI->numInitialHosts(),
|
||||
USI->gstats->num_probes_active, USI->gstats->timing.cwnd,
|
||||
@@ -2794,11 +2796,9 @@ void ultra_scan(std::vector<Target *> &Targets, const struct scan_lists *ports,
|
||||
memory consumption reasons */
|
||||
doAnyRetryStackRetransmits(&USI);
|
||||
doAnyNewProbes(&USI);
|
||||
gettimeofday(&USI.now, NULL);
|
||||
// printf("TRACE: Finished doAnyNewProbes() at %.4fs\n", o.TimeSinceStartMS(&USI.now) / 1000.0);
|
||||
printAnyStats(&USI);
|
||||
waitForResponses(&USI);
|
||||
gettimeofday(&USI.now, NULL);
|
||||
// printf("TRACE: Finished waitForResponses() at %.4fs\n", o.TimeSinceStartMS(&USI.now) / 1000.0);
|
||||
processData(&USI);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user