/breezy/3.0

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/3.0

« back to all changes in this revision

Viewing changes to tools/time_graph.py

  • Committer: Breezy landing bot
  • Author(s): Vincent Ladeuil
  • Date: 2019-03-06 11:29:23 UTC
  • mfrom: (7304.1.2 3.0)
  • Revision ID: breezy.the.bot@gmail.com-20190306112923-4j11qd9eo5kk8h8i
Release 3.0.0

Merged from https://code.launchpad.net/~vila/brz/3.0.0/+merge/364029

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    branch,
9
9
    commands,
10
10
    graph,
 
11
    osutils,
11
12
    ui,
12
13
    trace,
13
14
    _known_graph_py,
24
25
trace.enable_default_logging()
25
26
ui.ui_factory = text.TextUIFactory()
26
27
 
27
 
begin = time.clock()
 
28
begin = osutils.perf_counter()
28
29
if len(args) >= 1:
29
30
    b = branch.Branch.open(args[0])
30
31
else:
33
34
    g = b.repository.get_graph()
34
35
    parent_map = dict(p for p in g.iter_ancestry([b.last_revision()])
35
36
                      if p[1] is not None)
36
 
end = time.clock()
 
37
end = osutils.perf_counter()
37
38
 
38
39
print('Found %d nodes, loaded in %.3fs' % (len(parent_map), end - begin))
39
40