Ticket #1392: get_latenciesupgrade.darcs.patch

File get_latenciesupgrade.darcs.patch, 10.8 KB (added by arch_o_median, at 2011-04-22T00:28:59Z)
Line 
1Thu Apr 21 18:23:26 MDT 2011  wilcoxjg@gmail.com
2  *  test_storage.py: test_latencies fails when the number of samples is too small to generate unique indices for the order statistics.
3
4Thu Apr 21 18:24:08 MDT 2011  wilcoxjg@gmail.com
5  * server.py:  get_latencies now handles small sample size by returning None for all statistics in the small sample category.
6
7New patches:
8
9[ test_storage.py: test_latencies fails when the number of samples is too small to generate unique indices for the order statistics.
10wilcoxjg@gmail.com**20110422002326
11 Ignore-this: fcf1b06f0aec92aba1f79953b8cc9280
12] {
13hunk ./src/allmydata/test/test_storage.py 1343
14         self.failUnless(abs(output["renew"]["99_9_percentile"] - 999) < 1, output)
15 
16         self.failUnlessEqual(len(ss.latencies["cancel"]), 10)
17-        self.failUnless(abs(output["cancel"]["mean"] - 9) < 1, output)
18-        self.failUnless(abs(output["cancel"]["01_0_percentile"] -  0) < 1, output)
19-        self.failUnless(abs(output["cancel"]["10_0_percentile"] -  2) < 1, output)
20-        self.failUnless(abs(output["cancel"]["50_0_percentile"] - 10) < 1, output)
21-        self.failUnless(abs(output["cancel"]["90_0_percentile"] - 18) < 1, output)
22-        self.failUnless(abs(output["cancel"]["95_0_percentile"] - 18) < 1, output)
23-        self.failUnless(abs(output["cancel"]["99_0_percentile"] - 18) < 1, output)
24-        self.failUnless(abs(output["cancel"]["99_9_percentile"] - 18) < 1, output)
25+        self.failUnless(output["cancel"] == None, output)
26 
27         self.failUnlessEqual(len(ss.latencies["get"]), 1)
28hunk ./src/allmydata/test/test_storage.py 1346
29-        self.failUnless(abs(output["get"]["mean"] - 5) < 1, output)
30-        self.failUnless(abs(output["get"]["01_0_percentile"] - 5) < 1, output)
31-        self.failUnless(abs(output["get"]["10_0_percentile"] - 5) < 1, output)
32-        self.failUnless(abs(output["get"]["50_0_percentile"] - 5) < 1, output)
33-        self.failUnless(abs(output["get"]["90_0_percentile"] - 5) < 1, output)
34-        self.failUnless(abs(output["get"]["95_0_percentile"] - 5) < 1, output)
35-        self.failUnless(abs(output["get"]["99_0_percentile"] - 5) < 1, output)
36-        self.failUnless(abs(output["get"]["99_9_percentile"] - 5) < 1, output)
37+        self.failUnless(output["get"] == None, output)
38 
39 def remove_tags(s):
40     s = re.sub(r'<[^>]*>', ' ', s)
41}
42[server.py:  get_latencies now handles small sample size by returning None for all statistics in the small sample category.
43wilcoxjg@gmail.com**20110422002408
44 Ignore-this: 8368f4d25e749cb94a6d8d775d0c4e95
45] {
46hunk ./src/allmydata/storage/server.py 130
47         for category in self.latencies:
48             if not self.latencies[category]:
49                 continue
50-            stats = {}
51             samples = self.latencies[category][:]
52hunk ./src/allmydata/storage/server.py 131
53-            samples.sort()
54             count = len(samples)
55hunk ./src/allmydata/storage/server.py 132
56+            if count < 1000:
57+                output[category] = None
58+                continue
59+            samples.sort()
60+            stats = {}
61             stats["mean"] = sum(samples) / count
62             stats["01_0_percentile"] = samples[int(0.01 * count)]
63             stats["10_0_percentile"] = samples[int(0.1 * count)]
64}
65
66Context:
67
68[Fix a test failure in test_package_initialization on Python 2.4.x due to exceptions being stringified differently than in later versions of Python. refs #1389
69david-sarah@jacaranda.org**20110411190738
70 Ignore-this: 7847d26bc117c328c679f08a7baee519
71]
72[tests: add test for including the ImportError message and traceback entry in the summary of errors from importing dependencies. refs #1389
73david-sarah@jacaranda.org**20110410155844
74 Ignore-this: fbecdbeb0d06a0f875fe8d4030aabafa
75]
76[allmydata/__init__.py: preserve the message and last traceback entry (file, line number, function, and source line) of ImportErrors in the package versions string. fixes #1389
77david-sarah@jacaranda.org**20110410155705
78 Ignore-this: 2f87b8b327906cf8bfca9440a0904900
79]
80[remove unused variable detected by pyflakes
81zooko@zooko.com**20110407172231
82 Ignore-this: 7344652d5e0720af822070d91f03daf9
83]
84[allmydata/__init__.py: Nicer reporting of unparseable version numbers in dependencies. fixes #1388
85david-sarah@jacaranda.org**20110401202750
86 Ignore-this: 9c6bd599259d2405e1caadbb3e0d8c7f
87]
88[update FTP-and-SFTP.rst: the necessary patch is included in Twisted-10.1
89Brian Warner <warner@lothar.com>**20110325232511
90 Ignore-this: d5307faa6900f143193bfbe14e0f01a
91]
92[control.py: remove all uses of s.get_serverid()
93warner@lothar.com**20110227011203
94 Ignore-this: f80a787953bd7fa3d40e828bde00e855
95]
96[web: remove some uses of s.get_serverid(), not all
97warner@lothar.com**20110227011159
98 Ignore-this: a9347d9cf6436537a47edc6efde9f8be
99]
100[immutable/downloader/fetcher.py: remove all get_serverid() calls
101warner@lothar.com**20110227011156
102 Ignore-this: fb5ef018ade1749348b546ec24f7f09a
103]
104[immutable/downloader/fetcher.py: fix diversity bug in server-response handling
105warner@lothar.com**20110227011153
106 Ignore-this: bcd62232c9159371ae8a16ff63d22c1b
107 
108 When blocks terminate (either COMPLETE or CORRUPT/DEAD/BADSEGNUM), the
109 _shares_from_server dict was being popped incorrectly (using shnum as the
110 index instead of serverid). I'm still thinking through the consequences of
111 this bug. It was probably benign and really hard to detect. I think it would
112 cause us to incorrectly believe that we're pulling too many shares from a
113 server, and thus prefer a different server rather than asking for a second
114 share from the first server. The diversity code is intended to spread out the
115 number of shares simultaneously being requested from each server, but with
116 this bug, it might be spreading out the total number of shares requested at
117 all, not just simultaneously. (note that SegmentFetcher is scoped to a single
118 segment, so the effect doesn't last very long).
119]
120[immutable/downloader/share.py: reduce get_serverid(), one left, update ext deps
121warner@lothar.com**20110227011150
122 Ignore-this: d8d56dd8e7b280792b40105e13664554
123 
124 test_download.py: create+check MyShare instances better, make sure they share
125 Server objects, now that finder.py cares
126]
127[immutable/downloader/finder.py: reduce use of get_serverid(), one left
128warner@lothar.com**20110227011146
129 Ignore-this: 5785be173b491ae8a78faf5142892020
130]
131[immutable/offloaded.py: reduce use of get_serverid() a bit more
132warner@lothar.com**20110227011142
133 Ignore-this: b48acc1b2ae1b311da7f3ba4ffba38f
134]
135[immutable/upload.py: reduce use of get_serverid()
136warner@lothar.com**20110227011138
137 Ignore-this: ffdd7ff32bca890782119a6e9f1495f6
138]
139[immutable/checker.py: remove some uses of s.get_serverid(), not all
140warner@lothar.com**20110227011134
141 Ignore-this: e480a37efa9e94e8016d826c492f626e
142]
143[add remaining get_* methods to storage_client.Server, NoNetworkServer, and
144warner@lothar.com**20110227011132
145 Ignore-this: 6078279ddf42b179996a4b53bee8c421
146 MockIServer stubs
147]
148[upload.py: rearrange _make_trackers a bit, no behavior changes
149warner@lothar.com**20110227011128
150 Ignore-this: 296d4819e2af452b107177aef6ebb40f
151]
152[happinessutil.py: finally rename merge_peers to merge_servers
153warner@lothar.com**20110227011124
154 Ignore-this: c8cd381fea1dd888899cb71e4f86de6e
155]
156[test_upload.py: factor out FakeServerTracker
157warner@lothar.com**20110227011120
158 Ignore-this: 6c182cba90e908221099472cc159325b
159]
160[test_upload.py: server-vs-tracker cleanup
161warner@lothar.com**20110227011115
162 Ignore-this: 2915133be1a3ba456e8603885437e03
163]
164[happinessutil.py: server-vs-tracker cleanup
165warner@lothar.com**20110227011111
166 Ignore-this: b856c84033562d7d718cae7cb01085a9
167]
168[upload.py: more tracker-vs-server cleanup
169warner@lothar.com**20110227011107
170 Ignore-this: bb75ed2afef55e47c085b35def2de315
171]
172[upload.py: fix var names to avoid confusion between 'trackers' and 'servers'
173warner@lothar.com**20110227011103
174 Ignore-this: 5d5e3415b7d2732d92f42413c25d205d
175]
176[refactor: s/peer/server/ in immutable/upload, happinessutil.py, test_upload
177warner@lothar.com**20110227011100
178 Ignore-this: 7ea858755cbe5896ac212a925840fe68
179 
180 No behavioral changes, just updating variable/method names and log messages.
181 The effects outside these three files should be minimal: some exception
182 messages changed (to say "server" instead of "peer"), and some internal class
183 names were changed. A few things still use "peer" to minimize external
184 changes, like UploadResults.timings["peer_selection"] and
185 happinessutil.merge_peers, which can be changed later.
186]
187[storage_client.py: clean up test_add_server/test_add_descriptor, remove .test_servers
188warner@lothar.com**20110227011056
189 Ignore-this: efad933e78179d3d5fdcd6d1ef2b19cc
190]
191[test_client.py, upload.py:: remove KiB/MiB/etc constants, and other dead code
192warner@lothar.com**20110227011051
193 Ignore-this: dc83c5794c2afc4f81e592f689c0dc2d
194]
195[test: increase timeout on a network test because Francois's ARM machine hit that timeout
196zooko@zooko.com**20110317165909
197 Ignore-this: 380c345cdcbd196268ca5b65664ac85b
198 I'm skeptical that the test was proceeding correctly but ran out of time. It seems more likely that it had gotten hung. But if we raise the timeout to an even more extravagant number then we can be even more certain that the test was never going to finish.
199]
200[docs/configuration.rst: add a "Frontend Configuration" section
201Brian Warner <warner@lothar.com>**20110222014323
202 Ignore-this: 657018aa501fe4f0efef9851628444ca
203 
204 this points to docs/frontends/*.rst, which were previously underlinked
205]
206[web/filenode.py: avoid calling req.finish() on closed HTTP connections. Closes #1366
207"Brian Warner <warner@lothar.com>"**20110221061544
208 Ignore-this: 799d4de19933f2309b3c0c19a63bb888
209]
210[Add unit tests for cross_check_pkg_resources_versus_import, and a regression test for ref #1355. This requires a little refactoring to make it testable.
211david-sarah@jacaranda.org**20110221015817
212 Ignore-this: 51d181698f8c20d3aca58b057e9c475a
213]
214[allmydata/__init__.py: .name was used in place of the correct .__name__ when printing an exception. Also, robustify string formatting by using %r instead of %s in some places. fixes #1355.
215david-sarah@jacaranda.org**20110221020125
216 Ignore-this: b0744ed58f161bf188e037bad077fc48
217]
218[Refactor StorageFarmBroker handling of servers
219Brian Warner <warner@lothar.com>**20110221015804
220 Ignore-this: 842144ed92f5717699b8f580eab32a51
221 
222 Pass around IServer instance instead of (peerid, rref) tuple. Replace
223 "descriptor" with "server". Other replacements:
224 
225  get_all_servers -> get_connected_servers/get_known_servers
226  get_servers_for_index -> get_servers_for_psi (now returns IServers)
227 
228 This change still needs to be pushed further down: lots of code is now
229 getting the IServer and then distributing (peerid, rref) internally.
230 Instead, it ought to distribute the IServer internally and delay
231 extracting a serverid or rref until the last moment.
232 
233 no_network.py was updated to retain parallelism.
234]
235[TAG allmydata-tahoe-1.8.2
236warner@lothar.com**20110131020101]
237Patch bundle hash:
238cbcd67929cd61fe4cf3820d01115ac73d6e42b88