MCPcopy
hub / github.com/scrapy/scrapy / get_virtual_size

Method get_virtual_size

scrapy/extensions/memusage.py:72–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 return cls(crawler)
71
72 def get_virtual_size(self) -> int:
73 size: int = self.resource.getrusage(self.resource.RUSAGE_SELF).ru_maxrss
74 if sys.platform != "darwin":
75 # on macOS ru_maxrss is in bytes, on Linux it is in KB
76 size *= 1024
77 return size
78
79 def engine_started(self) -> None:
80 assert self.crawler.stats

Callers 5

engine_startedMethod · 0.95
updateMethod · 0.95
_check_limitMethod · 0.95
_check_warningMethod · 0.95
_send_reportMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected