MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / setInitialLastValues

Method setInitialLastValues

plugins/Chart/ChartCollector.py:20–24  ·  view source on GitHub ↗
(self, sites)

Source from the content-addressed store, hash-verified

18 self.last_values = collections.defaultdict(dict)
19
20 def setInitialLastValues(self, sites):
21 # Recover last value of site bytes/sent
22 for site in sites:
23 self.last_values["site:" + site.address]["site_bytes_recv"] = site.settings.get("bytes_recv", 0)
24 self.last_values["site:" + site.address]["site_bytes_sent"] = site.settings.get("bytes_sent", 0)
25
26 def getCollectors(self):
27 collectors = {}

Callers 1

loadMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected