revsetbenchmark: allow comments ('#' prefix) in the revset input
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 23 Sep 2014 17:09:19 -0700
changeset 22556 480a24ad9f77
parent 22555 2143d794e960
child 22557 ace8320156ef
revsetbenchmark: allow comments ('#' prefix) in the revset input
contrib/revsetbenchmarks.py
contrib/revsetbenchmarks.txt
--- a/contrib/revsetbenchmarks.py	Tue Sep 23 17:08:49 2014 -0700
+++ b/contrib/revsetbenchmarks.py	Tue Sep 23 17:09:19 2014 -0700
@@ -94,7 +94,7 @@
 if options.file:
     revsetsfile = open(options.file)
 
-revsets = [l.strip() for l in revsetsfile]
+revsets = [l.strip() for l in revsetsfile if not l.startswith('#')]
 
 print "Revsets to benchmark"
 print "----------------------------"
--- a/contrib/revsetbenchmarks.txt	Tue Sep 23 17:08:49 2014 -0700
+++ b/contrib/revsetbenchmarks.txt	Tue Sep 23 17:09:19 2014 -0700
@@ -14,7 +14,9 @@
 min(0:tip)
 0::
 min(0::)
+# those two `roots(...)` inputs are close to what phase movement use.
 roots((tip~100::) - (tip~100::tip))
+roots((0::) - (0::tip))
 ::p1(p1(tip))::
 public()
 :10000 and public()
@@ -23,7 +25,6 @@
 max(::(tip~20) - obsolete())
 roots((0:tip)::)
 (not public() - obsolete())
-roots((0::) - (0::tip))
 (_intlist('20000\x0020001')) and merge()
 parents(20000)
 (20000::) - (20000)