@@ -41,7 +41,7 @@
Loading
41 41
        if issubclass(cls, ignore):
42 42
            continue
43 43
        oldest = min(wdict.values())
44 -
        s += f"{cls.__name__:<30} {len(wdict):6}   oldest: {int(now - oldest)}s ago\n"
44 +
        s += f"{cls.__name__:<30} {len(wdict):6}   oldest: {now - oldest:.0f}s ago\n"
45 45
    return s
46 46
47 47

@@ -11,10 +11,10 @@
Loading
11 11
class LogStats:
12 12
    """Log basic scraping stats periodically"""
13 13
14 -
    def __init__(self, stats, interval=60.0):
14 +
    def __init__(self, stats, interval=60):
15 15
        self.stats = stats
16 16
        self.interval = interval
17 -
        self.multiplier = 60.0 / self.interval
17 +
        self.multiplier = 60 / self.interval
18 18
        self.task = None
19 19
20 20
    @classmethod

@@ -23,9 +23,9 @@
Loading
23 23
24 24
AUTOTHROTTLE_ENABLED = False
25 25
AUTOTHROTTLE_DEBUG = False
26 -
AUTOTHROTTLE_MAX_DELAY = 60.0
27 -
AUTOTHROTTLE_START_DELAY = 5.0
28 -
AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
26 +
AUTOTHROTTLE_MAX_DELAY = 60
27 +
AUTOTHROTTLE_START_DELAY = 5
28 +
AUTOTHROTTLE_TARGET_CONCURRENCY = 1
29 29
30 30
BOT_NAME = 'scrapybot'
31 31
@@ -211,7 +211,7 @@
Loading
211 211
212 212
SCHEDULER_DEBUG = False
213 213
214 -
LOGSTATS_INTERVAL = 60.0
214 +
LOGSTATS_INTERVAL = 60
215 215
216 216
MAIL_HOST = 'localhost'
217 217
MAIL_PORT = 25
@@ -222,7 +222,7 @@
Loading
222 222
MEMDEBUG_ENABLED = False        # enable memory debugging
223 223
MEMDEBUG_NOTIFY = []            # send memory debugging report by mail at engine shutdown
224 224
225 -
MEMUSAGE_CHECK_INTERVAL_SECONDS = 60.0
225 +
MEMUSAGE_CHECK_INTERVAL_SECONDS = 60
226 226
MEMUSAGE_ENABLED = True
227 227
MEMUSAGE_LIMIT_MB = 0
228 228
MEMUSAGE_NOTIFY_MAIL = []

@@ -74,7 +74,7 @@
Loading
74 74
        target_delay = latency / self.target_concurrency
75 75
76 76
        # Adjust the delay to make it closer to target_delay
77 -
        new_delay = (slot.delay + target_delay) / 2.0
77 +
        new_delay = (slot.delay + target_delay) / 2
78 78
79 79
        # If target delay is bigger than old delay, then use it instead of mean.
80 80
        # It works better with problematic sites.
Files Coverage
scrapy 88.00%
Project Totals (158 files) 88.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading