~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_cache_utf8.py

  • Committer: Martin Pool
  • Date: 2010-01-29 10:36:23 UTC
  • mto: This revision was merged to the branch mainline in revision 4992.
  • Revision ID: mbp@sourcefrog.net-20100129103623-hywka5hymo5z13jw
Change url to canonical.com or wiki, plus some doc improvements in passing

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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Tests for encoding performance."""
35
35
 
36
36
 
37
37
class EncodingBenchmark(Benchmark):
 
38
    """Benchmark the time to encode strings."""
38
39
 
39
40
    def setUp(self):
40
41
        super(EncodingBenchmark, self).setUp()
134
135
                     unicode("%07d" % x) for x in xrange(500000)]
135
136
        self.time(self.encode_cached_multi, revisions, 1)
136
137
 
 
138
 
137
139
class DecodingBenchmarks(Benchmark):
 
140
    """Benchmark the time to decode strings."""
138
141
 
139
142
    def setUp(self):
140
143
        super(DecodingBenchmarks, self).setUp()