Brian Warner
e1380b132b
util/statistics: add tests, fix mean_repair_cost
2009-02-15 16:23:26 -07:00
Shawn Willden
51ab76875b
More lossmodel work, on repair.
2009-01-15 20:56:48 -07:00
Shawn Willden
21832280da
Statistics module
...
Added a statistics module for calculating various facets of
share survival statistics.
2009-01-13 20:12:35 -07:00
Brian Warner
4aee51ff6f
figleaf_htmlizer: fix order of summary counters
2009-02-13 09:57:53 -07:00
Brian Warner
aee319e236
figleaf_htmlizer: oops, re-ignore files that aren't under root, like code in auto-built eggs
2009-02-13 00:00:22 -07:00
Brian Warner
30724593fc
figleaf_htmlizer: emit stats to stdout, so buildbot can see it
2009-02-12 15:10:20 -07:00
Brian Warner
781c271b82
figleaf_htmlizer: render changes in coverage relative to a previous test run using --old-coverage
2009-02-12 15:04:12 -07:00
Brian Warner
125bf09528
figleaf_htmlizer: more rearranging, behavior should still be unchanged
2009-02-11 20:05:15 -07:00
Brian Warner
e02ecec1ad
figleaf_htmlizer: break it up into subfunctions, behavior should still be unchanged
2009-02-11 19:56:07 -07:00
Brian Warner
6bde1b0345
figleaf_htmlizer: rewrite in class form, behavior should be the same as before
2009-02-11 19:40:50 -07:00
Brian Warner
6db747b1f0
figleaf_htmlizer: rewrite with twisted.python.usage, remove logging: should behave the same as before
2009-02-11 19:16:43 -07:00
Brian Warner
f3ed579e74
figleaf_htmlizer: expand tabs, fix to 4-space indents. No functional changes.
2009-02-11 19:05:42 -07:00
Zooko O'Whielacronx
9247dc70e5
trivial: whitespace
2009-01-18 10:54:58 -07:00
Zooko O'Whielacronx
e449052a17
util: dictutil: add DictOfSets.union(key, values) and DictOfSets.update(otherdictofsets)
2009-01-12 10:55:39 -07:00
Zooko O'Whielacronx
c01cfc0035
util: log: allow empty msgs (because downloader is using the "format" alternative with no "msg" argument)
2009-01-07 11:54:11 -07:00
Zooko O'Whielacronx
2122ba78b3
util: deferredutil: undo my recent patch to use our own implementation of gatherResults
...
It seems to cause lots of failures on some builders.
2009-01-07 11:00:05 -07:00
Zooko O'Whielacronx
79535e4f5b
util: deferredutil: implement our own gatherResults instead of using Twisted's
...
Because we want to maintain backwards compatibility to Twisted 2.4.0.
2009-01-07 10:32:07 -07:00
Zooko O'Whielacronx
78306cf7fa
trivial: M-x whitespace-cleanup
2009-01-07 10:25:28 -07:00
Zooko O'Whielacronx
8e92dd1231
trivial: whitespace cleanup
2009-01-06 11:20:58 -07:00
Zooko O'Whielacronx
d4a5f9131b
util: base32: require str-not-unicode inputs -- effectively rolls back [3306] and [3307]
2009-01-06 10:41:22 -07:00
Zooko O'Whielacronx
5d5e89d96d
util: add gatherResults which is a deferred-list-like thing that doesn't wrap failures in a FirstError
2009-01-04 10:52:02 -07:00
Zooko O'Whielacronx
b8904e023c
trivial: remove unused import -- thanks, pyflakes
2008-12-31 15:25:56 -07:00
Zooko O'Whielacronx
c00d20361f
rrefutil: generically wrap any errback from callRemote() in a ServerFailure instance
...
This facilitates client code to easily catch ServerFailures without also catching exceptions arising from client-side code.
See also:
http://foolscap.lothar.com/trac/ticket/105 # make it easy to distinguish server-side failures/exceptions from client-side
2008-12-31 14:28:30 -07:00
Zooko O'Whielacronx
ce5effbedf
util/base32: the identity trans table needn't have any contents -- we are using string.translate solely to delete known chars
2008-12-22 17:48:08 -07:00
Zooko O'Whielacronx
3a26a4bd58
util/base32: allow unicode inputs to a2b() or could_be_base32_encoded(), and encode them with utf-8 before processing them
2008-12-22 17:47:13 -07:00
Zooko O'Whielacronx
dde2376c4e
util/base32: loosen the precondition forbidding unicode and requiring str -- now it requires either unicode or str
...
Hopefully this will make it so that tests pass with François Deppierraz's patch to fix the tahoe cli's handling of unicode argument.
2008-12-22 16:22:37 -07:00
Zooko O'Whielacronx
f1fbd4feae
dirnode: don't check MAC on entries in dirnodes
...
In an ancient version of directories, we needed a MAC on each entry. In modern times, the entire dirnode comes with a digital signature, so the MAC on each entry is redundant.
With this patch, we no longer check those MACs when reading directories, but we still produce them so that older readers will accept directories that we write.
2008-12-21 17:35:18 -07:00
Zooko O'Whielacronx
2b2c2a566b
util: logging: refactor some common logging behavior into mixins
2008-12-16 17:38:07 -07:00
Zooko O'Whielacronx
5fb44a3e79
pyutil: assertutil: copy in simplified assertutil from pyutil
2008-12-16 17:37:45 -07:00
Zooko O'Whielacronx
e29e4c04d9
pyutil: assertutil: simplify handling of exception during formatting of precondition message, and reduce dependency to just the Python Standard Library's logging module
2008-12-10 07:10:57 -07:00
Brian Warner
39a41f1d85
util/abbreviate: add abbreviated-size parser
2008-12-01 17:24:12 -07:00
Brian Warner
bf06492a90
#538 : fetch version and attach to the rref. Make IntroducerClient demand v1 support.
2008-11-21 20:07:27 -07:00
Brian Warner
7391f63fc1
util/abbreviate: little utility to abbreviate seconds and bytes
2008-11-18 20:11:42 -07:00
Brian Warner
fc7cd23bd1
limiter.py: fix stack blowout by inserting an eventual-send between _done and maybe_start_task. This was causing failures during a 'tahoe manifest' of a large set of directories
2008-11-14 21:11:44 -07:00
Zooko O'Whielacronx
9c35ca76a4
util: copy in pyutil.fileutil.ReopenableNamedTemporaryFile
2008-11-04 17:47:15 -07:00
Zooko O'Whielacronx
cef24792e7
util: copy in nummedobj from pyutil
2008-11-04 13:55:50 -07:00
Zooko O'Whielacronx
fb85a6280f
util: copy in dictutil from pyutil
2008-11-04 13:53:27 -07:00
Brian Warner
c205a54965
util/cachedir.py: add a cache-directory manager class, which expires+deletes unused files after a while
2008-10-30 13:01:20 -07:00
Brian Warner
b73c380cdb
move testutil into test/common_util.py, since it doesn't count as 'code under test' for our pyflakes numbers
2008-10-28 21:28:31 -07:00
Brian Warner
294e3fb682
util: move PollMixin to a separate file (pollmixin.py), so testutil can be moved into test/
2008-10-28 21:15:48 -07:00
Brian Warner
2d4e895096
iputil.py: avoid a DNS lookup at startup (which may timeout tests when run on a partially-offline host) by using 198.41.0.4 instead of A.ROOT-SERVERS.NET
2008-10-28 13:36:46 -07:00
Zooko O'Whielacronx
57d9f6beb6
repairer: fix flaw in testutil.flip_one_bit() that Brian pointed out
2008-10-16 12:48:48 -07:00
Zooko O'Whielacronx
8a6d1e5da6
repairer: test all different kinds of corruption that can happen to share files on disk
2008-10-14 16:09:20 -07:00
Brian Warner
b0a00e0f33
util/time_format.py: accept space separator, add unit tests
2008-10-13 15:52:58 -07:00
Brian Warner
93725a6935
util/limiter: add a repr
2008-10-07 13:19:45 -07:00
Brian Warner
1e3500ae5f
testutil.PollMixin: set default timeout (to 100s), emit a more helpful error when the timeout is hit
2008-09-29 22:23:09 -07:00
Brian Warner
98c8e25709
netstring: add required_trailer= argument
2008-09-26 09:57:54 -07:00
Brian Warner
e8cf581e3f
move netstring() and split_netstring() into a separate util.netstring module
2008-09-25 21:38:24 -07:00
Brian Warner
0a59991ce6
various: use util.log.err instead of twisted.log.err, so we get both Incidents and trial-test-flunking
2008-09-20 10:35:45 -07:00
Brian Warner
8854d0c1b5
util.log: send log.err to Twisted too, so that Trial tests are flunked
2008-09-20 10:34:27 -07:00