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

  • Committer: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

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
"""Tests for bzr status performance."""
18
18
 
21
21
 
22
22
 
23
23
class StatusBenchmark(Benchmark):
 
24
    """Benchmarks for ``'bzr status'``."""
24
25
 
25
26
    def test_no_ignored_unknown_kernel_like_tree(self):
26
27
        """Status in a kernel sized tree with no ignored or unknowns.
27
 
        
 
28
 
28
29
        This should be bearable (<2secs) fast.
29
 
        """ 
 
30
        """
30
31
        self.make_kernel_like_added_tree()
31
32
        # on robertc's machine the first sample of this took 1687ms/15994ms
32
33
        self.time(self.run_bzr, 'status')
33
34
 
34
35
    def test_no_changes_known_kernel_like_tree(self):
35
 
        """Status in a kernel sized tree with no ignored, unknowns, or added.""" 
 
36
        """Status in a kernel sized tree with no ignored, unknowns, or added."""
36
37
        self.make_kernel_like_committed_tree(link_bzr=True)
37
38
        self.time(self.run_bzr, 'status')
38
39
 
41
42
        of a single file."""
42
43
        self.make_kernel_like_committed_tree()
43
44
        #XXX depends on the filenames generated by make_kernel_like_tree
44
 
        self.time(self.run_bzr, 'status', '7/4/0/16')
 
45
        self.time(self.run_bzr, ['status', '7/4/0/16'])
45
46
 
46
47
    def test_status_one_added_file_kernel_like_tree(self):
47
48
        """Status of a single added file in our stock large tree."""
48
49
        self.make_kernel_like_tree()
49
50
        self.run_bzr('add')
50
 
        self.run_bzr('commit', '-m', 'initial import')
51
 
        self.time(self.run_bzr, 'status', '3/3/3/10')
 
51
        self.run_bzr(['commit', '-m', 'initial import'])
 
52
        self.time(self.run_bzr, ['status', '3/3/3/10'])