Show More
@@ -1568,11 +1568,13 b' def perfvolatilesets(ui, repo, *names, *' | |||
|
1568 | 1568 | ('', 'clear-revbranch', False, |
|
1569 | 1569 | 'purge the revbranch cache between computation'), |
|
1570 | 1570 | ] + formatteropts) |
|
1571 |
def perfbranchmap(ui, repo, |
|
|
1571 | def perfbranchmap(ui, repo, *filternames, **opts): | |
|
1572 | 1572 | """benchmark the update of a branchmap |
|
1573 | 1573 | |
|
1574 | 1574 | This benchmarks the full repo.branchmap() call with read and write disabled |
|
1575 | 1575 | """ |
|
1576 | full = opts.get("full", False) | |
|
1577 | clear_revbranch = opts.get("clear_revbranch", False) | |
|
1576 | 1578 | timer, fm = gettimer(ui, opts) |
|
1577 | 1579 | def getbranchmap(filtername): |
|
1578 | 1580 | """generate a benchmark function for the filtername""" |
@@ -1591,6 +1593,8 b' def perfbranchmap(ui, repo, full=False, ' | |||
|
1591 | 1593 | return d |
|
1592 | 1594 | # add filter in smaller subset to bigger subset |
|
1593 | 1595 | possiblefilters = set(repoview.filtertable) |
|
1596 | if filternames: | |
|
1597 | possiblefilters &= set(filternames) | |
|
1594 | 1598 | subsettable = getbranchmapsubsettable() |
|
1595 | 1599 | allfilters = [] |
|
1596 | 1600 | while possiblefilters: |
@@ -1607,8 +1611,9 b' def perfbranchmap(ui, repo, full=False, ' | |||
|
1607 | 1611 | if not full: |
|
1608 | 1612 | for name in allfilters: |
|
1609 | 1613 | repo.filtered(name).branchmap() |
|
1610 | # add unfiltered | |
|
1611 | allfilters.append(None) | |
|
1614 | if not filternames or 'unfiltered' in filternames: | |
|
1615 | # add unfiltered | |
|
1616 | allfilters.append(None) | |
|
1612 | 1617 | |
|
1613 | 1618 | branchcacheread = safeattrsetter(branchmap, 'read') |
|
1614 | 1619 | branchcachewrite = safeattrsetter(branchmap.branchcache, 'write') |
General Comments 0
You need to be logged in to leave comments.
Login now