Skip to content

Commit

Permalink
Rename variable to match intent
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixep committed Apr 11, 2019
1 parent 13fd29d commit 3b558fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/crawler/crawl.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ func AsyncCrawl(urls []string, config CrawlConfig) (stats CrawlStats,
config.Throttle = 1
}

var serverTimeSum time.Duration
var server200TimeSum time.Duration
defer func() {
total200 := stats.StatusCodes[200]
if total200 > 0 {
stats.Average200Time = serverTimeSum / time.Duration(total200)
stats.Average200Time = server200TimeSum / time.Duration(total200)
}
}()

Expand All @@ -163,7 +163,7 @@ func AsyncCrawl(urls []string, config CrawlConfig) (stats CrawlStats,
return
}

updateCrawlStats(result, &stats, &serverTimeSum)
updateCrawlStats(result, &stats, &server200TimeSum)
}
}
}
Expand Down

0 comments on commit 3b558fa

Please sign in to comment.