Show More
@@ -1129,7 +1129,15 b' def perfrevset(ui, repo, expr, clear=Fal' | |||||
1129 | timer(d) |
|
1129 | timer(d) | |
1130 | fm.end() |
|
1130 | fm.end() | |
1131 |
|
1131 | |||
1132 | @command('perfvolatilesets', formatteropts) |
|
1132 | def _clearobsstore(repo): | |
|
1133 | unfi = repo.unfiltered() | |||
|
1134 | if 'obsstore' in vars(unfi): | |||
|
1135 | del unfi.obsstore | |||
|
1136 | del unfi._filecache['obsstore'] | |||
|
1137 | ||||
|
1138 | @command('perfvolatilesets', | |||
|
1139 | [('', 'clear-obsstore', False, 'drop obsstore between each call.'), | |||
|
1140 | ] + formatteropts) | |||
1133 | def perfvolatilesets(ui, repo, *names, **opts): |
|
1141 | def perfvolatilesets(ui, repo, *names, **opts): | |
1134 | """benchmark the computation of various volatile set |
|
1142 | """benchmark the computation of various volatile set | |
1135 |
|
1143 | |||
@@ -1140,6 +1148,8 b' def perfvolatilesets(ui, repo, *names, *' | |||||
1140 | def getobs(name): |
|
1148 | def getobs(name): | |
1141 | def d(): |
|
1149 | def d(): | |
1142 | repo.invalidatevolatilesets() |
|
1150 | repo.invalidatevolatilesets() | |
|
1151 | if opts['clear_obsstore']: | |||
|
1152 | _clearobsstore(repo) | |||
1143 | obsolete.getrevs(repo, name) |
|
1153 | obsolete.getrevs(repo, name) | |
1144 | return d |
|
1154 | return d | |
1145 |
|
1155 | |||
@@ -1153,6 +1163,8 b' def perfvolatilesets(ui, repo, *names, *' | |||||
1153 | def getfiltered(name): |
|
1163 | def getfiltered(name): | |
1154 | def d(): |
|
1164 | def d(): | |
1155 | repo.invalidatevolatilesets() |
|
1165 | repo.invalidatevolatilesets() | |
|
1166 | if opts['clear_obsstore']: | |||
|
1167 | _clearobsstore(repo) | |||
1156 | repoview.filterrevs(repo, name) |
|
1168 | repoview.filterrevs(repo, name) | |
1157 | return d |
|
1169 | return d | |
1158 |
|
1170 |
General Comments 0
You need to be logged in to leave comments.
Login now