/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/__init__.py

  • Committer: Robert Collins
  • Date: 2007-07-15 15:40:37 UTC
  • mto: (2592.3.33 repository)
  • mto: This revision was merged to the branch mainline in revision 2624.
  • Revision ID: robertc@robertcollins.net-20070715154037-3ar8g89decddc9su
Make GraphIndex accept nodes as key, value, references, so that the method
signature is closer to what a simple key->value index delivers. Also
change the behaviour when the reference list count is zero to accept
key, value as nodes, and emit key, value to make it identical in that case
to a simple key->value index. This may not be a good idea, but for now it
seems ok.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Benchmark test suite for bzr."""
18
18
 
19
19
from bzrlib import (
20
20
    bzrdir,
 
21
    plugin,
21
22
    )
22
 
from bzrlib import plugin as _mod_plugin
23
23
import bzrlib.branch
24
24
from bzrlib.tests.TestUtil import TestLoader
25
25
from bzrlib.tests.blackbox import ExternalBase
77
77
        :param link_working: Instead of copying all of the working tree
78
78
            files, just hardlink them to the cached files. Tests can unlink
79
79
            files that they will change.
80
 
        :param link_bzr: Hardlink the .bzr directory. For readonly
 
80
        :param link_bzr: Hardlink the .bzr directory. For readonly 
81
81
            operations this is safe, and shaves off a lot of setup time
82
82
        """
83
83
        from bzrlib.benchmarks.tree_creator.kernel_like import (
104
104
    def make_many_commit_tree(self, directory_name='.',
105
105
                              hardlink=False):
106
106
        """Create a tree with many commits.
107
 
 
108
 
        No file changes are included. Not hardlinking the working tree,
 
107
        
 
108
        No file changes are included. Not hardlinking the working tree, 
109
109
        because there are no working tree files.
110
110
        """
111
111
        from bzrlib.benchmarks.tree_creator.simple_many_commit import (
117
117
    def make_heavily_merged_tree(self, directory_name='.',
118
118
                                 hardlink=False):
119
119
        """Create a tree in which almost every commit is a merge.
120
 
 
121
 
        No file changes are included.  This produces two trees,
 
120
       
 
121
        No file changes are included.  This produces two trees, 
122
122
        one of which is returned.  Except for the first commit, every
123
123
        commit in its revision-history is a merge another commit in the other
124
 
        tree.  Not hardlinking the working tree, because there are no working
 
124
        tree.  Not hardlinking the working tree, because there are no working 
125
125
        tree files.
126
126
        """
127
127
        from bzrlib.benchmarks.tree_creator.heavily_merged import (
180
180
                   'bzrlib.benchmarks.bench_cache_utf8',
181
181
                   'bzrlib.benchmarks.bench_checkout',
182
182
                   'bzrlib.benchmarks.bench_commit',
183
 
                   'bzrlib.benchmarks.bench_dirstate',
184
183
                   'bzrlib.benchmarks.bench_info',
185
184
                   'bzrlib.benchmarks.bench_inventory',
186
185
                   'bzrlib.benchmarks.bench_knit',
187
186
                   'bzrlib.benchmarks.bench_log',
188
 
                   'bzrlib.benchmarks.bench_pack',
189
187
                   'bzrlib.benchmarks.bench_osutils',
190
188
                   'bzrlib.benchmarks.bench_rocks',
191
189
                   'bzrlib.benchmarks.bench_startup',
192
190
                   'bzrlib.benchmarks.bench_status',
193
 
                   'bzrlib.benchmarks.bench_tags',
194
191
                   'bzrlib.benchmarks.bench_transform',
195
192
                   'bzrlib.benchmarks.bench_workingtree',
196
193
                   'bzrlib.benchmarks.bench_sftp',
197
194
                   'bzrlib.benchmarks.bench_xml',
198
195
                   ]
199
 
    suite = TestLoader().loadTestsFromModuleNames(testmod_names)
 
196
    suite = TestLoader().loadTestsFromModuleNames(testmod_names) 
200
197
 
201
198
    # Load any benchmarks from plugins
202
 
    for name, plugin in _mod_plugin.plugins().items():
203
 
        if getattr(plugin.module, 'bench_suite', None) is not None:
204
 
            suite.addTest(plugin.module.bench_suite())
 
199
    for name, module in plugin.all_plugins().items():
 
200
        if getattr(module, 'bench_suite', None) is not None:
 
201
            suite.addTest(module.bench_suite())
205
202
 
206
203
    return suite