~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_dirstate.py

  • Committer: Vincent Ladeuil
  • Date: 2009-06-22 14:32:48 UTC
  • mto: (4471.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4472.
  • Revision ID: v.ladeuil+lp@free.fr-20090622143248-pe4av866hxgzn60e
Use the same method or function names for _dirstate_helpers in pyrex and
python modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
 
208
208
    def test__read_dirblocks_20k_tree_0_parents_c(self):
209
209
        self.requireFeature(CompiledDirstateHelpersFeature)
210
 
        from bzrlib._dirstate_helpers_pyx import _read_dirblocks_c
 
210
        from bzrlib._dirstate_helpers_pyx import _read_dirblocks
211
211
        state = self.build_20k_dirstate()
212
212
        state.lock_read()
213
213
        try:
214
214
            self.assertEqual(dirstate.DirState.NOT_IN_MEMORY,
215
215
                             state._dirblock_state)
216
216
            state._read_header_if_needed()
217
 
            self.time(_read_dirblocks_c, state)
 
217
            self.time(_read_dirblocks, state)
218
218
        finally:
219
219
            state.unlock()
220
220
 
221
221
    def test__read_dirblocks_20k_tree_1_parent_py(self):
222
 
        from bzrlib._dirstate_helpers_py import _read_dirblocks_py
 
222
        from bzrlib._dirstate_helpers_py import _read_dirblocks
223
223
        state = self.build_20k_dirstate_with_parents(1)
224
224
        state.lock_read()
225
225
        try:
226
226
            self.assertEqual(dirstate.DirState.NOT_IN_MEMORY,
227
227
                             state._dirblock_state)
228
228
            state._read_header_if_needed()
229
 
            self.time(_read_dirblocks_py, state)
 
229
            self.time(_read_dirblocks, state)
230
230
        finally:
231
231
            state.unlock()
232
232
 
233
233
    def test__read_dirblocks_20k_tree_1_parent_c(self):
234
234
        self.requireFeature(CompiledDirstateHelpersFeature)
235
 
        from bzrlib._dirstate_helpers_pyx import _read_dirblocks_c
 
235
        from bzrlib._dirstate_helpers_pyx import _read_dirblocks
236
236
        state = self.build_20k_dirstate_with_parents(1)
237
237
        state.lock_read()
238
238
        try:
239
239
            self.assertEqual(dirstate.DirState.NOT_IN_MEMORY,
240
240
                             state._dirblock_state)
241
241
            state._read_header_if_needed()
242
 
            self.time(_read_dirblocks_c, state)
 
242
            self.time(_read_dirblocks, state)
243
243
        finally:
244
244
            state.unlock()
245
245
 
246
246
    def test__read_dirblocks_20k_tree_2_parents_py(self):
247
 
        from bzrlib._dirstate_helpers_py import _read_dirblocks_py
 
247
        from bzrlib._dirstate_helpers_py import _read_dirblocks
248
248
        state = self.build_20k_dirstate_with_parents(2)
249
249
        state.lock_read()
250
250
        try:
251
251
            self.assertEqual(dirstate.DirState.NOT_IN_MEMORY,
252
252
                             state._dirblock_state)
253
253
            state._read_header_if_needed()
254
 
            self.time(_read_dirblocks_py, state)
 
254
            self.time(_read_dirblocks, state)
255
255
        finally:
256
256
            state.unlock()
257
257
 
258
258
    def test__read_dirblocks_20k_tree_2_parents_c(self):
259
259
        self.requireFeature(CompiledDirstateHelpersFeature)
260
 
        from bzrlib._dirstate_helpers_pyx import _read_dirblocks_c
 
260
        from bzrlib._dirstate_helpers_pyx import _read_dirblocks
261
261
        state = self.build_20k_dirstate_with_parents(2)
262
262
        state.lock_read()
263
263
        try:
264
264
            self.assertEqual(dirstate.DirState.NOT_IN_MEMORY,
265
265
                             state._dirblock_state)
266
266
            state._read_header_if_needed()
267
 
            self.time(_read_dirblocks_c, state)
 
267
            self.time(_read_dirblocks, state)
268
268
        finally:
269
269
            state.unlock()
270
270