~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_xml.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-16 21:31:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1942.
  • Revision ID: john@arbash-meinel.com-20060816213149-bcbef53cfff6b110
With a full cache the time is down to 381 ms

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        #                      with Robert's serializer:  631ms/10770ms
29
29
        #                      with Entity escaper:       487ms/11636ms
30
30
        #           caching Entity escaper, empty cache:  448ms/ 9489ms
 
31
        #           caching Entity escaper, full cache:   381ms/ 9489ms
31
32
        # Really all we want is a real inventory
32
33
        tree = self.make_kernel_like_committed_tree('.', link_bzr=True)
33
34
 
49
50
        finally:
50
51
            f.close()
51
52
 
 
53
    def test_serialize_to_string_cached_kernel_like_inventory(self):
 
54
        tree = self.make_kernel_like_committed_tree('.', link_bzr=True)
 
55
 
 
56
        xml5._clear_cache()
 
57
        # We want a real tree with lots of file ids and sha strings, etc.
 
58
        inv = tree.basis_tree().inventory
 
59
        xml5.serializer_v5.write_inventory_to_string(inv)
 
60
 
 
61
        self.time(xml5.serializer_v5.write_inventory_to_string, inv)
 
62