Home | Trees | Indices | Help |
---|
|
object --+ | extension.Extension --+ | result_stream.ResultStream --+ | file_result_stream.FileResultStream --+ | PickleResultStream
A 'PickleResultStream' writes out results as Python pickles.
See also 'PickleResultReader', which does the reverse.
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
_max_pinned_results = 1000 A limit on how many `Result's to pin in memory at once. |
|||
_format_version = 1 The version number of the format we write. |
|||
arguments =
A list of the arguments to the extension class. |
|||
_is_binary_file = 1 If true, the file written is a binary file. |
|||
_argument_dictionary =
A map from argument names to 'Field' instances. |
|||
_argument_list =
A list of all the 'Field's in this class. |
|||
protocol_version = 1
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
Construct a new 'Extension'. 'args': Keyword arguments providing values for Extension parameters. The values should be appropriate for the corresponding fields. Derived classes must pass along any unrecognized keyword arguments to this method so that additional arguments can be added in the future without necessitating changes to derived classes. This method will place all of the arguments into this objects instance dictionary. Derived classes may override this method, but should call this method during their processing.
|
Output an annotation for this run. Subclasses should override this if they want to store/display annotations; the default implementation simply discards them. 'key' -- the key value as a string. 'value' -- the value of this annotation as a string.
|
Output a test result. Subclasses must override this method; the default implementation raises a 'NotImplementedError'. 'result' -- A 'Result'.
|
|
_max_pinned_resultsA limit on how many `Result's to pin in memory at once. Pickling an object normally pins it in memory; this is necessary to ensure correct behaviour when pickling multiple references to the same object. We know that `Result's can't refer to each other, so this pinning is useless overhead; however, clearing the cache at every call to `WriteResult' slows down both pickling and unpickling by about a factor of two. As a solution, any given `PickleResultStream', will clear its cache after `_max_pinned_results' calls to WriteResult. This cache-clearing technique causes a very minor slowdown on small result streams, and a substantial speedup on large result streams.
|
_format_versionThe version number of the format we write. This is bumped every time the format is changed, to make sure that we can retain backwards compatibility. "Version 0" contains no version number, and is simply a bunch of 'Result's pickled one after another. "Version 1", and all later versions, contain a pickled version number as the first thing in the file. In version 1, this is followed by a 4-byte unsigned integer in network byte order giving the address of the first annotation, followed by the file proper. The file proper is composed of a bunch of pickled 'Result's, followed by a pickled sentinel value (None), followed by a 4-byte unsigned integer in network-byte order, followed by the beginning of a new pickle whose first item is a annotation tuple, and following items are more 'Result's, and then another sentinel value, and so on. An annotation tuple is a tuple of n items, the first of which is a string tagging the type of annotation, and the rest of which have an interpretation that depends on the tag found. The only tag currently defined is "annotation", which is followed by two string elements giving respectively the key and the value. The 4-byte integers always point to the file address of the next such integer, except for the last, which has a value of 0; they are used to quickly find all annotations.
|
_argument_dictionaryA map from argument names to 'Field' instances. A map from the names of arguments for this class to the corresponding 'Field'.
|
_argument_listA list of all the 'Field's in this class. This list combines the complete list of 'arguments'. 'Field's appear in the order reached by a pre-order breadth-first traversal of the hierarchy, starting from the most derived class.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:41 2011 | http://epydoc.sourceforge.net |