Changeset 0d47e12 in trunk
- Timestamp:
- 2016-12-24T03:50:48Z (8 years ago)
- Branches:
- master
- Children:
- b7e76c7
- Parents:
- 7faec2e1
- git-author:
- Vladimir Rusinov <vrusinov@…> (2016-12-02 16:35:19)
- git-committer:
- Brian Warner <warner@…> (2016-12-24 03:50:48)
- Location:
- src/allmydata
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/deep_stats.py ¶
r7faec2e1 r0d47e12 53 53 54 54 def set_monitor(self, monitor): 55 """Sets a new monitor.""" 55 56 self.monitor = monitor 56 57 monitor.origin_si = self.origin.get_storage_index() … … 58 59 59 60 def add_node(self, node, childpath): 61 """Adds a node's stats to calculation.""" 60 62 if isinstance(node, UnknownNode): 61 63 self.add("count-unknown") … … 81 83 82 84 def enter_directory(self, parent, children): 85 """Adds directory stats.""" 83 86 dirsize_bytes = parent.get_size() 84 87 if dirsize_bytes is not None: … … 119 122 120 123 def get_results(self): 124 """Returns deep-stats resutls.""" 121 125 stats = self.stats.copy() 122 126 for key in self.histograms: … … 128 132 129 133 def finish(self): 134 """Finishes gathering stats.""" 130 135 return self.get_results() -
TabularUnified src/allmydata/dirnode.py ¶
r7faec2e1 r0d47e12 29 29 def update_metadata(metadata, new_metadata, now): 30 30 """Updates 'metadata' in-place with the information in 'new_metadata'. 31 Timestamps are set according to the time 'now'.""" 31 32 Timestamps are set according to the time 'now'. 33 """ 32 34 33 35 if metadata is None: -
TabularUnified src/allmydata/test/test_dirnode.py ¶
r7faec2e1 r0d47e12 1 """Tests for the dirnode module.""" 2 1 3 import time 2 4 import unicodedata
Note: See TracChangeset
for help on using the changeset viewer.