latency fix: only set last-visit time if access was actually by the

robot
pull/1/head
Michael Peter Christen 12 years ago
parent 118233a7e6
commit dd241d03bb

@ -74,7 +74,7 @@ public final class HTTPLoader {
public Response load(final Request entry, final int maxFileSize, final BlacklistType blacklistType) throws IOException {
final long start = System.currentTimeMillis();
final Response doc = load(entry, DEFAULT_CRAWLING_RETRY_COUNT, maxFileSize, blacklistType);
Latency.updateAfterLoad(entry.url(), System.currentTimeMillis() - start);
if (!doc.fromCache()) Latency.updateAfterLoad(entry.url(), System.currentTimeMillis() - start);
return doc;
}

Loading…
Cancel
Save