~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2007-04-09 22:11:22 UTC
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070409221122-qh66j4pk3kqxjn9c
Cleanup bzrlib/benchmarks/* so that everything at least has a valid doc string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
 
28
28
class Benchmark(ExternalBase):
 
29
    """A Test class which provides helpers for writing benchmark tests."""
29
30
 
30
31
    def make_kernel_like_tree(self, url=None, root='.',
31
32
                              link_working=False):
32
33
        """Setup a temporary tree roughly like a kernel tree.
33
 
        
 
34
 
34
35
        :param url: Creat the kernel like tree as a lightweight checkout
35
 
        of a new branch created at url.
 
36
            of a new branch created at url.
 
37
        :param root: Path where the tree will be created.
36
38
        :param link_working: instead of creating a new copy of all files
37
39
            just hardlink the working tree. Tests must request this, because
38
40
            they must break links if they want to change the files
 
41
        :return: A newly created tree.
39
42
        """
40
43
        from bzrlib.benchmarks.tree_creator.kernel_like import (
41
44
            KernelLikeTreeCreator,
131
134
                            hardlink=False):
132
135
        """Create a tree with many files and many commits. Every commit changes
133
136
        exactly one file.
134
 
        
 
137
 
135
138
        :param num_files: number of files to be created
136
139
        :param num_commits: number of commits in the newly created tree
137
140
        """
153
156
        :param tree: The tree in which the changes happen.
154
157
        :param files: The list of files where changes should occur.
155
158
        :param num_commits: The number of commits
156
 
        :param changes_per_commit: The number of files that are touched in 
157
 
        each commit.
 
159
        :param changes_per_commit: The number of files that are touched in
 
160
            each commit.
158
161
        """
159
162
        for j in range(num_commits):
160
163
            for i in range(changes_per_commit):