/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/bench_knit.py

  • Committer: John Arbash Meinel
  • Date: 2007-06-29 00:39:08 UTC
  • mto: This revision was merged to the branch mainline in revision 2614.
  • Revision ID: john@arbash-meinel.com-20070629003908-0u62qx1u883o81pw
Fix up the benchmarks (bench_knit.py) for the new function locations.
I see something between 2-3x faster for reading .kndx files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        def reset():
66
66
            knit._load_data = orig
67
67
        self.addCleanup(reset)
68
 
        knit._load_data = knit._load_data_c
 
68
        from bzrlib._knit_load_data_c import _load_data_c
 
69
        knit._load_data = _load_data_c
69
70
 
70
71
    def setup_load_data_py(self):
71
72
        orig = knit._load_data
72
73
        def reset():
73
74
            knit._load_data = orig
74
75
        self.addCleanup(reset)
75
 
        knit._load_data = knit._load_data_py
 
76
        from bzrlib._knit_load_data_py import _load_data_py
 
77
        knit._load_data = _load_data_py
76
78
 
77
79
    def test_read_50k_index_c(self):
78
80
        self.setup_load_data_c()