~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-17 00:59:30 UTC
  • mfrom: (1551.15.4 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070417005930-rofskshyjsfzrahh
Fix ftp transport with servers that don't support atomic rename

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."""
30
29
 
31
30
    def make_kernel_like_tree(self, url=None, root='.',
32
31
                              link_working=False):
33
32
        """Setup a temporary tree roughly like a kernel tree.
34
 
 
 
33
        
35
34
        :param url: Creat the kernel like tree as a lightweight checkout
36
 
            of a new branch created at url.
37
 
        :param root: Path where the tree will be created.
 
35
        of a new branch created at url.
38
36
        :param link_working: instead of creating a new copy of all files
39
37
            just hardlink the working tree. Tests must request this, because
40
38
            they must break links if they want to change the files
41
 
        :return: A newly created tree.
42
39
        """
43
40
        from bzrlib.benchmarks.tree_creator.kernel_like import (
44
41
            KernelLikeTreeCreator,
134
131
                            hardlink=False):
135
132
        """Create a tree with many files and many commits. Every commit changes
136
133
        exactly one file.
137
 
 
 
134
        
138
135
        :param num_files: number of files to be created
139
136
        :param num_commits: number of commits in the newly created tree
140
137
        """
156
153
        :param tree: The tree in which the changes happen.
157
154
        :param files: The list of files where changes should occur.
158
155
        :param num_commits: The number of commits
159
 
        :param changes_per_commit: The number of files that are touched in
160
 
            each commit.
 
156
        :param changes_per_commit: The number of files that are touched in 
 
157
        each commit.
161
158
        """
162
159
        for j in range(num_commits):
163
160
            for i in range(changes_per_commit):
182
179
                   'bzrlib.benchmarks.bench_commit',
183
180
                   'bzrlib.benchmarks.bench_info',
184
181
                   'bzrlib.benchmarks.bench_inventory',
185
 
                   'bzrlib.benchmarks.bench_knit',
186
182
                   'bzrlib.benchmarks.bench_log',
187
183
                   'bzrlib.benchmarks.bench_osutils',
188
184
                   'bzrlib.benchmarks.bench_rocks',