mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-19 14:13:49 -07:00
Compare commits
1262 Commits
0.0.11
...
ignore-0.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00bfcd14a6 | ||
|
|
bf0ddc4675 | ||
|
|
0fb3f6a159 | ||
|
|
837fb5e21f | ||
|
|
2e1815606e | ||
|
|
cb2f6ddc61 | ||
|
|
bd7a42602f | ||
|
|
528ce56e1b | ||
|
|
8892bf648c | ||
|
|
8cb7271b64 | ||
|
|
4858267f3b | ||
|
|
5011dba2fd | ||
|
|
e14f9195e5 | ||
|
|
ef0e7af56a | ||
|
|
b266818aa5 | ||
|
|
81415ae52d | ||
|
|
5c4584aa7c | ||
|
|
0972c6e7c7 | ||
|
|
0a372bf2e4 | ||
|
|
345124a7fa | ||
|
|
31807f805a | ||
|
|
4de227fd9a | ||
|
|
d7ce274722 | ||
|
|
5b10328f41 | ||
|
|
813c676eca | ||
|
|
f625d72b6f | ||
|
|
3de31f7527 | ||
|
|
e402d6c260 | ||
|
|
48b5bdc441 | ||
|
|
709ca91f50 | ||
|
|
9c220f9a9b | ||
|
|
9085bed139 | ||
|
|
931ab35f76 | ||
|
|
b5e5979ff1 | ||
|
|
052c857da0 | ||
|
|
5e84e784c8 | ||
|
|
01e8e11621 | ||
|
|
9268ff8e8d | ||
|
|
c2cb0a4de4 | ||
|
|
adb9332f52 | ||
|
|
bc37c32717 | ||
|
|
08ae4da2b7 | ||
|
|
7ac95c1f50 | ||
|
|
7a6903bd4e | ||
|
|
9801fae29f | ||
|
|
abdf7140d7 | ||
|
|
b83e7968ef | ||
|
|
8ebc113847 | ||
|
|
785c1f1766 | ||
|
|
8b734cb490 | ||
|
|
b93762ea7a | ||
|
|
34677d2622 | ||
|
|
d1389db2e3 | ||
|
|
50bcb7409e | ||
|
|
7b9972c308 | ||
|
|
9f000c2910 | ||
|
|
392682d352 | ||
|
|
7d3f794588 | ||
|
|
290fd2a7b6 | ||
|
|
d1e4d28f30 | ||
|
|
5ce2d7351d | ||
|
|
9dcfd9a205 | ||
|
|
36b276c6d0 | ||
|
|
03bf37ff4a | ||
|
|
e7829c05d3 | ||
|
|
a6222939f9 | ||
|
|
6ffd434232 | ||
|
|
1f1cd9b467 | ||
|
|
973de50c9e | ||
|
|
5f8805a496 | ||
|
|
fdde2bcd38 | ||
|
|
7b3fe6b325 | ||
|
|
b3dd3ae203 | ||
|
|
f3083e4574 | ||
|
|
d03e30707e | ||
|
|
d7f57d9aab | ||
|
|
1a2a24ea74 | ||
|
|
d66610b295 | ||
|
|
019ae1989b | ||
|
|
36d3f235dc | ||
|
|
79018eb693 | ||
|
|
44cd344438 | ||
|
|
e493e54b9b | ||
|
|
8e8215aa65 | ||
|
|
3fe701498e | ||
|
|
e79085e9e4 | ||
|
|
764c197022 | ||
|
|
ef1611b5f5 | ||
|
|
45d12abbc5 | ||
|
|
5fde8391f9 | ||
|
|
3edb11c513 | ||
|
|
ed144be775 | ||
|
|
967e7ad0de | ||
|
|
9952ba2068 | ||
|
|
b751758d60 | ||
|
|
8f14cb18a5 | ||
|
|
da9d720431 | ||
|
|
a9d71a0368 | ||
|
|
f3646242cc | ||
|
|
601f212a0b | ||
|
|
5a565354f8 | ||
|
|
2a6532ae71 | ||
|
|
ece1f50cfe | ||
|
|
a7d26c8f14 | ||
|
|
bd222ae93f | ||
|
|
4359d8aac0 | ||
|
|
308819fb1f | ||
|
|
09108b7fda | ||
|
|
743d64f2e4 | ||
|
|
5962abc465 | ||
|
|
1604a18db3 | ||
|
|
9eeb0b01ce | ||
|
|
df4400209a | ||
|
|
77439f99a4 | ||
|
|
be7d6dd9ce | ||
|
|
9f15e3b671 | ||
|
|
254b8b67bb | ||
|
|
8a7f43b84d | ||
|
|
d968a27ed5 | ||
|
|
9b8f5cbaba | ||
|
|
c52da74ac3 | ||
|
|
7dcbff9a9b | ||
|
|
bef1f0e770 | ||
|
|
cd9815cb37 | ||
|
|
3f22c3a658 | ||
|
|
0913972104 | ||
|
|
f19b84fb23 | ||
|
|
59fc583aeb | ||
|
|
1c7c4e6640 | ||
|
|
69c5e3938d | ||
|
|
d9cf05ad50 | ||
|
|
af8b6caebb | ||
|
|
c84cfb6756 | ||
|
|
895e26a000 | ||
|
|
8c95290ff6 | ||
|
|
d6feeb7ff2 | ||
|
|
626ed00c19 | ||
|
|
332ad18401 | ||
|
|
fc3cf41247 | ||
|
|
a4868b8835 | ||
|
|
f99b991117 | ||
|
|
de0bc78982 | ||
|
|
147e96914c | ||
|
|
0abc40c23c | ||
|
|
f768796e4f | ||
|
|
da0c0c4705 | ||
|
|
05411b2b32 | ||
|
|
cc93db3b18 | ||
|
|
049354b766 | ||
|
|
386dd2806d | ||
|
|
5fe9a954e6 | ||
|
|
f158a42a71 | ||
|
|
5724391d39 | ||
|
|
0df71240ff | ||
|
|
f3164f2615 | ||
|
|
31d3e24130 | ||
|
|
bf842dbc7f | ||
|
|
6d5dba85bd | ||
|
|
afb89bcdad | ||
|
|
332dc56372 | ||
|
|
12a6ca45f9 | ||
|
|
9d703110cf | ||
|
|
e99b6bda0e | ||
|
|
276e2c9b9a | ||
|
|
9a9f54d44c | ||
|
|
47833b9ce7 | ||
|
|
44a9e37737 | ||
|
|
8fd05cacee | ||
|
|
4691d11034 | ||
|
|
519a6b68af | ||
|
|
9c940b45f4 | ||
|
|
0a167021c3 | ||
|
|
aeaa5fc1b1 | ||
|
|
7048a06c31 | ||
|
|
23be3cf850 | ||
|
|
b48bbf527d | ||
|
|
8eabe47b57 | ||
|
|
ff712bfd9d | ||
|
|
a7f2d48234 | ||
|
|
57500ad013 | ||
|
|
0b04553aff | ||
|
|
1ae121122f | ||
|
|
688003e51c | ||
|
|
718a00f6f2 | ||
|
|
7cbc535d70 | ||
|
|
7a6a40bae1 | ||
|
|
1e9ee2cc85 | ||
|
|
968491f8e9 | ||
|
|
63b0f31a22 | ||
|
|
7ecee299a5 | ||
|
|
dd396ff34e | ||
|
|
fb0a82f3c3 | ||
|
|
dbc8ca9cc1 | ||
|
|
c3db8db93d | ||
|
|
17ef4c40f3 | ||
|
|
a9e0477ea8 | ||
|
|
b3c5773266 | ||
|
|
118b950085 | ||
|
|
b45b2f58ea | ||
|
|
662a9bc73d | ||
|
|
401add0a99 | ||
|
|
f81b72721b | ||
|
|
1d4fccaadc | ||
|
|
09e464e674 | ||
|
|
31adff6f3c | ||
|
|
b41e596327 | ||
|
|
fb62266620 | ||
|
|
acf226c39d | ||
|
|
8299625e48 | ||
|
|
db256c87eb | ||
|
|
ba533f390e | ||
|
|
ba503eb677 | ||
|
|
f72c2dfd90 | ||
|
|
c0aa58b4f7 | ||
|
|
184ee4c328 | ||
|
|
e82fbf2c46 | ||
|
|
eb18da0450 | ||
|
|
0f7494216f | ||
|
|
442a278635 | ||
|
|
7ebed3ace6 | ||
|
|
8a7db1a918 | ||
|
|
ce80d794c0 | ||
|
|
c5d467a2ab | ||
|
|
a62cd553c2 | ||
|
|
ce5188335b | ||
|
|
b7a456ae83 | ||
|
|
d14f0b37d6 | ||
|
|
3ddc3c040f | ||
|
|
eeaa42ecaf | ||
|
|
3797a2a5cb | ||
|
|
0e2f8f7b47 | ||
|
|
3dd4b77dfb | ||
|
|
3b5cdea862 | ||
|
|
54b3e9eb10 | ||
|
|
56e8864426 | ||
|
|
b8f619d16e | ||
|
|
83dff33326 | ||
|
|
003c3695f4 | ||
|
|
10777c150d | ||
|
|
827179250b | ||
|
|
fd22cd520b | ||
|
|
241bc8f8fc | ||
|
|
b6e30124e0 | ||
|
|
4846d63539 | ||
|
|
13c47530a6 | ||
|
|
328f4369e6 | ||
|
|
04518e32e7 | ||
|
|
f2eaf5b977 | ||
|
|
3edeeca6e9 | ||
|
|
c41b353009 | ||
|
|
d18839f3dc | ||
|
|
8f978a3cf7 | ||
|
|
87b745454d | ||
|
|
e5bb750995 | ||
|
|
d599f0b3c7 | ||
|
|
40e310a9f9 | ||
|
|
510f15f4da | ||
|
|
f9ce7a84a8 | ||
|
|
1b6089674e | ||
|
|
05a0389555 | ||
|
|
16353bad6e | ||
|
|
fe442de091 | ||
|
|
1bb8b7170f | ||
|
|
55ed698a98 | ||
|
|
f1e025873f | ||
|
|
033ad2b8e4 | ||
|
|
098a8ee843 | ||
|
|
2f3dbf5fee | ||
|
|
5c80e4adb6 | ||
|
|
fcd1853031 | ||
|
|
74a89be641 | ||
|
|
5b1ce8bdc2 | ||
|
|
1529ce3341 | ||
|
|
95a4f15916 | ||
|
|
0eef05142a | ||
|
|
edd6eb4e06 | ||
|
|
7ac9782970 | ||
|
|
180054d7dc | ||
|
|
7eaaa04c69 | ||
|
|
87a627631c | ||
|
|
9df60e164e | ||
|
|
afa06c518a | ||
|
|
e46aeb34f8 | ||
|
|
d8f187e990 | ||
|
|
7d93d2ab05 | ||
|
|
9ca2d68e94 | ||
|
|
60b0e3ff80 | ||
|
|
3a1c081c13 | ||
|
|
d5c0b03030 | ||
|
|
eb184d7711 | ||
|
|
bb110c1ebe | ||
|
|
d9ca529356 | ||
|
|
0958837ee1 | ||
|
|
94be3bd4bb | ||
|
|
deb1de6e1e | ||
|
|
6afdf15d85 | ||
|
|
6cda7b24e9 | ||
|
|
ad9befbc1d | ||
|
|
e86d3d95c2 | ||
|
|
6799dcfc0e | ||
|
|
0fdab0ec5e | ||
|
|
74ec5b8932 | ||
|
|
2913fc4cd0 | ||
|
|
7c412bb2fa | ||
|
|
651a0f1ddf | ||
|
|
45473ba48f | ||
|
|
0863c75a5a | ||
|
|
d94d99f657 | ||
|
|
84585908ac | ||
|
|
1611c04e6f | ||
|
|
d857ad6ed3 | ||
|
|
4dd2f8e40e | ||
|
|
dca8110da2 | ||
|
|
0d11497d21 | ||
|
|
22ac2e056e | ||
|
|
03af61fc7b | ||
|
|
560dffd247 | ||
|
|
e65ca21a6c | ||
|
|
6771626553 | ||
|
|
b9c922be53 | ||
|
|
7a44cad599 | ||
|
|
6dc09c5b1b | ||
|
|
209a125ea2 | ||
|
|
090216cf00 | ||
|
|
c96a358593 | ||
|
|
231456c409 | ||
|
|
1d09d4d31b | ||
|
|
02f08f3800 | ||
|
|
470afa1bd7 | ||
|
|
aa2ce39d14 | ||
|
|
d11a3b3377 | ||
|
|
d09e2f6af1 | ||
|
|
7b6af5a177 | ||
|
|
9bd1aa1c04 | ||
|
|
1393ce4b6b | ||
|
|
8e358ee056 | ||
|
|
5b5f4e74d9 | ||
|
|
7829850bf0 | ||
|
|
06b66efd59 | ||
|
|
7e5a590276 | ||
|
|
d17ca45063 | ||
|
|
df469fe1b4 | ||
|
|
b64475aeac | ||
|
|
fca9709d94 | ||
|
|
62b4813b8a | ||
|
|
b38b101c77 | ||
|
|
ac90316e35 | ||
|
|
a6467f880a | ||
|
|
004bb35694 | ||
|
|
cd6c190967 | ||
|
|
d5139228e5 | ||
|
|
bb16ba6311 | ||
|
|
5e85f2577b | ||
|
|
ca23a170f7 | ||
|
|
223d7d9846 | ||
|
|
e4bce86111 | ||
|
|
15fa77cdb3 | ||
|
|
c3f97513d6 | ||
|
|
c21b9b20cf | ||
|
|
ce145c6a2a | ||
|
|
a383d5c4e9 | ||
|
|
64317bda9f | ||
|
|
7f3a0f0828 | ||
|
|
49f36c7dcd | ||
|
|
83b4fdb8d6 | ||
|
|
8b57d78b96 | ||
|
|
a2d8c49d6f | ||
|
|
6ffb4b7466 | ||
|
|
198d1fede9 | ||
|
|
667b9a7d62 | ||
|
|
1f528f1641 | ||
|
|
ab64da73ab | ||
|
|
1266de3d4c | ||
|
|
bf51058eb2 | ||
|
|
3dc6fe6f05 | ||
|
|
06438d5360 | ||
|
|
ae6f871491 | ||
|
|
ed059559cd | ||
|
|
b75526bd7f | ||
|
|
507801c1f2 | ||
|
|
2a9d007261 | ||
|
|
0ee0b160b5 | ||
|
|
b4781e2f91 | ||
|
|
8cb03941e6 | ||
|
|
6b15ce2342 | ||
|
|
4c0b0c6c9d | ||
|
|
6c8b1e93d5 | ||
|
|
ebdb7c1d4c | ||
|
|
58bd0c67da | ||
|
|
1503b3175f | ||
|
|
0345e089aa | ||
|
|
0911ab1546 | ||
|
|
c4dd927a13 | ||
|
|
34abed597f | ||
|
|
835600794f | ||
|
|
07713fb5c5 | ||
|
|
d7c9323a68 | ||
|
|
b7d29d126f | ||
|
|
42b8132d0a | ||
|
|
cd08707c7c | ||
|
|
c2e97cd858 | ||
|
|
1f70e9187c | ||
|
|
7120f32258 | ||
|
|
00520b30f5 | ||
|
|
11a8f0eaf0 | ||
|
|
27fc9f2fd3 | ||
|
|
96f73293c0 | ||
|
|
b006943c01 | ||
|
|
91d0756f62 | ||
|
|
54256515b4 | ||
|
|
e2516ed095 | ||
|
|
c0c80e0209 | ||
|
|
dbf6f15625 | ||
|
|
9163aaac27 | ||
|
|
9d7448bfc0 | ||
|
|
b98585b429 | ||
|
|
f5411b992c | ||
|
|
492effc7be | ||
|
|
4889d2d37c | ||
|
|
354996a16f | ||
|
|
cbebb010a7 | ||
|
|
7098daf6a8 | ||
|
|
17d09c0882 | ||
|
|
c8e9f25b85 | ||
|
|
9305f89f39 | ||
|
|
9c216ad9a4 | ||
|
|
6862e07870 | ||
|
|
a6d09b2d42 | ||
|
|
ab1b877c20 | ||
|
|
2b5c488814 | ||
|
|
cb47be938e | ||
|
|
fe9be658f4 | ||
|
|
8c800adab7 | ||
|
|
d65966efbc | ||
|
|
597bf04a56 | ||
|
|
c78ab9e669 | ||
|
|
d57fc58081 | ||
|
|
d09538c974 | ||
|
|
94768881e1 | ||
|
|
f3a9ced82c | ||
|
|
18f549d289 | ||
|
|
c749b604dc | ||
|
|
d6748a3445 | ||
|
|
9b7f420faa | ||
|
|
361698b90a | ||
|
|
b71a110ccf | ||
|
|
5c1af3c25d | ||
|
|
ad3f55b0e5 | ||
|
|
b8e6d50bbe | ||
|
|
81afe8c5a0 | ||
|
|
c4e0d4bd7b | ||
|
|
23d1b91ead | ||
|
|
ac83ed4992 | ||
|
|
555fbd1201 | ||
|
|
f3146f8316 | ||
|
|
56341973ee | ||
|
|
a431160d4c | ||
|
|
5d15f49f0c | ||
|
|
7718ee362e | ||
|
|
739f8f596b | ||
|
|
e818d7529b | ||
|
|
a2a7f58aa6 | ||
|
|
c4a5bc06c5 | ||
|
|
96ee4482cd | ||
|
|
3effea0b7c | ||
|
|
2d68054b1d | ||
|
|
65a63788bc | ||
|
|
7e5589f07d | ||
|
|
09c5b2c4ea | ||
|
|
904c75bd30 | ||
|
|
ca3e0e8a49 | ||
|
|
ae2d036dd4 | ||
|
|
8e93fa0e7f | ||
|
|
7f5c07434b | ||
|
|
874f0b96a6 | ||
|
|
706323ad8f | ||
|
|
8460d7fe3d | ||
|
|
e1f1ede17d | ||
|
|
6553940328 | ||
|
|
b50ae9a99c | ||
|
|
224c112e05 | ||
|
|
8cb5833ef9 | ||
|
|
85cd3f0a6e | ||
|
|
c57d0fb4e8 | ||
|
|
d83bab4d3f | ||
|
|
ce84e1ef04 | ||
|
|
c8e755f11f | ||
|
|
68dac7c4b0 | ||
|
|
3535047094 | ||
|
|
fe00255494 | ||
|
|
07c837e740 | ||
|
|
cb0e693e31 | ||
|
|
e9d448e93b | ||
|
|
c7fc916e6b | ||
|
|
e36b65a11a | ||
|
|
11ad7ab204 | ||
|
|
93943793c3 | ||
|
|
0fedaa7d28 | ||
|
|
e05023b406 | ||
|
|
f007f940c5 | ||
|
|
a8543f798d | ||
|
|
ef9e17d28a | ||
|
|
3cb4d1337e | ||
|
|
8514d4fbb4 | ||
|
|
ed9150c9b4 | ||
|
|
51864c13fc | ||
|
|
35f802166d | ||
|
|
bba2d56292 | ||
|
|
012880914b | ||
|
|
832f5baf1a | ||
|
|
a6d3a959eb | ||
|
|
f00625c3f4 | ||
|
|
82d03b99cd | ||
|
|
ab2e8190e7 | ||
|
|
58bdc366ec | ||
|
|
34c0b1bc70 | ||
|
|
74e96b498c | ||
|
|
7e0fa1c6be | ||
|
|
50616935a9 | ||
|
|
01b7859399 | ||
|
|
5aed0522e8 | ||
|
|
d1fa295bb2 | ||
|
|
85d463c0cc | ||
|
|
75a4b7b361 | ||
|
|
c687d3a7c0 | ||
|
|
fbc1e7fa18 | ||
|
|
14779ed0ea | ||
|
|
b6177f0459 | ||
|
|
ba1023e1e4 | ||
|
|
5e73075ef5 | ||
|
|
1b42c02489 | ||
|
|
0d03145293 | ||
|
|
f8162d2707 | ||
|
|
e044cfb33f | ||
|
|
7dd1194a97 | ||
|
|
a5855a5d73 | ||
|
|
03b0d832ed | ||
|
|
636bbc7c8f | ||
|
|
162e085b98 | ||
|
|
86c890bcec | ||
|
|
d775259ed9 | ||
|
|
d73a75d6cd | ||
|
|
7ae1f373c2 | ||
|
|
4d34132365 | ||
|
|
5173bfb11b | ||
|
|
8141da9d39 | ||
|
|
373e0595e6 | ||
|
|
1374f15bdf | ||
|
|
263e8f92b9 | ||
|
|
231698f802 | ||
|
|
3e8b44619d | ||
|
|
679198e71a | ||
|
|
2c84825ccb | ||
|
|
948821753c | ||
|
|
d2a3b61220 | ||
|
|
acb57eb4ad | ||
|
|
256aeb5546 | ||
|
|
a9377da624 | ||
|
|
c794ef2f04 | ||
|
|
8b9eba2147 | ||
|
|
c4732ca012 | ||
|
|
1aec4b1123 | ||
|
|
c4e1945384 | ||
|
|
04d17040e7 | ||
|
|
8c8c83a1f8 | ||
|
|
5714dbde09 | ||
|
|
311ccb1f6b | ||
|
|
efa4de8126 | ||
|
|
ad5fa56490 | ||
|
|
1bf9d29259 | ||
|
|
2a14bf2249 | ||
|
|
f0028a66ec | ||
|
|
08060a2105 | ||
|
|
cd575d99f8 | ||
|
|
1267f01c24 | ||
|
|
322d5515e5 | ||
|
|
f4770c2094 | ||
|
|
f887bc1f86 | ||
|
|
363a4fa9b7 | ||
|
|
712311fdc6 | ||
|
|
0d2354aca6 | ||
|
|
8dc513b5d2 | ||
|
|
a98156e71c | ||
|
|
cf94072429 | ||
|
|
db14046de4 | ||
|
|
36091591f0 | ||
|
|
12ffcb4296 | ||
|
|
e7c06b92fb | ||
|
|
353806b87a | ||
|
|
aebb132a86 | ||
|
|
ab4b6ab9c3 | ||
|
|
413178bc2c | ||
|
|
58fb4f987e | ||
|
|
4f1d6af296 | ||
|
|
6b79349f83 | ||
|
|
f858828f61 | ||
|
|
67b835fe2a | ||
|
|
214f2bef66 | ||
|
|
1136f8adab | ||
|
|
beb010d004 | ||
|
|
f9cbf7d3d4 | ||
|
|
7eb1dd129e | ||
|
|
a5f82e8826 | ||
|
|
ca6bd648ab | ||
|
|
af77dd55a2 | ||
|
|
3065a8c9c8 | ||
|
|
208c11af56 | ||
|
|
12a78a992c | ||
|
|
d97c80be63 | ||
|
|
5213bd30ea | ||
|
|
82d101907a | ||
|
|
30608f2444 | ||
|
|
3d323928a0 | ||
|
|
8b6a3bc858 | ||
|
|
e10544f819 | ||
|
|
dc7e39a6ba | ||
|
|
36c16eb00c | ||
|
|
fffee61f80 | ||
|
|
4cfb2b515b | ||
|
|
398326bfe2 | ||
|
|
01358a155c | ||
|
|
30ca3ecca6 | ||
|
|
dbc91644fd | ||
|
|
73c9ac4da5 | ||
|
|
fe7fe74b0a | ||
|
|
3d9acdab18 | ||
|
|
40bacbcd7c | ||
|
|
b3a9c34515 | ||
|
|
972ec1adc6 | ||
|
|
a2d4c03c71 | ||
|
|
b7c3cf314d | ||
|
|
6dce04963d | ||
|
|
d4b790fd8d | ||
|
|
9283dd122e | ||
|
|
4c41e9225b | ||
|
|
9f2b054550 | ||
|
|
5613df3034 | ||
|
|
79ad81626f | ||
|
|
354a5cad97 | ||
|
|
92e5fad27d | ||
|
|
f86f987d71 | ||
|
|
bfbd53eb92 | ||
|
|
0668c74ed4 | ||
|
|
1c03298903 | ||
|
|
e0e8f26c56 | ||
|
|
f5337329f4 | ||
|
|
84f4b4ef68 | ||
|
|
aeac85389d | ||
|
|
9b3921098a | ||
|
|
ad262f1146 | ||
|
|
170c078440 | ||
|
|
db044a058a | ||
|
|
c1f8040b32 | ||
|
|
c8a5a7a3f4 | ||
|
|
dd3df0ded7 | ||
|
|
62a182af78 | ||
|
|
4047d9db71 | ||
|
|
4683a325fa | ||
|
|
b6f1e5db1a | ||
|
|
9e51b18ac7 | ||
|
|
9d7b6eb09a | ||
|
|
7763c98188 | ||
|
|
06393f888c | ||
|
|
e0989ef13b | ||
|
|
45e850aff7 | ||
|
|
f2d1c582a8 | ||
|
|
ab70815ea2 | ||
|
|
27f97db510 | ||
|
|
506ad1f3cf | ||
|
|
13235b596f | ||
|
|
2628c8f38e | ||
|
|
112b3c5e0a | ||
|
|
4c78ca8b70 | ||
|
|
ff898cd105 | ||
|
|
2c98e5ce1e | ||
|
|
1e3fc79949 | ||
|
|
d1bbc6956b | ||
|
|
cd6c54f5f4 | ||
|
|
44c03f58bc | ||
|
|
d1a6ab922e | ||
|
|
b860fa3acd | ||
|
|
229b8e3b33 | ||
|
|
a515c4d601 | ||
|
|
5a666b042d | ||
|
|
16109166fe | ||
|
|
0b685c8429 | ||
|
|
d2c7a76a3c | ||
|
|
20f7d9b3a2 | ||
|
|
362abed44a | ||
|
|
c50b8b4125 | ||
|
|
7ad23e5565 | ||
|
|
66efbad871 | ||
|
|
1f2a9b0306 | ||
|
|
a45fe94240 | ||
|
|
ac1c95a6d9 | ||
|
|
685b431d80 | ||
|
|
487713aa34 | ||
|
|
e300541701 | ||
|
|
e9df420d2f | ||
|
|
201b4fc757 | ||
|
|
90a11dec5e | ||
|
|
9456d95e8f | ||
|
|
0c298f60a6 | ||
|
|
79271fcb33 | ||
|
|
fc975af8e9 | ||
|
|
1425d6735e | ||
|
|
aed3ccb9c7 | ||
|
|
33c95d2919 | ||
|
|
01deac9427 | ||
|
|
b4bc3b6349 | ||
|
|
685cc6c562 | ||
|
|
08c017330f | ||
|
|
2f3a8c7f69 | ||
|
|
3ac1b68e54 | ||
|
|
0ebd5465b7 | ||
|
|
5cb4bb9ea0 | ||
|
|
c8a179b4da | ||
|
|
46f94826fd | ||
|
|
75f1855a91 | ||
|
|
fd9870d668 | ||
|
|
a3a2708067 | ||
|
|
78847b65c8 | ||
|
|
e962eea1cc | ||
|
|
95bc678403 | ||
|
|
68af3bbdc4 | ||
|
|
70b6bdb104 | ||
|
|
c648eadbaa | ||
|
|
d352b79294 | ||
|
|
23aec58669 | ||
|
|
ae863bc7aa | ||
|
|
f0d3cae569 | ||
|
|
4ef4818130 | ||
|
|
8db24e1353 | ||
|
|
8bbe58d623 | ||
|
|
b3fd0df94b | ||
|
|
c1b841e934 | ||
|
|
f5ede0e319 | ||
|
|
6ecffec537 | ||
|
|
80e91a1f1d | ||
|
|
d570f78144 | ||
|
|
7c37065911 | ||
|
|
50f7a60a8d | ||
|
|
33ec988d70 | ||
|
|
adff43fbb4 | ||
|
|
71585f6d47 | ||
|
|
714ae82241 | ||
|
|
49fd668712 | ||
|
|
066f97d855 | ||
|
|
df1bf4a042 | ||
|
|
4e8c0fc4ad | ||
|
|
da1764dfd1 | ||
|
|
48a8a3a691 | ||
|
|
796eaab0d7 | ||
|
|
bf49448e1e | ||
|
|
cffba53379 | ||
|
|
79d40d0e20 | ||
|
|
525b278049 | ||
|
|
16de47920c | ||
|
|
a114b86063 | ||
|
|
a5a16ebb27 | ||
|
|
8ac5bc0147 | ||
|
|
cf750a190f | ||
|
|
d825648b86 | ||
|
|
22cb644eb6 | ||
|
|
e424f87487 | ||
|
|
f5b2c96b77 | ||
|
|
6e209b6fdb | ||
|
|
72e3c54e0a | ||
|
|
b67886264f | ||
|
|
e67ab459d3 | ||
|
|
7a926d090d | ||
|
|
596f94aa7f | ||
|
|
de55d37bea | ||
|
|
fecef10c1c | ||
|
|
79e5e6671f | ||
|
|
b04a68a782 | ||
|
|
e573ab5c60 | ||
|
|
f5a2d022ec | ||
|
|
b1d1cd2366 | ||
|
|
f26e0f088f | ||
|
|
057ed6305a | ||
|
|
730beb9cb5 | ||
|
|
ed60ec736c | ||
|
|
a7ca2d6563 | ||
|
|
a7d0e40668 | ||
|
|
7a951f103a | ||
|
|
c3de1f58ea | ||
|
|
e940bc956d | ||
|
|
8751e55706 | ||
|
|
2143bcf9cb | ||
|
|
a6a24bafb3 | ||
|
|
db27a33827 | ||
|
|
083fb73790 | ||
|
|
461e0c4e33 | ||
|
|
82df3b7685 | ||
|
|
ece6011164 | ||
|
|
00033e1875 | ||
|
|
5aea517fb4 | ||
|
|
073ff35ebb | ||
|
|
c4633ff187 | ||
|
|
97e6873b38 | ||
|
|
ed01e80a79 | ||
|
|
8f7b9be356 | ||
|
|
851799f42b | ||
|
|
b65a8c353b | ||
|
|
95cea77625 | ||
|
|
b187c1a817 | ||
|
|
f7a2fe30d4 | ||
|
|
aed315e80a | ||
|
|
2f0d9d411a | ||
|
|
163e00677a | ||
|
|
d58236fbdc | ||
|
|
932875684e | ||
|
|
b65bb37b14 | ||
|
|
de5cb7d22e | ||
|
|
7a682f465e | ||
|
|
084d3f4911 | ||
|
|
9911cd0cd9 | ||
|
|
de91c26bb1 | ||
|
|
5b1796d64d | ||
|
|
d4527854de | ||
|
|
82ceb818f3 | ||
|
|
dd5ded2f78 | ||
|
|
cbacf4f19e | ||
|
|
900ef0abc7 | ||
|
|
8396d3ffaa | ||
|
|
652c70f207 | ||
|
|
bb70f96743 | ||
|
|
6d346a09de | ||
|
|
699c76f45c | ||
|
|
de33003527 | ||
|
|
3e943636f4 | ||
|
|
3f515afbb4 | ||
|
|
30db03bb62 | ||
|
|
d66812102b | ||
|
|
86f8c3c818 | ||
|
|
5eb2ca4338 | ||
|
|
20bcb8d883 | ||
|
|
7282706b42 | ||
|
|
160f04894f | ||
|
|
0473df1ef5 | ||
|
|
301a3fd71d | ||
|
|
d12bdf35a5 | ||
|
|
08514e8e6c | ||
|
|
687e846944 | ||
|
|
b286fdcb88 | ||
|
|
e3959d67a6 | ||
|
|
7d475b0c70 | ||
|
|
42223047a8 | ||
|
|
42afb6faa5 | ||
|
|
c4a6733f3b | ||
|
|
9e04a8283c | ||
|
|
05b26d5986 | ||
|
|
506f046b8b | ||
|
|
ae592b11e3 | ||
|
|
a5e7f176f1 | ||
|
|
0428bd1bec | ||
|
|
7f3e7d2faa | ||
|
|
8d5906d7fc | ||
|
|
feda38852e | ||
|
|
59187902d0 | ||
|
|
aef46beaf2 | ||
|
|
f0e192943f | ||
|
|
df72d8d1e0 | ||
|
|
d06f84ced3 | ||
|
|
9598331fa8 | ||
|
|
883d8fc72f | ||
|
|
e8a30cb893 | ||
|
|
03f7605322 | ||
|
|
61663e2307 | ||
|
|
bd3e7eedb1 | ||
|
|
1e6c2ac8e3 | ||
|
|
0302d58eb8 | ||
|
|
e37f783fc0 | ||
|
|
495e13cc61 | ||
|
|
92dc402f7f | ||
|
|
a3f5e0c3d5 | ||
|
|
39e1a0d694 | ||
|
|
e9cd0a1cc3 | ||
|
|
cc35ae0748 | ||
|
|
5ee175beaf | ||
|
|
4b18f82899 | ||
|
|
5462af4434 | ||
|
|
d2e70da040 | ||
|
|
64dc9b6709 | ||
|
|
9ffd4c421f | ||
|
|
d862b80afb | ||
|
|
5b73dcc8ab | ||
|
|
2dce0dc0df | ||
|
|
2e5c3c05e8 | ||
|
|
6884eea2f5 | ||
|
|
a3a2f0be6a | ||
|
|
f24873c70b | ||
|
|
58126ffe15 | ||
|
|
17644a76c0 | ||
|
|
9fc9f368f5 | ||
|
|
9cab076a72 | ||
|
|
7aa9652f3c | ||
|
|
7187f61ca8 | ||
|
|
f869c58a5a | ||
|
|
3538ba3577 | ||
|
|
a454fa75b9 | ||
|
|
18943b9317 | ||
|
|
68427b5b79 | ||
|
|
4ca15a8a51 | ||
|
|
2daef51fe5 | ||
|
|
43ed91dc5c | ||
|
|
dada75d2a7 | ||
|
|
76b9f01ad2 | ||
|
|
8baa0e56b7 | ||
|
|
301ee6d3f5 | ||
|
|
77ad7588ae | ||
|
|
58aca2efb2 | ||
|
|
351eddc17e | ||
|
|
277dda544c | ||
|
|
8c869cbd87 | ||
|
|
598b162fea | ||
|
|
0222e024fe | ||
|
|
5bd0edbbe1 | ||
|
|
4368913d8f | ||
|
|
02de97b8ce | ||
|
|
32db773d51 | ||
|
|
b272be25fa | ||
|
|
f63c168563 | ||
|
|
a05671c8d7 | ||
|
|
1aeae3e22d | ||
|
|
60d537c43d | ||
|
|
ef5c07476b | ||
|
|
4f6f34307c | ||
|
|
7cf560d27c | ||
|
|
15b263ff55 | ||
|
|
53121e0733 | ||
|
|
404785f950 | ||
|
|
103c4c953c | ||
|
|
82abf883c5 | ||
|
|
a2315d5ee5 | ||
|
|
201d0cb8c1 | ||
|
|
6f45478a7d | ||
|
|
9c2c569624 | ||
|
|
a1e4e0f85c | ||
|
|
caf31a769b | ||
|
|
920112e640 | ||
|
|
a84ffe603b | ||
|
|
e4f83f3161 | ||
|
|
fbca4a0332 | ||
|
|
65c7df1c25 | ||
|
|
18237da9b2 | ||
|
|
f147f3aa39 | ||
|
|
599c4fc3f3 | ||
|
|
d85a6dd5c8 | ||
|
|
40abade8ee | ||
|
|
fca4fdf6ea | ||
|
|
16975797fe | ||
|
|
6507a48f97 | ||
|
|
c8e2fa1869 | ||
|
|
f728708ce9 | ||
|
|
c302995d05 | ||
|
|
4a77cc8100 | ||
|
|
dc86666044 | ||
|
|
6b038511c7 | ||
|
|
c767bccade | ||
|
|
a075a462fa | ||
|
|
24f753c306 | ||
|
|
1aae2759ad | ||
|
|
91646f6cca | ||
|
|
031ace209d | ||
|
|
942e9c4743 | ||
|
|
12c9656b18 | ||
|
|
8bf3760cdb | ||
|
|
c96623e66a | ||
|
|
36f949633b | ||
|
|
811fcc1fe8 | ||
|
|
79a8d0ab3f | ||
|
|
fbf8265cde | ||
|
|
d79add341b | ||
|
|
12b2b1f624 | ||
|
|
3aaf550ca5 | ||
|
|
d4876cd064 | ||
|
|
867a57e176 | ||
|
|
ec4904df33 | ||
|
|
c4ea157cb7 | ||
|
|
0156967f4c | ||
|
|
3238707b0b | ||
|
|
31fbae597f | ||
|
|
f2e1711781 | ||
|
|
94d600e6e1 | ||
|
|
b904c5d9dc | ||
|
|
5a29417796 | ||
|
|
f694800768 | ||
|
|
bd1c9e9499 | ||
|
|
f04b0dd95c | ||
|
|
5487dffefa | ||
|
|
1fc6787648 | ||
|
|
11e164aec9 | ||
|
|
1c1331d926 | ||
|
|
cbe94823d2 | ||
|
|
d8712daf27 | ||
|
|
7cbbef019f | ||
|
|
4d29d886e5 | ||
|
|
247a9398f4 | ||
|
|
4c3025ab1c | ||
|
|
4981991a6e | ||
|
|
51440f59cd | ||
|
|
7b8a8d77d0 | ||
|
|
4737326ed3 | ||
|
|
a3537aa32a | ||
|
|
d3e118a786 | ||
|
|
4e52059ad6 | ||
|
|
60c016c243 | ||
|
|
4665128f25 | ||
|
|
dde5bd5a80 | ||
|
|
762ad44f71 | ||
|
|
705386934d | ||
|
|
97bbc6ef11 | ||
|
|
27a980c1bc | ||
|
|
e8645dc8ae | ||
|
|
e96d93034a | ||
|
|
bc5accc035 | ||
|
|
c9d0ca8257 | ||
|
|
45fe4aab96 | ||
|
|
97f981fbcb | ||
|
|
59329dcc61 | ||
|
|
604da8eb86 | ||
|
|
1c964372ad | ||
|
|
50a961960e | ||
|
|
7481c5fe29 | ||
|
|
3ae37b0937 | ||
|
|
4ee6dbe422 | ||
|
|
cd4bdcf810 | ||
|
|
175406df01 | ||
|
|
89811d43d4 | ||
|
|
f0053682c0 | ||
|
|
35045d6105 | ||
|
|
95f552fc06 | ||
|
|
48353bea17 | ||
|
|
703d5b558e | ||
|
|
47efea234f | ||
|
|
ca0d8998a2 | ||
|
|
fdf24317ac | ||
|
|
b9d5f22a4d | ||
|
|
67bb4f040f | ||
|
|
cee2f09a6d | ||
|
|
ced777e91f | ||
|
|
e9d9083898 | ||
|
|
46dff8f4be | ||
|
|
7aa6e87952 | ||
|
|
925d0db9f0 | ||
|
|
316ffd87b3 | ||
|
|
5943b1effe | ||
|
|
c42f97b4da | ||
|
|
0d9bba7816 | ||
|
|
3550f2e29a | ||
|
|
babe80d498 | ||
|
|
3e892a7a80 | ||
|
|
1df3f0b793 | ||
|
|
b3935935cb | ||
|
|
67abbf6f22 | ||
|
|
7b9f7d7dc6 | ||
|
|
7ab29a91d0 | ||
|
|
9fa38c6232 | ||
|
|
de79be2db2 | ||
|
|
416b69bae5 | ||
|
|
3e78fce3a3 | ||
|
|
7a3fd1f23f | ||
|
|
d306403440 | ||
|
|
ebabe1df6a | ||
|
|
f27aa3ff6f | ||
|
|
20ccd441f2 | ||
|
|
104d740f76 | ||
|
|
2da0eab2b8 | ||
|
|
b8c7864a02 | ||
|
|
ec26995655 | ||
|
|
a41235a3b5 | ||
|
|
1a91b900e7 | ||
|
|
2b15832655 | ||
|
|
b1c52b52d6 | ||
|
|
109bc3f78e | ||
|
|
b62195b33f | ||
|
|
baebfd7add | ||
|
|
19e405e5c5 | ||
|
|
f85822266f | ||
|
|
b034b77798 | ||
|
|
278e1168bf | ||
|
|
6a8051b258 | ||
|
|
a13ac3e3d4 | ||
|
|
a72467996b | ||
|
|
9395076468 | ||
|
|
a12c63957b | ||
|
|
982265af70 | ||
|
|
ed94aedf27 | ||
|
|
fd5ae2f795 | ||
|
|
3d6a39be06 | ||
|
|
e7839f2200 | ||
|
|
9dc5464c84 | ||
|
|
95edcd4d3a | ||
|
|
d97f404970 | ||
|
|
b2bbd46178 | ||
|
|
82542df5cb | ||
|
|
e4329037aa | ||
|
|
ab0d1c1c79 | ||
|
|
2015c56e8d | ||
|
|
23ad8b989d | ||
|
|
a8f3d9e87e | ||
|
|
9f1aae64f8 | ||
|
|
1595f0faf5 | ||
|
|
8eeb0c0b60 | ||
|
|
423f2a1927 | ||
|
|
4b5e789a2a | ||
|
|
37b731a048 | ||
|
|
a44735aa87 | ||
|
|
6b2efd4d88 | ||
|
|
c8227e0cf3 | ||
|
|
b941c10b90 | ||
|
|
872a107658 | ||
|
|
71ad9bf393 | ||
|
|
f733e9ebe4 | ||
|
|
ce85df1d2e | ||
|
|
a6e3cab65a | ||
|
|
7b860affbe | ||
|
|
af4dc78537 | ||
|
|
9ce0484670 | ||
|
|
346bad7dfc | ||
|
|
56fe93d343 | ||
|
|
155676b474 | ||
|
|
a3fc4cdded | ||
|
|
3bec8f3f0a | ||
|
|
3b37f12ec0 | ||
|
|
a2ed677e03 | ||
|
|
2fb9c3c42c | ||
|
|
447e1ba0e2 | ||
|
|
3b45059212 | ||
|
|
f74078af5b | ||
|
|
5ff9b2f2a2 | ||
|
|
cc90511ab2 | ||
|
|
f5d60a80a8 | ||
|
|
6fa158f6d3 | ||
|
|
ef6dea40ff | ||
|
|
9035c6b7b3 | ||
|
|
f5eb36baac | ||
|
|
6367dd61ba | ||
|
|
98892de1c1 | ||
|
|
273c14a45a | ||
|
|
b33e9cba69 | ||
|
|
d5c045469b | ||
|
|
0ce82403d4 | ||
|
|
d2f95f6e59 | ||
|
|
25c259112b | ||
|
|
dfebed6cbe | ||
|
|
9981e7883a | ||
|
|
8d202e4bcf | ||
|
|
14c194dbe1 | ||
|
|
d547b92d76 | ||
|
|
e5a9cd1b64 | ||
|
|
2115774c6e | ||
|
|
9087154b74 | ||
|
|
bb4fd9ddce | ||
|
|
d772b21f3d | ||
|
|
1b14e245be | ||
|
|
49003e8488 | ||
|
|
80c362623a | ||
|
|
c1c484d1a7 | ||
|
|
263e2b012f | ||
|
|
b80a986721 | ||
|
|
8a91d3132f | ||
|
|
525d051172 | ||
|
|
5a9883d27c | ||
|
|
f462d092e7 | ||
|
|
fe84928c85 | ||
|
|
f7eaf67fc3 | ||
|
|
c1c92e4fee | ||
|
|
5644bbe43a | ||
|
|
aeb3a5ba0f | ||
|
|
24e14a0341 | ||
|
|
2a2b1506d4 | ||
|
|
4d6b3c727e | ||
|
|
c2bf9e3d45 | ||
|
|
dad73b92eb | ||
|
|
b0d8ff6f4a | ||
|
|
0263a401f6 | ||
|
|
4cb1b9ccc0 | ||
|
|
6f80e2e126 | ||
|
|
f9bff90842 | ||
|
|
5af4ec0056 | ||
|
|
9e2f10b893 | ||
|
|
69095cf5c3 | ||
|
|
7402db7b43 | ||
|
|
7698b60256 | ||
|
|
e7fb0fd267 | ||
|
|
29b59074c7 | ||
|
|
ee5eb2d659 | ||
|
|
bf8094344a | ||
|
|
a0819978aa | ||
|
|
5b7c17e2fb | ||
|
|
bf56b3bb8e | ||
|
|
9299d84d41 | ||
|
|
2cf1a08969 | ||
|
|
665b6016e3 | ||
|
|
33231622f3 | ||
|
|
919c5c7299 | ||
|
|
f9bf1e4a22 | ||
|
|
f7ee914dd3 | ||
|
|
0a63158a61 | ||
|
|
6cb604f38f | ||
|
|
bfbbfbf979 | ||
|
|
403ba5fdc8 | ||
|
|
8f87a4e8ac | ||
|
|
d27d3e675f | ||
|
|
bf5d873099 | ||
|
|
bc9d12c4c8 | ||
|
|
5a0c873f61 | ||
|
|
65fec147d6 | ||
|
|
7fbf2f014c | ||
|
|
d22a3ca3e5 | ||
|
|
e9ec52b7f9 | ||
|
|
0d14c74e63 | ||
|
|
1c5884b2f9 | ||
|
|
8203a80ac7 | ||
|
|
0e46171e3b | ||
|
|
f5c85827ce | ||
|
|
7cefc55238 | ||
|
|
92c918ebd9 | ||
|
|
c24f8fd50f | ||
|
|
73272cf8a6 | ||
|
|
4212a8b9cb | ||
|
|
983c7fd6f9 | ||
|
|
7cd02e9b7e | ||
|
|
5fdfae2f15 | ||
|
|
7057ee91de | ||
|
|
fdca74148d | ||
|
|
f11d9fb922 | ||
|
|
1115c23a4c | ||
|
|
8c5eaa40b2 | ||
|
|
3c05954c86 | ||
|
|
cf3a33cea7 | ||
|
|
8aa2ba3eb1 | ||
|
|
466cd70a8e | ||
|
|
954fbeb1d8 | ||
|
|
68fa50709e | ||
|
|
ab91e4b874 | ||
|
|
2b943eda47 | ||
|
|
37544c092f | ||
|
|
9bf7696ec8 | ||
|
|
cb0f8fd2fa | ||
|
|
fa8112ec34 | ||
|
|
cf21b4a97e | ||
|
|
19615245cd | ||
|
|
98a48b44bc | ||
|
|
e3da726836 | ||
|
|
5b36c86c15 | ||
|
|
76331e5fec | ||
|
|
1e678d7052 | ||
|
|
dd986d7fe9 | ||
|
|
f83cd63b11 | ||
|
|
9a4527d107 | ||
|
|
8f0d3d78ca | ||
|
|
3f7cd977bc | ||
|
|
cc6b6dcf5b | ||
|
|
48878bbb8f | ||
|
|
0766617e07 | ||
|
|
afd99c43d7 | ||
|
|
96e87ab738 | ||
|
|
a744ec133d |
108
.github/workflows/ci.yml
vendored
Normal file
108
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
name: ci
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
schedule:
|
||||||
|
- cron: '00 01 * * *'
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- name: no-op
|
||||||
|
run: echo hello
|
||||||
|
|
||||||
|
# test:
|
||||||
|
# name: test
|
||||||
|
# runs-on: ${{ matrix.os }}
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# # The docs seem to suggest that we can have a matrix with just an
|
||||||
|
# # include directive, but it result in a "matrix must define at least
|
||||||
|
# # one vector" error in the CI system.
|
||||||
|
# build:
|
||||||
|
# # - pinned-glibc
|
||||||
|
# - pinned-musl
|
||||||
|
# - stable
|
||||||
|
# # - beta
|
||||||
|
# # We test musl with nightly because every once in a while, this will
|
||||||
|
# # catch an upstream regression.
|
||||||
|
# # - nightly-glibc
|
||||||
|
# # - nightly-musl
|
||||||
|
# # - macos
|
||||||
|
# # - win-msvc-32
|
||||||
|
# # - win-msvc-64
|
||||||
|
# # - win-gnu-32
|
||||||
|
# # - win-gnu-64
|
||||||
|
# include:
|
||||||
|
# # - build: pinned-glibc
|
||||||
|
# # os: ubuntu-18.04
|
||||||
|
# # rust: 1.34.0
|
||||||
|
# # target: x86_64-unknown-linux-gnu
|
||||||
|
# - build: pinned-musl
|
||||||
|
# os: ubuntu-18.04
|
||||||
|
# rust: 1.34.0
|
||||||
|
# target: x86_64-unknown-linux-musl
|
||||||
|
# - build: stable
|
||||||
|
# os: ubuntu-18.04
|
||||||
|
# rust: stable
|
||||||
|
# target: x86_64-unknown-linux-gnu
|
||||||
|
# # - build: beta
|
||||||
|
# # os: ubuntu-18.04
|
||||||
|
# # rust: beta
|
||||||
|
# # target: x86_64-unknown-linux-gnu
|
||||||
|
# # - build: nightly-glibc
|
||||||
|
# # os: ubuntu-18.04
|
||||||
|
# # rust: nightly
|
||||||
|
# # target: x86_64-unknown-linux-gnu
|
||||||
|
# # - build: nightly-musl
|
||||||
|
# # os: ubuntu-18.04
|
||||||
|
# # rust: nightly
|
||||||
|
# # target: x86_64-unknown-linux-musl
|
||||||
|
# # - build: macos
|
||||||
|
# # os: macOS-10.14
|
||||||
|
# # rust: stable
|
||||||
|
# # target: x86_64-apple-darwin
|
||||||
|
# # - build: win-msvc-32
|
||||||
|
# # os: windows-2019
|
||||||
|
# # rust: stable
|
||||||
|
# # target: i686-pc-windows-msvc
|
||||||
|
# # - build: win-msvc-64
|
||||||
|
# # os: windows-2019
|
||||||
|
# # rust: stable
|
||||||
|
# # target: x86_64-pc-windows-msvc
|
||||||
|
# # - build: win-gnu-32
|
||||||
|
# # os: windows-2019
|
||||||
|
# # rust: stable-i686-gnu
|
||||||
|
# # target: i686-pc-windows-gnu
|
||||||
|
# # - build: win-gnu-64
|
||||||
|
# # os: windows-2019
|
||||||
|
# # rust: stable-x86_64-gnu
|
||||||
|
# # target: x86_64-pc-windows-gnu
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout repository
|
||||||
|
# uses: actions/checkout@v1
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 1
|
||||||
|
# - name: Install Rust
|
||||||
|
# uses: hecrj/setup-rust-action@v1
|
||||||
|
# with:
|
||||||
|
# rust-version: ${{ matrix.rust }}
|
||||||
|
# - name: Install Rust Target
|
||||||
|
# run: rustup target add ${{ matrix.target }}
|
||||||
|
# - name: Install musl-gcc
|
||||||
|
# if: contains(matrix.target, 'musl')
|
||||||
|
# run: |
|
||||||
|
# sudo apt-get install musl-tools
|
||||||
|
# - name: Build everything
|
||||||
|
# run: cargo build --verbose --target ${{ matrix.target }} --all --features pcre2
|
||||||
|
# - name: Install zsh
|
||||||
|
# if: matrix.build == 'stable'
|
||||||
|
# run: sudo apt-get install zsh
|
||||||
|
# - name: Test zsh auto-completions
|
||||||
|
# if: matrix.build == 'stable'
|
||||||
|
# run: ./ci/test_complete.sh
|
||||||
|
# - name: Run tests
|
||||||
|
# run: cargo test --verbose --target ${{ matrix.target }} --all --features pcre2
|
||||||
25
.gitignore
vendored
25
.gitignore
vendored
@@ -1,14 +1,17 @@
|
|||||||
.*.swp
|
.*.swp
|
||||||
tags
|
tags
|
||||||
target
|
target
|
||||||
*.lock
|
/grep/Cargo.lock
|
||||||
tmp
|
/globset/Cargo.lock
|
||||||
*.csv
|
/ignore/Cargo.lock
|
||||||
*.fst
|
/termcolor/Cargo.lock
|
||||||
*-got
|
/wincolor/Cargo.lock
|
||||||
*.csv.idx
|
/deployment
|
||||||
words
|
|
||||||
98m*
|
# Snapcraft files
|
||||||
dict
|
stage
|
||||||
test
|
prime
|
||||||
months
|
parts
|
||||||
|
*.snap
|
||||||
|
*.pyc
|
||||||
|
ripgrep*_source.tar.bz2
|
||||||
|
|||||||
138
.travis.yml
138
.travis.yml
@@ -1,74 +1,110 @@
|
|||||||
#language: rust
|
|
||||||
#rust:
|
|
||||||
# - stable
|
|
||||||
# - beta
|
|
||||||
# - nightly
|
|
||||||
#script:
|
|
||||||
# - cargo build --verbose
|
|
||||||
# - cargo doc
|
|
||||||
# - cargo test --verbose
|
|
||||||
# - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
|
|
||||||
# cargo bench --verbose;
|
|
||||||
# fi
|
|
||||||
|
|
||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
dist: xenial
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- PROJECT_NAME=xrep
|
- PROJECT_NAME: ripgrep
|
||||||
|
- RUST_BACKTRACE: full
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
# For generating man page.
|
||||||
|
- libxslt1-dev
|
||||||
|
- asciidoc
|
||||||
|
- docbook-xsl
|
||||||
|
- xsltproc
|
||||||
|
- libxml2-utils
|
||||||
|
# Needed for completion-function test.
|
||||||
|
- zsh
|
||||||
|
# Needed for testing decompression search.
|
||||||
|
- xz-utils
|
||||||
|
- liblz4-tool
|
||||||
|
# For building MUSL static builds on Linux.
|
||||||
|
- musl-tools
|
||||||
matrix:
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
# Nightly channel
|
# Nightly channel.
|
||||||
- os: osx
|
# All *nix releases are done on the nightly channel to take advantage
|
||||||
rust: nightly
|
# of the regex library's multiple pattern SIMD search.
|
||||||
env: TARGET=i686-apple-darwin
|
|
||||||
- os: osx
|
|
||||||
rust: nightly
|
|
||||||
env: TARGET=x86_64-apple-darwin
|
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: nightly
|
rust: nightly
|
||||||
env: TARGET=i686-unknown-linux-musl
|
env: TARGET=i686-unknown-linux-musl
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: nightly
|
rust: nightly
|
||||||
env: TARGET=x86_64-unknown-linux-musl
|
env: TARGET=x86_64-unknown-linux-musl
|
||||||
|
- os: osx
|
||||||
before_install:
|
rust: nightly
|
||||||
- export PATH="$PATH:$HOME/.cargo/bin"
|
# XML_CATALOG_FILES is apparently necessary for asciidoc on macOS.
|
||||||
|
env: TARGET=x86_64-apple-darwin XML_CATALOG_FILES=/usr/local/etc/xml/catalog
|
||||||
install:
|
- os: linux
|
||||||
- bash ci/install.sh
|
rust: nightly
|
||||||
|
env: TARGET=arm-unknown-linux-gnueabihf GCC_VERSION=4.8
|
||||||
script:
|
addons:
|
||||||
- bash ci/script.sh
|
apt:
|
||||||
|
packages:
|
||||||
before_deploy:
|
- gcc-4.8-arm-linux-gnueabihf
|
||||||
- bash ci/before_deploy.sh
|
- binutils-arm-linux-gnueabihf
|
||||||
|
- libc6-armhf-cross
|
||||||
|
- libc6-dev-armhf-cross
|
||||||
|
# For generating man page.
|
||||||
|
- libxslt1-dev
|
||||||
|
- asciidoc
|
||||||
|
- docbook-xsl
|
||||||
|
- xsltproc
|
||||||
|
- libxml2-utils
|
||||||
|
# Beta channel. We enable these to make sure there are no regressions in
|
||||||
|
# Rust beta releases.
|
||||||
|
- os: linux
|
||||||
|
rust: beta
|
||||||
|
env: TARGET=x86_64-unknown-linux-musl
|
||||||
|
- os: linux
|
||||||
|
rust: beta
|
||||||
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
# Minimum Rust supported channel. We enable these to make sure ripgrep
|
||||||
|
# continues to work on the advertised minimum Rust version.
|
||||||
|
- os: linux
|
||||||
|
rust: 1.34.0
|
||||||
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
- os: linux
|
||||||
|
rust: 1.34.0
|
||||||
|
env: TARGET=x86_64-unknown-linux-musl
|
||||||
|
- os: linux
|
||||||
|
rust: 1.34.0
|
||||||
|
env: TARGET=arm-unknown-linux-gnueabihf GCC_VERSION=4.8
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- gcc-4.8-arm-linux-gnueabihf
|
||||||
|
- binutils-arm-linux-gnueabihf
|
||||||
|
- libc6-armhf-cross
|
||||||
|
- libc6-dev-armhf-cross
|
||||||
|
# For generating man page.
|
||||||
|
- libxslt1-dev
|
||||||
|
- asciidoc
|
||||||
|
- docbook-xsl
|
||||||
|
- xsltproc
|
||||||
|
- libxml2-utils
|
||||||
|
install: ci/install.sh
|
||||||
|
script: ci/script.sh
|
||||||
|
before_deploy: ci/before_deploy.sh
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
|
file_glob: true
|
||||||
|
file: deployment/${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
condition: $TRAVIS_RUST_VERSION = nightly
|
||||||
|
branch: master # i guess we do need this after all?
|
||||||
|
tags: true
|
||||||
api_key:
|
api_key:
|
||||||
secure: "IbSnsbGkxSydR/sozOf1/SRvHplzwRUHzcTjM7BKnr7GccL86gRPUrsrvD103KjQUGWIc1TnK1YTq5M0Onswg/ORDjqa1JEJPkPdPnVh9ipbF7M2De/7IlB4X4qXLKoApn8+bx2x/mfYXu4G+G1/2QdbaKK2yfXZKyjz0YFx+6CNrVCT2Nk8q7aHvOOzAL58vsG8iPDpupuhxlMDDn/UhyOWVInmPPQ0iJR1ZUJN8xJwXvKvBbfp3AhaBiAzkhXHNLgBR8QC5noWWMXnuVDMY3k4f3ic0V+p/qGUCN/nhptuceLxKFicMCYObSZeUzE5RAI0/OBW7l3z2iCoc+TbAnn+JrX/ObJCfzgAOXAU3tLaBFMiqQPGFKjKg1ltSYXomOFP/F7zALjpvFp4lYTBajRR+O3dqaxA9UQuRjw27vOeUpMcga4ZzL4VXFHzrxZKBHN//XIGjYAVhJ1NSSeGpeJV5/+jYzzWKfwSagRxQyVCzMooYFFXzn8Yxdm3PJlmp3GaAogNkdB9qKcrEvRINCelalzALPi0hD/HUDi8DD2PNTCLLMo6VSYtvc685Zbe+KgNzDV1YyTrRCUW6JotrS0r2ULLwnsh40hSB//nNv3XmwNmC/CmW5QAnIGj8cBMF4S2t6ohADIndojdAfNiptmaZOIT6owK7bWMgPMyopo="
|
secure: "IbSnsbGkxSydR/sozOf1/SRvHplzwRUHzcTjM7BKnr7GccL86gRPUrsrvD103KjQUGWIc1TnK1YTq5M0Onswg/ORDjqa1JEJPkPdPnVh9ipbF7M2De/7IlB4X4qXLKoApn8+bx2x/mfYXu4G+G1/2QdbaKK2yfXZKyjz0YFx+6CNrVCT2Nk8q7aHvOOzAL58vsG8iPDpupuhxlMDDn/UhyOWVInmPPQ0iJR1ZUJN8xJwXvKvBbfp3AhaBiAzkhXHNLgBR8QC5noWWMXnuVDMY3k4f3ic0V+p/qGUCN/nhptuceLxKFicMCYObSZeUzE5RAI0/OBW7l3z2iCoc+TbAnn+JrX/ObJCfzgAOXAU3tLaBFMiqQPGFKjKg1ltSYXomOFP/F7zALjpvFp4lYTBajRR+O3dqaxA9UQuRjw27vOeUpMcga4ZzL4VXFHzrxZKBHN//XIGjYAVhJ1NSSeGpeJV5/+jYzzWKfwSagRxQyVCzMooYFFXzn8Yxdm3PJlmp3GaAogNkdB9qKcrEvRINCelalzALPi0hD/HUDi8DD2PNTCLLMo6VSYtvc685Zbe+KgNzDV1YyTrRCUW6JotrS0r2ULLwnsh40hSB//nNv3XmwNmC/CmW5QAnIGj8cBMF4S2t6ohADIndojdAfNiptmaZOIT6owK7bWMgPMyopo="
|
||||||
file_glob: true
|
|
||||||
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.*
|
|
||||||
# don't delete the artifacts from previous phases
|
|
||||||
skip_cleanup: true
|
|
||||||
# deploy when a new tag is pushed
|
|
||||||
on:
|
|
||||||
# channel to use to produce the release artifacts
|
|
||||||
# NOTE make sure you only release *once* per target
|
|
||||||
# TODO you may want to pick a different channel
|
|
||||||
condition: $TRAVIS_RUST_VERSION = nightly
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
# Pushes and PR to the master branch
|
# Pushes and PR to the master branch
|
||||||
- master
|
- master
|
||||||
# IMPORTANT Ruby regex to match tags. Required, or travis won't trigger deploys when a new tag
|
# Ruby regex to match tags. Required, or travis won't trigger deploys when
|
||||||
# is pushed. This regex matches semantic versions like v1.2.3-rc4+2016.02.22
|
# a new tag is pushed.
|
||||||
- /^\d+\.\d+\.\d+.*$/
|
- /^\d+\.\d+\.\d+.*$/
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
on_success: never
|
on_success: never
|
||||||
|
|||||||
1196
CHANGELOG.md
Normal file
1196
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
596
Cargo.lock
generated
Normal file
596
Cargo.lock
generated
Normal file
@@ -0,0 +1,596 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
[[package]]
|
||||||
|
name = "aho-corasick"
|
||||||
|
version = "0.7.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "atty"
|
||||||
|
version = "0.2.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "autocfg"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "base64"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "1.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bstr"
|
||||||
|
version = "0.2.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bytecount"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "byteorder"
|
||||||
|
version = "1.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cc"
|
||||||
|
version = "1.0.50"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cfg-if"
|
||||||
|
version = "0.1.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "clap"
|
||||||
|
version = "2.33.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam-channel"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam-utils"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "encoding_rs"
|
||||||
|
version = "0.8.22"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"packed_simd 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "encoding_rs_io"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fnv"
|
||||||
|
version = "1.0.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fs_extra"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "glob"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "globset"
|
||||||
|
version = "0.4.4"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep"
|
||||||
|
version = "0.2.4"
|
||||||
|
dependencies = [
|
||||||
|
"grep-cli 0.1.3",
|
||||||
|
"grep-matcher 0.1.3",
|
||||||
|
"grep-pcre2 0.1.3",
|
||||||
|
"grep-printer 0.1.3",
|
||||||
|
"grep-regex 0.1.5",
|
||||||
|
"grep-searcher 0.1.6",
|
||||||
|
"termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep-cli"
|
||||||
|
version = "0.1.3"
|
||||||
|
dependencies = [
|
||||||
|
"atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"globset 0.4.4",
|
||||||
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep-matcher"
|
||||||
|
version = "0.1.3"
|
||||||
|
dependencies = [
|
||||||
|
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep-pcre2"
|
||||||
|
version = "0.1.3"
|
||||||
|
dependencies = [
|
||||||
|
"grep-matcher 0.1.3",
|
||||||
|
"pcre2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep-printer"
|
||||||
|
version = "0.1.3"
|
||||||
|
dependencies = [
|
||||||
|
"base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"grep-matcher 0.1.3",
|
||||||
|
"grep-regex 0.1.5",
|
||||||
|
"grep-searcher 0.1.6",
|
||||||
|
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep-regex"
|
||||||
|
version = "0.1.5"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"grep-matcher 0.1.3",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grep-searcher"
|
||||||
|
version = "0.1.6"
|
||||||
|
dependencies = [
|
||||||
|
"bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"bytecount 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"encoding_rs_io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"grep-matcher 0.1.3",
|
||||||
|
"grep-regex 0.1.5",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hermit-abi"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ignore"
|
||||||
|
version = "0.4.11"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"globset 0.4.4",
|
||||||
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "0.4.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jemalloc-sys"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jemallocator"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lazy_static"
|
||||||
|
version = "1.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.66"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "log"
|
||||||
|
version = "0.4.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "2.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memmap"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num_cpus"
|
||||||
|
version = "1.11.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "packed_simd"
|
||||||
|
version = "0.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pcre2"
|
||||||
|
version = "0.2.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pcre2-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pcre2-sys"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pkg-config"
|
||||||
|
version = "0.3.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro2"
|
||||||
|
version = "1.0.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quote"
|
||||||
|
version = "1.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "1.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-automata"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.6.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ripgrep"
|
||||||
|
version = "11.0.2"
|
||||||
|
dependencies = [
|
||||||
|
"bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"grep 0.2.4",
|
||||||
|
"ignore 0.4.11",
|
||||||
|
"jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ryu"
|
||||||
|
version = "1.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "same-file"
|
||||||
|
version = "1.0.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "1.0.104"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive"
|
||||||
|
version = "1.0.104"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json"
|
||||||
|
version = "1.0.44"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strsim"
|
||||||
|
version = "0.8.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "1.0.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "termcolor"
|
||||||
|
version = "1.0.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "textwrap"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thread_local"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-width"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-xid"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "walkdir"
|
||||||
|
version = "2.2.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi"
|
||||||
|
version = "0.3.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-i686-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-util"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-x86_64-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wincolor"
|
||||||
|
version = "1.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[metadata]
|
||||||
|
"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
|
||||||
|
"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||||
|
"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
|
||||||
|
"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
||||||
|
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||||
|
"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245"
|
||||||
|
"checksum bytecount 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0017894339f586ccb943b01b9555de56770c11cda818e7e3d8bd93f4ed7f46e"
|
||||||
|
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
||||||
|
"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
|
||||||
|
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||||
|
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||||
|
"checksum crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c"
|
||||||
|
"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
|
||||||
|
"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28"
|
||||||
|
"checksum encoding_rs_io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9619ee7a2bf4e777e020b95c1439abaf008f8ea8041b78a0552c4f1bcf4df32c"
|
||||||
|
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
||||||
|
"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674"
|
||||||
|
"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
||||||
|
"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772"
|
||||||
|
"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
|
||||||
|
"checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45"
|
||||||
|
"checksum jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69"
|
||||||
|
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
|
||||||
|
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||||
|
"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
|
||||||
|
"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
|
||||||
|
"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"
|
||||||
|
"checksum packed_simd 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a85ea9fc0d4ac0deb6fe7911d38786b32fc11119afd9e9d38b84ff691ce64220"
|
||||||
|
"checksum pcre2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "85b30f2f69903b439dd9dc9e824119b82a55bf113b29af8d70948a03c1b11ab1"
|
||||||
|
"checksum pcre2-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "876c72d05059d23a84bd9fcdc3b1d31c50ea7fe00fe1522b4e68cd3608db8d5b"
|
||||||
|
"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
|
||||||
|
"checksum proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0319972dcae462681daf4da1adeeaa066e3ebd29c69be96c6abb1259d2ee2bcc"
|
||||||
|
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||||
|
"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87"
|
||||||
|
"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"
|
||||||
|
"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90"
|
||||||
|
"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
|
||||||
|
"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421"
|
||||||
|
"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
|
||||||
|
"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
|
||||||
|
"checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7"
|
||||||
|
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||||
|
"checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8"
|
||||||
|
"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e"
|
||||||
|
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||||
|
"checksum thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "88ddf1ad580c7e3d1efff877d972bcc93f995556b9087a5a259630985c88ceab"
|
||||||
|
"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||||
|
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||||
|
"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e"
|
||||||
|
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||||
|
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||||
|
"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"
|
||||||
|
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9"
|
||||||
126
Cargo.toml
126
Cargo.toml
@@ -1,51 +1,111 @@
|
|||||||
[package]
|
[package]
|
||||||
publish = false
|
name = "ripgrep"
|
||||||
name = "xrep"
|
version = "11.0.2" #:version
|
||||||
version = "0.1.0" #:version
|
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Line oriented search tool using Rust's regex library.
|
ripgrep is a line-oriented search tool that recursively searches your current
|
||||||
|
directory for a regex pattern while respecting your gitignore rules. ripgrep
|
||||||
|
has first class support on Windows, macOS and Linux.
|
||||||
"""
|
"""
|
||||||
documentation = "https://github.com/BurntSushi/xrep"
|
documentation = "https://github.com/BurntSushi/ripgrep"
|
||||||
homepage = "https://github.com/BurntSushi/xrep"
|
homepage = "https://github.com/BurntSushi/ripgrep"
|
||||||
repository = "https://github.com/BurntSushi/xrep"
|
repository = "https://github.com/BurntSushi/ripgrep"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["regex", "grep", "egrep", "search", "pattern"]
|
keywords = ["regex", "grep", "egrep", "search", "pattern"]
|
||||||
license = "Unlicense/MIT"
|
categories = ["command-line-utilities", "text-processing"]
|
||||||
|
license = "Unlicense OR MIT"
|
||||||
|
exclude = ["HomebrewFormula"]
|
||||||
|
build = "build.rs"
|
||||||
|
autotests = false
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[badges]
|
||||||
|
travis-ci = { repository = "BurntSushi/ripgrep" }
|
||||||
|
appveyor = { repository = "BurntSushi/ripgrep" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
bench = false
|
bench = false
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
name = "xrep"
|
name = "rg"
|
||||||
|
|
||||||
|
[[test]]
|
||||||
|
name = "integration"
|
||||||
|
path = "tests/tests.rs"
|
||||||
|
|
||||||
|
[workspace]
|
||||||
|
members = [
|
||||||
|
"globset",
|
||||||
|
"grep",
|
||||||
|
"grep-cli",
|
||||||
|
"grep-matcher",
|
||||||
|
"grep-pcre2",
|
||||||
|
"grep-printer",
|
||||||
|
"grep-regex",
|
||||||
|
"grep-searcher",
|
||||||
|
"ignore",
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
crossbeam = "0.2"
|
bstr = "0.2.0"
|
||||||
docopt = "0.6"
|
grep = { version = "0.2.4", path = "grep" }
|
||||||
env_logger = "0.3"
|
ignore = { version = "0.4.7", path = "ignore" }
|
||||||
grep = { version = "0.1", path = "grep" }
|
lazy_static = "1.1.0"
|
||||||
lazy_static = "0.2"
|
log = "0.4.5"
|
||||||
libc = "0.2"
|
num_cpus = "1.8.0"
|
||||||
log = "0.3"
|
regex = "1.0.5"
|
||||||
memchr = "0.1"
|
serde_json = "1.0.23"
|
||||||
memmap = "0.2"
|
termcolor = "1.0.3"
|
||||||
num_cpus = "1"
|
|
||||||
regex = "0.1.75"
|
|
||||||
regex-syntax = "0.3.5"
|
|
||||||
rustc-serialize = "0.3"
|
|
||||||
term = "0.4"
|
|
||||||
thread_local = "0.2"
|
|
||||||
walkdir = "0.1"
|
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[dependencies.clap]
|
||||||
kernel32-sys = "0.2"
|
version = "2.32.0"
|
||||||
winapi = "0.2"
|
default-features = false
|
||||||
|
features = ["suggestions"]
|
||||||
|
|
||||||
[features]
|
[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator]
|
||||||
simd-accel = ["regex/simd-accel"]
|
version = "0.3.0"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
lazy_static = "1.1.0"
|
||||||
|
|
||||||
|
[build-dependencies.clap]
|
||||||
|
version = "2.32.0"
|
||||||
|
default-features = false
|
||||||
|
features = ["suggestions"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
glob = "0.2"
|
serde = "1.0.77"
|
||||||
|
serde_derive = "1.0.77"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
simd-accel = ["grep/simd-accel"]
|
||||||
|
pcre2 = ["grep/pcre2"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = true
|
debug = 1
|
||||||
panic = "abort"
|
|
||||||
|
[package.metadata.deb]
|
||||||
|
features = ["pcre2"]
|
||||||
|
section = "utils"
|
||||||
|
assets = [
|
||||||
|
["target/release/rg", "usr/bin/", "755"],
|
||||||
|
["COPYING", "usr/share/doc/ripgrep/", "644"],
|
||||||
|
["LICENSE-MIT", "usr/share/doc/ripgrep/", "644"],
|
||||||
|
["UNLICENSE", "usr/share/doc/ripgrep/", "644"],
|
||||||
|
["CHANGELOG.md", "usr/share/doc/ripgrep/CHANGELOG", "644"],
|
||||||
|
["README.md", "usr/share/doc/ripgrep/README", "644"],
|
||||||
|
["FAQ.md", "usr/share/doc/ripgrep/FAQ", "644"],
|
||||||
|
# The man page is automatically generated by ripgrep's build process, so
|
||||||
|
# this file isn't actually commited. Instead, to create a dpkg, either
|
||||||
|
# create a deployment/deb directory and copy the man page to it, or use the
|
||||||
|
# 'ci/build_deb.sh' script.
|
||||||
|
["deployment/deb/rg.1", "usr/share/man/man1/rg.1", "644"],
|
||||||
|
# Similarly for shell completions.
|
||||||
|
["deployment/deb/rg.bash", "usr/share/bash-completion/completions/rg", "644"],
|
||||||
|
["deployment/deb/rg.fish", "usr/share/fish/completions/rg.fish", "644"],
|
||||||
|
["deployment/deb/_rg", "usr/share/zsh/vendor-completions/", "644"],
|
||||||
|
]
|
||||||
|
extended-description = """\
|
||||||
|
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
||||||
|
By default, ripgrep will respect your .gitignore and automatically skip hidden
|
||||||
|
files/directories and binary files.
|
||||||
|
"""
|
||||||
|
|||||||
2
Cross.toml
Normal file
2
Cross.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[target.x86_64-unknown-linux-musl]
|
||||||
|
image = "burntsushi/cross:x86_64-unknown-linux-musl"
|
||||||
983
FAQ.md
Normal file
983
FAQ.md
Normal file
@@ -0,0 +1,983 @@
|
|||||||
|
## FAQ
|
||||||
|
|
||||||
|
* [Does ripgrep support configuration files?](#config)
|
||||||
|
* [What's changed in ripgrep recently?](#changelog)
|
||||||
|
* [When is the next release?](#release)
|
||||||
|
* [Does ripgrep have a man page?](#manpage)
|
||||||
|
* [Does ripgrep have support for shell auto-completion?](#complete)
|
||||||
|
* [How do I use lookaround and/or backreferences?](#fancy)
|
||||||
|
* [How do I configure ripgrep's colors?](#colors)
|
||||||
|
* [How do I enable true colors on Windows?](#truecolors-windows)
|
||||||
|
* [How do I stop ripgrep from messing up colors when I kill it?](#stop-ripgrep)
|
||||||
|
* [How can I get results in a consistent order?](#order)
|
||||||
|
* [How do I search files that aren't UTF-8?](#encoding)
|
||||||
|
* [How do I search compressed files?](#compressed)
|
||||||
|
* [How do I search over multiple lines?](#multiline)
|
||||||
|
* [How do I get around the regex size limit?](#size-limit)
|
||||||
|
* [How do I make the `-f/--file` flag faster?](#dfa-size)
|
||||||
|
* [How do I make the output look like The Silver Searcher's output?](#silver-searcher-output)
|
||||||
|
* [Why does ripgrep get slower when I enabled PCRE2 regexes?](#pcre2-slow)
|
||||||
|
* [When I run `rg`, why does it execute some other command?](#rg-other-cmd)
|
||||||
|
* [How do I create an alias for ripgrep on Windows?](#rg-alias-windows)
|
||||||
|
* [How do I create a PowerShell profile?](#powershell-profile)
|
||||||
|
* [How do I pipe non-ASCII content to ripgrep on Windows?](#pipe-non-ascii-windows)
|
||||||
|
* [How can I search and replace with ripgrep?](#search-and-replace)
|
||||||
|
* [How is ripgrep licensed?](#license)
|
||||||
|
* [Can ripgrep replace grep?](#posix4ever)
|
||||||
|
* [What does the "rip" in ripgrep mean?](#intentcountsforsomething)
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="config">
|
||||||
|
Does ripgrep support configuration files?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Yes. See the
|
||||||
|
[guide's section on configuration files](GUIDE.md#configuration-file).
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="changelog">
|
||||||
|
What's changed in ripgrep recently?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Please consult ripgrep's [CHANGELOG](CHANGELOG.md).
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="release">
|
||||||
|
When is the next release?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
ripgrep is a project whose contributors are volunteers. A release schedule
|
||||||
|
adds undue stress to said volunteers. Therefore, releases are made on a best
|
||||||
|
effort basis and no dates **will ever be given**.
|
||||||
|
|
||||||
|
One exception to this is high impact bugs. If a ripgrep release contains a
|
||||||
|
significant regression, then there will generally be a strong push to get a
|
||||||
|
patch release out with a fix.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="manpage">
|
||||||
|
Does ripgrep have a man page?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Yes! Whenever ripgrep is compiled on a system with `asciidoc` present, then a
|
||||||
|
man page is generated from ripgrep's argv parser. After compiling ripgrep, you
|
||||||
|
can find the man page like so from the root of the repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ find ./target -name rg.1 -print0 | xargs -0 ls -t | head -n1
|
||||||
|
./target/debug/build/ripgrep-79899d0edd4129ca/out/rg.1
|
||||||
|
```
|
||||||
|
|
||||||
|
Running `man -l ./target/debug/build/ripgrep-79899d0edd4129ca/out/rg.1` will
|
||||||
|
show the man page in your normal pager.
|
||||||
|
|
||||||
|
Note that the man page's documentation for options is equivalent to the output
|
||||||
|
shown in `rg --help`. To see more condensed documentation (one line per flag),
|
||||||
|
run `rg -h`.
|
||||||
|
|
||||||
|
The man page is also included in all
|
||||||
|
[ripgrep binary releases](https://github.com/BurntSushi/ripgrep/releases).
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="complete">
|
||||||
|
Does ripgrep have support for shell auto-completion?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Yes! Shell completions can be found in the
|
||||||
|
[same directory as the man page](#manpage)
|
||||||
|
after building ripgrep. Zsh completions are maintained separately and committed
|
||||||
|
to the repository in `complete/_rg`.
|
||||||
|
|
||||||
|
Shell completions are also included in all
|
||||||
|
[ripgrep binary releases](https://github.com/BurntSushi/ripgrep/releases).
|
||||||
|
|
||||||
|
For **bash**, move `rg.bash` to
|
||||||
|
`$XDG_CONFIG_HOME/bash_completion` or `/etc/bash_completion.d/`.
|
||||||
|
|
||||||
|
For **fish**, move `rg.fish` to `$HOME/.config/fish/completions/`.
|
||||||
|
|
||||||
|
For **zsh**, move `_rg` to one of your `$fpath` directories.
|
||||||
|
|
||||||
|
For **PowerShell**, add `. _rg.ps1` to your PowerShell
|
||||||
|
[profile](https://technet.microsoft.com/en-us/library/bb613488(v=vs.85).aspx)
|
||||||
|
(note the leading period). If the `_rg.ps1` file is not on your `PATH`, do
|
||||||
|
`. /path/to/_rg.ps1` instead.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="order">
|
||||||
|
How can I get results in a consistent order?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
By default, ripgrep uses parallelism to execute its search because this makes
|
||||||
|
the search much faster on most modern systems. This in turn means that ripgrep
|
||||||
|
has a non-deterministic aspect to it, since the interleaving of threads during
|
||||||
|
the execution of the program is itself non-deterministic. This has the effect
|
||||||
|
of printing results in a somewhat arbitrary order, and this order can change
|
||||||
|
from run to run of ripgrep.
|
||||||
|
|
||||||
|
The only way to make the order of results consistent is to ask ripgrep to
|
||||||
|
sort the output. Currently, this will disable all parallelism. (On smaller
|
||||||
|
repositories, you might not notice much of a performance difference!) You
|
||||||
|
can achieve this with the `--sort path` flag.
|
||||||
|
|
||||||
|
There is more discussion on this topic here:
|
||||||
|
https://github.com/BurntSushi/ripgrep/issues/152
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="encoding">
|
||||||
|
How do I search files that aren't UTF-8?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
See the [guide's section on file encoding](GUIDE.md#file-encoding).
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="compressed">
|
||||||
|
How do I search compressed files?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
ripgrep's `-z/--search-zip` flag will cause it to search compressed files
|
||||||
|
automatically. Currently, this supports gzip, bzip2, xz, lzma, lz4, Brotli and
|
||||||
|
Zstd. Each of these requires requires the corresponding `gzip`, `bzip2`, `xz`,
|
||||||
|
`lz4`, `brotli` and `zstd` binaries to be installed on your system. (That is,
|
||||||
|
ripgrep does decompression by shelling out to another process.)
|
||||||
|
|
||||||
|
ripgrep currently does not search archive formats, so `*.tar.gz` files, for
|
||||||
|
example, are skipped.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="multiline">
|
||||||
|
How do I search over multiple lines?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
The `-U/--multiline` flag enables ripgrep to report results that span over
|
||||||
|
multiple lines.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="fancy">
|
||||||
|
How do I use lookaround and/or backreferences?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
ripgrep's default regex engine does not support lookaround or backreferences.
|
||||||
|
This is primarily because the default regex engine is implemented using finite
|
||||||
|
state machines in order to guarantee a linear worst case time complexity on all
|
||||||
|
inputs. Backreferences are not possible to implement in this paradigm, and
|
||||||
|
lookaround appears difficult to do efficiently.
|
||||||
|
|
||||||
|
However, ripgrep optionally supports using PCRE2 as the regex engine instead of
|
||||||
|
the default one based on finite state machines. You can enable PCRE2 with the
|
||||||
|
`-P/--pcre2` flag. For example, in the root of the ripgrep repo, you can easily
|
||||||
|
find all palindromes:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg -P '(\w{10})\1'
|
||||||
|
tests/misc.rs
|
||||||
|
483: cmd.arg("--max-filesize").arg("44444444444444444444");
|
||||||
|
globset/src/glob.rs
|
||||||
|
1206: matches!(match7, "a*a*a*a*a*a*a*a*a", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
```
|
||||||
|
|
||||||
|
If your version of ripgrep doesn't support PCRE2, then you'll get an error
|
||||||
|
message when you try to use the `-P/--pcre2` flag:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg -P '(\w{10})\1'
|
||||||
|
PCRE2 is not available in this build of ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
Most of the releases distributed by the ripgrep project here on GitHub will
|
||||||
|
come bundled with PCRE2 enabled. If you installed ripgrep through a different
|
||||||
|
means (like your system's package manager), then please reach out to the
|
||||||
|
maintainer of that package to see whether it's possible to enable the PCRE2
|
||||||
|
feature.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="colors">
|
||||||
|
How do I configure ripgrep's colors?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
ripgrep has two flags related to colors:
|
||||||
|
|
||||||
|
* `--color` controls *when* to use colors.
|
||||||
|
* `--colors` controls *which* colors to use.
|
||||||
|
|
||||||
|
The `--color` flag accepts one of the following possible values: `never`,
|
||||||
|
`auto`, `always` or `ansi`. The `auto` value is the default and will cause
|
||||||
|
ripgrep to only enable colors when it is printing to a terminal. But if you
|
||||||
|
pipe ripgrep to a file or some other process, then it will suppress colors.
|
||||||
|
|
||||||
|
The --colors` flag is a bit more complicated. The general format is:
|
||||||
|
|
||||||
|
```
|
||||||
|
--colors '{type}:{attribute}:{value}'
|
||||||
|
```
|
||||||
|
|
||||||
|
* `{type}` should be one of `path`, `line`, `column` or `match`. Each of these
|
||||||
|
correspond to the four different types of things that ripgrep will add color
|
||||||
|
to in its output. Select the type whose color you want to change.
|
||||||
|
* `{attribute}` should be one of `fg`, `bg` or `style`, corresponding to
|
||||||
|
foreground color, background color, or miscellaneous styling (such as whether
|
||||||
|
to bold the output or not).
|
||||||
|
* `{value}` is determined by the value of `{attribute}`. If
|
||||||
|
`{attribute}` is `style`, then `{value}` should be one of `nobold`,
|
||||||
|
`bold`, `nointense`, `intense`, `nounderline` or `underline`. If
|
||||||
|
`{attribute}` is `fg` or `bg`, then `{value}` should be a color.
|
||||||
|
|
||||||
|
A color is specified by either one of eight of English names, a single 256-bit
|
||||||
|
number or an RGB triple (with over 16 million possible values, or "true
|
||||||
|
color").
|
||||||
|
|
||||||
|
The color names are `red`, `blue`, `green`, `cyan`, `magenta`, `yellow`,
|
||||||
|
`white` or `black`.
|
||||||
|
|
||||||
|
A single 256-bit number is a value in the range 0-255 (inclusive). It can
|
||||||
|
either be in decimal format (e.g., `62`) or hexadecimal format (e.g., `0x3E`).
|
||||||
|
|
||||||
|
An RGB triple corresponds to three numbers (decimal or hexadecimal) separated
|
||||||
|
by commas.
|
||||||
|
|
||||||
|
As a special case, `--colors '{type}:none'` will clear all colors and styles
|
||||||
|
associated with `{type}`, which lets you start with a clean slate (instead of
|
||||||
|
building on top of ripgrep's default color settings).
|
||||||
|
|
||||||
|
Here's an example that makes highlights the matches with a nice blue background
|
||||||
|
with bolded white text:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg somepattern \
|
||||||
|
--colors 'match:none' \
|
||||||
|
--colors 'match:bg:0x33,0x66,0xFF' \
|
||||||
|
--colors 'match:fg:white' \
|
||||||
|
--colors 'match:style:bold'
|
||||||
|
```
|
||||||
|
|
||||||
|
Colors are an ideal candidate to set in your
|
||||||
|
[configuration file](GUIDE.md#configuration-file). See the
|
||||||
|
[question on emulating The Silver Searcher's output style](#silver-searcher-output)
|
||||||
|
for an example specific to colors.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="truecolors-windows">
|
||||||
|
How do I enable true colors on Windows?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
First, see the previous question's
|
||||||
|
[answer on configuring colors](#colors).
|
||||||
|
|
||||||
|
Secondly, coloring on Windows is a bit complicated. If you're using a terminal
|
||||||
|
like Cygwin, then it's likely true color support already works out of the box.
|
||||||
|
However, if you are using a normal Windows console (`cmd` or `PowerShell`) and
|
||||||
|
a version of Windows prior to 10, then there is no known way to get true
|
||||||
|
color support. If you are on Windows 10 and using a Windows console, then
|
||||||
|
true colors should work out of the box with one caveat: you might need to
|
||||||
|
clear ripgrep's default color settings first. That is, instead of this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg somepattern --colors 'match:fg:0x33,0x66,0xFF'
|
||||||
|
```
|
||||||
|
|
||||||
|
you should do this
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg somepattern --colors 'match:none' --colors 'match:fg:0x33,0x66,0xFF'
|
||||||
|
```
|
||||||
|
|
||||||
|
This is because ripgrep might set the default style for `match` to `bold`, and
|
||||||
|
it seems like Windows 10's VT100 support doesn't permit bold and true color
|
||||||
|
ANSI escapes to be used simultaneously. The work-around above will clear
|
||||||
|
ripgrep's default styling, allowing you to craft it exactly as desired.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="stop-ripgrep">
|
||||||
|
How do I stop ripgrep from messing up colors when I kill it?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Type in `color` in cmd.exe (Command Prompt) and `echo -ne "\033[0m"` on
|
||||||
|
Unix-like systems to restore your original foreground color.
|
||||||
|
|
||||||
|
In PowerShell, you can add the following code to your profile which will
|
||||||
|
restore the original foreground color when `Reset-ForegroundColor` is called.
|
||||||
|
Including the `Set-Alias` line will allow you to call it with simply `color`.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$OrigFgColor = $Host.UI.RawUI.ForegroundColor
|
||||||
|
function Reset-ForegroundColor {
|
||||||
|
$Host.UI.RawUI.ForegroundColor = $OrigFgColor
|
||||||
|
}
|
||||||
|
Set-Alias -Name color -Value Reset-ForegroundColor
|
||||||
|
```
|
||||||
|
|
||||||
|
PR [#187](https://github.com/BurntSushi/ripgrep/pull/187) fixed this, and it
|
||||||
|
was later deprecated in
|
||||||
|
[#281](https://github.com/BurntSushi/ripgrep/issues/281). A full explanation is
|
||||||
|
available
|
||||||
|
[here](https://github.com/BurntSushi/ripgrep/issues/281#issuecomment-269093893).
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="size-limit">
|
||||||
|
How do I get around the regex size limit?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
If you've given ripgrep a particularly large pattern (or a large number of
|
||||||
|
smaller patterns), then it is possible that it will fail to compile because it
|
||||||
|
hit a pre-set limit. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '\pL{1000}'
|
||||||
|
Compiled regex exceeds size limit of 10485760 bytes.
|
||||||
|
```
|
||||||
|
|
||||||
|
(Note: `\pL{1000}` may look small, but `\pL` is the character class containing
|
||||||
|
all Unicode letters, which is quite large. *And* it's repeated 1000 times.)
|
||||||
|
|
||||||
|
In this case, you can work around by simply increasing the limit:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '\pL{1000}' --regex-size-limit 1G
|
||||||
|
```
|
||||||
|
|
||||||
|
Increasing the limit to 1GB does not necessarily mean that ripgrep will use
|
||||||
|
that much memory. The limit just says that it's allowed to (approximately) use
|
||||||
|
that much memory for constructing the regular expression.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="dfa-size">
|
||||||
|
How do I make the <code>-f/--file</code> flag faster?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
The `-f/--file` permits one to give a file to ripgrep which contains a pattern
|
||||||
|
on each line. ripgrep will then report any line that matches any of the
|
||||||
|
patterns.
|
||||||
|
|
||||||
|
If this pattern file gets too big, then it is possible ripgrep will slow down
|
||||||
|
dramatically. *Typically* this is because an internal cache is too small, and
|
||||||
|
will cause ripgrep to spill over to a slower but more robust regular expression
|
||||||
|
engine. If this is indeed the problem, then it is possible to increase this
|
||||||
|
cache and regain speed. The cache can be controlled via the `--dfa-size-limit`
|
||||||
|
flag. For example, using `--dfa-size-limit 1G` will set the cache size to 1GB.
|
||||||
|
(Note that this doesn't mean ripgrep will use 1GB of memory automatically, but
|
||||||
|
it will allow the regex engine to if it needs to.)
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="silver-searcher-output">
|
||||||
|
How do I make the output look like The Silver Searcher's output?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Use the `--colors` flag, like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
rg --colors line:fg:yellow \
|
||||||
|
--colors line:style:bold \
|
||||||
|
--colors path:fg:green \
|
||||||
|
--colors path:style:bold \
|
||||||
|
--colors match:fg:black \
|
||||||
|
--colors match:bg:yellow \
|
||||||
|
--colors match:style:nobold \
|
||||||
|
foo
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, add your color configuration to your ripgrep config file (which
|
||||||
|
is activated by setting the `RIPGREP_CONFIG_PATH` environment variable to point
|
||||||
|
to your config file). For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat $HOME/.config/ripgrep/rc
|
||||||
|
--colors=line:fg:yellow
|
||||||
|
--colors=line:style:bold
|
||||||
|
--colors=path:fg:green
|
||||||
|
--colors=path:style:bold
|
||||||
|
--colors=match:fg:black
|
||||||
|
--colors=match:bg:yellow
|
||||||
|
--colors=match:style:nobold
|
||||||
|
$ RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/rc rg foo
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="pcre2-slow">
|
||||||
|
Why does ripgrep get slower when I enable PCRE2 regexes?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
When you use the `--pcre2` (`-P` for short) flag, ripgrep will use the PCRE2
|
||||||
|
regex engine instead of the default. Both regex engines are quite fast,
|
||||||
|
but PCRE2 provides a number of additional features such as look-around and
|
||||||
|
backreferences that many enjoy using. This is largely because PCRE2 uses
|
||||||
|
a backtracking implementation where as the default regex engine uses a finite
|
||||||
|
automaton based implementation. The former provides the ability to add lots of
|
||||||
|
bells and whistles over the latter, but the latter executes with worst case
|
||||||
|
linear time complexity.
|
||||||
|
|
||||||
|
With that out of the way, if you've used `-P` with ripgrep, you may have
|
||||||
|
noticed that it can be slower. The reasons for why this is are quite complex,
|
||||||
|
and they are complex because the optimizations that ripgrep uses to implement
|
||||||
|
fast search are complex.
|
||||||
|
|
||||||
|
The task ripgrep has before it is somewhat simple; all it needs to do is search
|
||||||
|
a file for occurrences of some pattern and then print the lines containing
|
||||||
|
those occurrences. The problem lies in what is considered a valid match and how
|
||||||
|
exactly we read the bytes from a file.
|
||||||
|
|
||||||
|
In terms of what is considered a valid match, remember that ripgrep will only
|
||||||
|
report matches spanning a single line by default. The problem here is that
|
||||||
|
some patterns can match across multiple lines, and ripgrep needs to prevent
|
||||||
|
that from happening. For example, `foo\sbar` will match `foo\nbar`. The most
|
||||||
|
obvious way to achieve this is to read the data from a file, and then apply
|
||||||
|
the pattern search to that data for each line. The problem with this approach
|
||||||
|
is that it can be quite slow; it would be much faster to let the pattern
|
||||||
|
search across as much data as possible. It's faster because it gets rid of the
|
||||||
|
overhead of finding the boundaries of every line, and also because it gets rid
|
||||||
|
of the overhead of starting and stopping the pattern search for every single
|
||||||
|
line. (This is operating under the general assumption that matching lines are
|
||||||
|
much rarer than non-matching lines.)
|
||||||
|
|
||||||
|
It turns out that we can use the faster approach by applying a very simple
|
||||||
|
restriction to the pattern: *statically prevent* the pattern from matching
|
||||||
|
through a `\n` character. Namely, when given a pattern like `foo\sbar`,
|
||||||
|
ripgrep will remove `\n` from the `\s` character class automatically. In some
|
||||||
|
cases, a simple removal is not so easy. For example, ripgrep will return an
|
||||||
|
error when your pattern includes a `\n` literal:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '\n'
|
||||||
|
the literal '"\n"' is not allowed in a regex
|
||||||
|
```
|
||||||
|
|
||||||
|
So what does this have to do with PCRE2? Well, ripgrep's default regex engine
|
||||||
|
exposes APIs for doing syntactic analysis on the pattern in a way that makes
|
||||||
|
it quite easy to strip `\n` from the pattern (or otherwise detect it and report
|
||||||
|
an error if stripping isn't possible). PCRE2 seemingly does not provide a
|
||||||
|
similar API, so ripgrep does not do any stripping when PCRE2 is enabled. This
|
||||||
|
forces ripgrep to use the "slow" search strategy of searching each line
|
||||||
|
individually.
|
||||||
|
|
||||||
|
OK, so if enabling PCRE2 slows down the default method of searching because it
|
||||||
|
forces matches to be limited to a single line, then why is PCRE2 also sometimes
|
||||||
|
slower when performing multiline searches? Well, that's because there are
|
||||||
|
*multiple* reasons why using PCRE2 in ripgrep can be slower than the default
|
||||||
|
regex engine. This time, blame PCRE2's Unicode support, which ripgrep enables
|
||||||
|
by default. In particular, PCRE2 cannot simultaneously enable Unicode support
|
||||||
|
and search arbitrary data. That is, when PCRE2's Unicode support is enabled,
|
||||||
|
the data **must** be valid UTF-8 (to do otherwise is to invoke undefined
|
||||||
|
behavior). This is in contrast to ripgrep's default regex engine, which can
|
||||||
|
enable Unicode support and still search arbitrary data. ripgrep's default
|
||||||
|
regex engine simply won't match invalid UTF-8 for a pattern that can otherwise
|
||||||
|
only match valid UTF-8. Why doesn't PCRE2 do the same? This author isn't
|
||||||
|
familiar with its internals, so we can't comment on it here.
|
||||||
|
|
||||||
|
The bottom line here is that we can't enable PCRE2's Unicode support without
|
||||||
|
simultaneously incurring a performance penalty for ensuring that we are
|
||||||
|
searching valid UTF-8. In particular, ripgrep will transcode the contents
|
||||||
|
of each file to UTF-8 while replacing invalid UTF-8 data with the Unicode
|
||||||
|
replacement codepoint. ripgrep then disables PCRE2's own internal UTF-8
|
||||||
|
checking, since we've guaranteed the data we hand it will be valid UTF-8. The
|
||||||
|
reason why ripgrep takes this approach is because if we do hand PCRE2 invalid
|
||||||
|
UTF-8, then it will report a match error if it comes across an invalid UTF-8
|
||||||
|
sequence. This is not good news for ripgrep, since it will stop it from
|
||||||
|
searching the rest of the file, and will also print potentially undesirable
|
||||||
|
error messages to users.
|
||||||
|
|
||||||
|
All right, the above is a lot of information to swallow if you aren't already
|
||||||
|
familiar with ripgrep internals. Let's make this concrete with some examples.
|
||||||
|
First, let's get some data big enough to magnify the performance differences:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ curl -O 'https://burntsushi.net/stuff/subtitles2016-sample.gz'
|
||||||
|
$ gzip -d subtitles2016-sample
|
||||||
|
$ md5sum subtitles2016-sample
|
||||||
|
e3cb796a20bbc602fbfd6bb43bda45f5 subtitles2016-sample
|
||||||
|
```
|
||||||
|
|
||||||
|
To search this data, we will use the pattern `^\w{42}$`, which contains exactly
|
||||||
|
one hit in the file and has no literals. Having no literals is important,
|
||||||
|
because it ensures that the regex engine won't use literal optimizations to
|
||||||
|
speed up the search. In other words, it lets us reason coherently about the
|
||||||
|
actual task that the regex engine is performing.
|
||||||
|
|
||||||
|
Let's now walk through a few examples in light of the information above. First,
|
||||||
|
let's consider the default search using ripgrep's default regex engine and
|
||||||
|
then the same search with PCRE2:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time rg '^\w{42}$' subtitles2016-sample
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m1.783s
|
||||||
|
user 0m1.731s
|
||||||
|
sys 0m0.051s
|
||||||
|
|
||||||
|
$ time rg -P '^\w{42}$' subtitles2016-sample
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m2.458s
|
||||||
|
user 0m2.419s
|
||||||
|
sys 0m0.038s
|
||||||
|
```
|
||||||
|
|
||||||
|
In this particular example, both pattern searches are using a Unicode aware
|
||||||
|
`\w` character class and both are counting lines in order to report line
|
||||||
|
numbers. The key difference here is that the first search will not search
|
||||||
|
line by line, but the second one will. We can observe which strategy ripgrep
|
||||||
|
uses by passing the `--trace` flag:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '^\w{42}$' subtitles2016-sample --trace
|
||||||
|
[... snip ...]
|
||||||
|
TRACE|grep_searcher::searcher|grep-searcher/src/searcher/mod.rs:622: Some("subtitles2016-sample"): searching via memory map
|
||||||
|
TRACE|grep_searcher::searcher|grep-searcher/src/searcher/mod.rs:712: slice reader: searching via slice-by-line strategy
|
||||||
|
TRACE|grep_searcher::searcher::core|grep-searcher/src/searcher/core.rs:61: searcher core: will use fast line searcher
|
||||||
|
[... snip ...]
|
||||||
|
|
||||||
|
$ rg -P '^\w{42}$' subtitles2016-sample --trace
|
||||||
|
[... snip ...]
|
||||||
|
TRACE|grep_searcher::searcher|grep-searcher/src/searcher/mod.rs:622: Some("subtitles2016-sample"): searching via memory map
|
||||||
|
TRACE|grep_searcher::searcher|grep-searcher/src/searcher/mod.rs:705: slice reader: needs transcoding, using generic reader
|
||||||
|
TRACE|grep_searcher::searcher|grep-searcher/src/searcher/mod.rs:685: generic reader: searching via roll buffer strategy
|
||||||
|
TRACE|grep_searcher::searcher::core|grep-searcher/src/searcher/core.rs:63: searcher core: will use slow line searcher
|
||||||
|
[... snip ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
The first says it is using the "fast line searcher" where as the latter says
|
||||||
|
it is using the "slow line searcher." The latter also shows that we are
|
||||||
|
decoding the contents of the file, which also impacts performance.
|
||||||
|
|
||||||
|
Interestingly, in this case, the pattern does not match a `\n` and the file
|
||||||
|
we're searching is valid UTF-8, so neither the slow line-by-line search
|
||||||
|
strategy nor the decoding are necessary. We could fix the former issue with
|
||||||
|
better PCRE2 introspection APIs. We can actually fix the latter issue with
|
||||||
|
ripgrep's `--no-encoding` flag, which prevents the automatic UTF-8 decoding,
|
||||||
|
but will enable PCRE2's own UTF-8 validity checking. Unfortunately, it's slower
|
||||||
|
in my build of ripgrep:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time rg -P '^\w{42}$' subtitles2016-sample --no-encoding
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m3.074s
|
||||||
|
user 0m3.021s
|
||||||
|
sys 0m0.051s
|
||||||
|
```
|
||||||
|
|
||||||
|
(Tip: use the `--trace` flag to verify that no decoding in ripgrep is
|
||||||
|
happening.)
|
||||||
|
|
||||||
|
A possible reason why PCRE2's UTF-8 checking is slower is because it might
|
||||||
|
not be better than the highly optimized UTF-8 checking routines found in the
|
||||||
|
[`encoding_rs`](https://github.com/hsivonen/encoding_rs) library, which is what
|
||||||
|
ripgrep uses for UTF-8 decoding. Moreover, my build of ripgrep enables
|
||||||
|
`encoding_rs`'s SIMD optimizations, which may be in play here.
|
||||||
|
|
||||||
|
Also, note that using the `--no-encoding` flag can cause PCRE2 to report
|
||||||
|
invalid UTF-8 errors, which causes ripgrep to stop searching the file:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat invalid-utf8
|
||||||
|
foobar
|
||||||
|
|
||||||
|
$ xxd invalid-utf8
|
||||||
|
00000000: 666f 6fff 6261 720a foo.bar.
|
||||||
|
|
||||||
|
$ rg foo invalid-utf8
|
||||||
|
1:foobar
|
||||||
|
|
||||||
|
$ rg -P foo invalid-utf8
|
||||||
|
1:foo<6F>bar
|
||||||
|
|
||||||
|
$ rg -P foo invalid-utf8 --no-encoding
|
||||||
|
invalid-utf8: PCRE2: error matching: UTF-8 error: illegal byte (0xfe or 0xff)
|
||||||
|
```
|
||||||
|
|
||||||
|
All right, so at this point, you might think that we could remove the penalty
|
||||||
|
for line-by-line searching by enabling multiline search. After all, our
|
||||||
|
particular pattern can't match across multiple lines anyway, so we'll still get
|
||||||
|
the results we want. Let's try it:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time rg -U '^\w{42}$' subtitles2016-sample
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m1.803s
|
||||||
|
user 0m1.748s
|
||||||
|
sys 0m0.054s
|
||||||
|
|
||||||
|
$ time rg -P -U '^\w{42}$' subtitles2016-sample
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m2.962s
|
||||||
|
user 0m2.246s
|
||||||
|
sys 0m0.713s
|
||||||
|
```
|
||||||
|
|
||||||
|
Search times remain the same with the default regex engine, but the PCRE2
|
||||||
|
search gets _slower_. What happened? The secrets can be revealed with the
|
||||||
|
`--trace` flag once again. In the former case, ripgrep actually detects that
|
||||||
|
the pattern can't match across multiple lines, and so will fall back to the
|
||||||
|
"fast line search" strategy as with our search without `-U`.
|
||||||
|
|
||||||
|
However, for PCRE2, things are much worse. Namely, since Unicode mode is still
|
||||||
|
enabled, ripgrep is still going to decode UTF-8 to ensure that it hands only
|
||||||
|
valid UTF-8 to PCRE2. Unfortunately, one key downside of multiline search is
|
||||||
|
that ripgrep cannot do it incrementally. Since matches can be arbitrarily long,
|
||||||
|
ripgrep actually needs the entire file in memory at once. Normally, we can use
|
||||||
|
a memory map for this, but because we need to UTF-8 decode the file before
|
||||||
|
searching it, ripgrep winds up reading the entire contents of the file on to
|
||||||
|
the heap before executing a search. Owch.
|
||||||
|
|
||||||
|
OK, so Unicode is killing us here. The file we're searching is _mostly_ ASCII,
|
||||||
|
so maybe we're OK with missing some data. (Try `rg '[\w--\p{ascii}]'` to see
|
||||||
|
non-ASCII word characters that an ASCII-only `\w` character class would miss.)
|
||||||
|
We can disable Unicode in both searches, but this is done differently depending
|
||||||
|
on the regex engine we use:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time rg '(?-u)^\w{42}$' subtitles2016-sample
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m1.714s
|
||||||
|
user 0m1.669s
|
||||||
|
sys 0m0.044s
|
||||||
|
|
||||||
|
$ time rg -P '^\w{42}$' subtitles2016-sample --no-pcre2-unicode
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m1.997s
|
||||||
|
user 0m1.958s
|
||||||
|
sys 0m0.037s
|
||||||
|
```
|
||||||
|
|
||||||
|
For the most part, ripgrep's default regex engine performs about the same.
|
||||||
|
PCRE2 does improve a little bit, and is now almost as fast as the default
|
||||||
|
regex engine. If you look at the output of `--trace`, you'll see that ripgrep
|
||||||
|
will no longer perform UTF-8 decoding, but it does still use the slow
|
||||||
|
line-by-line searcher.
|
||||||
|
|
||||||
|
At this point, we can combine all of our insights above: let's try to get off
|
||||||
|
of the slow line-by-line searcher by enabling multiline mode, and let's stop
|
||||||
|
UTF-8 decoding by disabling Unicode support:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time rg -U '(?-u)^\w{42}$' subtitles2016-sample
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m1.714s
|
||||||
|
user 0m1.655s
|
||||||
|
sys 0m0.058s
|
||||||
|
|
||||||
|
$ time rg -P -U '^\w{42}$' subtitles2016-sample --no-pcre2-unicode
|
||||||
|
21225780:EverymajordevelopmentinthehistoryofAmerica
|
||||||
|
|
||||||
|
real 0m1.121s
|
||||||
|
user 0m1.071s
|
||||||
|
sys 0m0.048s
|
||||||
|
```
|
||||||
|
|
||||||
|
Ah, there's PCRE2's JIT shining! ripgrep's default regex engine once again
|
||||||
|
remains about the same, but PCRE2 no longer needs to search line-by-line and it
|
||||||
|
no longer needs to do any kind of UTF-8 checks. This allows the file to get
|
||||||
|
memory mapped and passed right through PCRE2's JIT at impressive speeds. (As
|
||||||
|
a brief and interesting historical note, the configuration of "memory map +
|
||||||
|
multiline + no-Unicode" is exactly the configuration used by The Silver
|
||||||
|
Searcher. This analysis perhaps sheds some reasoning as to why that
|
||||||
|
configuration is useful!)
|
||||||
|
|
||||||
|
In summary, if you want PCRE2 to go as fast as possible and you don't care
|
||||||
|
about Unicode and you don't care about matches possibly spanning across
|
||||||
|
multiple lines, then enable multiline mode with `-U` and disable PCRE2's
|
||||||
|
Unicode support with the `--no-pcre2-unicode` flag.
|
||||||
|
|
||||||
|
Caveat emptor: This author is not a PCRE2 expert, so there may be APIs that can
|
||||||
|
improve performance that the author missed. Similarly, there may be alternative
|
||||||
|
designs for a searching tool that are more amenable to how PCRE2 works.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="rg-other-cmd">
|
||||||
|
When I run <code>rg</code>, why does it execute some other command?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
It's likely that you have a shell alias or even another tool called `rg` which
|
||||||
|
is interfering with ripgrep. Run `which rg` to see what it is.
|
||||||
|
|
||||||
|
(Notably, the Rails plug-in for
|
||||||
|
[Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins#rails) sets
|
||||||
|
up an `rg` alias for `rails generate`.)
|
||||||
|
|
||||||
|
Problems like this can be resolved in one of several ways:
|
||||||
|
|
||||||
|
* If you're using the OMZ Rails plug-in, disable it by editing the `plugins`
|
||||||
|
array in your zsh configuration.
|
||||||
|
* Temporarily bypass an existing `rg` alias by calling ripgrep as
|
||||||
|
`command rg`, `\rg`, or `'rg'`.
|
||||||
|
* Temporarily bypass an existing alias or another tool named `rg` by calling
|
||||||
|
ripgrep by its full path (e.g., `/usr/bin/rg` or `/usr/local/bin/rg`).
|
||||||
|
* Permanently disable an existing `rg` alias by adding `unalias rg` to the
|
||||||
|
bottom of your shell configuration file (e.g., `.bash_profile` or `.zshrc`).
|
||||||
|
* Give ripgrep its own alias that doesn't conflict with other tools/aliases by
|
||||||
|
adding a line like the following to the bottom of your shell configuration
|
||||||
|
file: `alias ripgrep='command rg'`.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="rg-alias-windows">
|
||||||
|
How do I create an alias for ripgrep on Windows?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Often you can find a need to make alias for commands you use a lot that set
|
||||||
|
certain flags. But PowerShell function aliases do not behave like your typical
|
||||||
|
linux shell alias. You always need to propagate arguments and `stdin` input.
|
||||||
|
But it cannot be done simply as
|
||||||
|
`function grep() { $input | rg.exe --hidden $args }`
|
||||||
|
|
||||||
|
Use below example as reference to how setup alias in PowerShell.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function grep {
|
||||||
|
$count = @($input).Count
|
||||||
|
$input.Reset()
|
||||||
|
|
||||||
|
if ($count) {
|
||||||
|
$input | rg.exe --hidden $args
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rg.exe --hidden $args
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
PowerShell special variables:
|
||||||
|
|
||||||
|
* input - is powershell `stdin` object that allows you to access its content.
|
||||||
|
* args - is array of arguments passed to this function.
|
||||||
|
|
||||||
|
This alias checks whether there is `stdin` input and propagates only if there
|
||||||
|
is some lines. Otherwise empty `$input` will make powershell to trigger `rg` to
|
||||||
|
search empty `stdin`.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="powershell-profile">
|
||||||
|
How do I create a PowerShell profile?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
To customize powershell on start-up, there is a special PowerShell script that
|
||||||
|
has to be created. In order to find its location, type `$profile`.
|
||||||
|
See
|
||||||
|
[Microsoft's documentation](https://technet.microsoft.com/en-us/library/bb613488(v=vs.85).aspx)
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
Any PowerShell code in this file gets evaluated at the start of console. This
|
||||||
|
way you can have own aliases to be created at start.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="pipe-non-ascii-windows">
|
||||||
|
How do I pipe non-ASCII content to ripgrep on Windows?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
When piping input into native executables in PowerShell, the encoding of the
|
||||||
|
input is controlled by the `$OutputEncoding` variable. By default, this is set
|
||||||
|
to US-ASCII, and any characters in the pipeline that don't have encodings in
|
||||||
|
US-ASCII are converted to `?` (question mark) characters.
|
||||||
|
|
||||||
|
To change this setting, set `$OutputEncoding` to a different encoding, as
|
||||||
|
represented by a .NET encoding object. Some common examples are below. The
|
||||||
|
value of this variable is reset when PowerShell restarts, so to make this
|
||||||
|
change take effect every time PowerShell is started add a line setting the
|
||||||
|
variable into your PowerShell profile.
|
||||||
|
|
||||||
|
Example `$OutputEncoding` settings:
|
||||||
|
|
||||||
|
* UTF-8 without BOM: `$OutputEncoding = [System.Text.UTF8Encoding]::new()`
|
||||||
|
* The console's output encoding:
|
||||||
|
`$OutputEncoding = [System.Console]::OutputEncoding`
|
||||||
|
|
||||||
|
If you continue to have encoding problems, you can also force the encoding
|
||||||
|
that the console will use for printing to UTF-8 with
|
||||||
|
`[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8`. This
|
||||||
|
will also reset when PowerShell is restarted, so you can add that line
|
||||||
|
to your profile as well if you want to make the setting permanent.
|
||||||
|
|
||||||
|
<h3 name="search-and-replace">
|
||||||
|
How can I search and replace with ripgrep?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Using ripgrep alone, you can't. ripgrep is a search tool that will never
|
||||||
|
touch your files. However, the output of ripgrep can be piped to other tools
|
||||||
|
that do modify files on disk. See
|
||||||
|
[this issue](https://github.com/BurntSushi/ripgrep/issues/74) for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
sed is one such tool that can modify files on disk. sed can take a filename
|
||||||
|
and a substitution command to search and replace in the specified file.
|
||||||
|
Files containing matching patterns can be provided to sed using
|
||||||
|
|
||||||
|
```
|
||||||
|
rg foo --files-with-matches
|
||||||
|
```
|
||||||
|
|
||||||
|
The output of this command is a list of filenames that contain a match for
|
||||||
|
the `foo` pattern.
|
||||||
|
|
||||||
|
This list can be piped into `xargs`, which will split the filenames from
|
||||||
|
standard input into arguments for the command following xargs. You can use this
|
||||||
|
combination to pipe a list of filenames into sed for replacement. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
rg foo --files-with-matches | xargs sed -i 's/foo/bar/g'
|
||||||
|
```
|
||||||
|
|
||||||
|
will replace all instances of 'foo' with 'bar' in the files in which
|
||||||
|
ripgrep finds the foo pattern. The `-i` flag to sed indicates that you are
|
||||||
|
editing files in place, and `s/foo/bar/g` says that you are performing a
|
||||||
|
**s**ubstitution of the pattren `foo` for `bar`, and that you are doing this
|
||||||
|
substitution **g**lobally (all occurrences of the pattern in each file).
|
||||||
|
|
||||||
|
Note: the above command assumes that you are using GNU sed. If you are using
|
||||||
|
BSD sed (the default on macOS and FreeBSD) then you must modify the above
|
||||||
|
command to be the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
rg foo --files-with-matches | xargs sed -i '' 's/foo/bar/g'
|
||||||
|
```
|
||||||
|
|
||||||
|
The `-i` flag in BSD sed requires a file extension to be given to make backups
|
||||||
|
for all modified files. Specifying the empty string prevents file backups from
|
||||||
|
being made.
|
||||||
|
|
||||||
|
Finally, if any of your file paths contain whitespace in them, then you might
|
||||||
|
need to delimit your file paths with a NUL terminator. This requires telling
|
||||||
|
ripgrep to output NUL bytes between each path, and telling xargs to read paths
|
||||||
|
delimited by NUL bytes:
|
||||||
|
|
||||||
|
```
|
||||||
|
rg foo --files-with-matches -0 | xargs -0 sed -i 's/foo/bar/g'
|
||||||
|
```
|
||||||
|
|
||||||
|
To learn more about sed, see the sed manual
|
||||||
|
[here](https://www.gnu.org/software/sed/manual/sed.html).
|
||||||
|
|
||||||
|
Additionally, Facebook has a tool called
|
||||||
|
[fastmod](https://github.com/facebookincubator/fastmod)
|
||||||
|
that uses some of the same libraries as ripgrep and might provide a more
|
||||||
|
ergonomic search-and-replace experience.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="license">
|
||||||
|
How is ripgrep licensed?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
ripgrep is dual licensed under the
|
||||||
|
[Unlicense](https://unlicense.org/)
|
||||||
|
and MIT licenses. Specifically, you may use ripgrep under the terms of either
|
||||||
|
license.
|
||||||
|
|
||||||
|
The reason why ripgrep is dual licensed this way is two-fold:
|
||||||
|
|
||||||
|
1. I, as ripgrep's author, would like to participate in a small bit of
|
||||||
|
ideological activism by promoting the Unlicense's goal: to disclaim
|
||||||
|
copyright monopoly interest.
|
||||||
|
2. I, as ripgrep's author, would like as many people to use rigprep as
|
||||||
|
possible. Since the Unlicense is not a proven or well known license, ripgrep
|
||||||
|
is also offered under the MIT license, which is ubiquitous and accepted by
|
||||||
|
almost everyone.
|
||||||
|
|
||||||
|
More specifically, ripgrep and all its dependencies are compatible with this
|
||||||
|
licensing choice. In particular, ripgrep's dependencies (direct and transitive)
|
||||||
|
will always be limited to permissive licenses. That is, ripgrep will never
|
||||||
|
depend on code that is not permissively licensed. This means rejecting any
|
||||||
|
dependency that uses a copyleft license such as the GPL, LGPL, MPL or any of
|
||||||
|
the Creative Commons ShareAlike licenses. Whether the license is "weak"
|
||||||
|
copyleft or not does not matter; ripgrep will **not** depend on it.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="posix4ever">
|
||||||
|
Can ripgrep replace grep?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Yes and no.
|
||||||
|
|
||||||
|
If, upon hearing that "ripgrep can replace grep," you *actually* hear, "ripgrep
|
||||||
|
can be used in every instance grep can be used, in exactly the same way, for
|
||||||
|
the same use cases, with exactly the same bug-for-bug behavior," then no,
|
||||||
|
ripgrep trivially *cannot* replace grep. Moreover, ripgrep will *never* replace
|
||||||
|
grep.
|
||||||
|
|
||||||
|
If, upon hearing that "ripgrep can replace grep," you *actually* hear, "ripgrep
|
||||||
|
can replace grep in some cases and not in other use cases," then yes, that is
|
||||||
|
indeed true!
|
||||||
|
|
||||||
|
Let's go over some of those use cases in favor of ripgrep. Some of these may
|
||||||
|
not apply to you. That's OK. There may be other use cases not listed here that
|
||||||
|
do apply to you. That's OK too.
|
||||||
|
|
||||||
|
(For all claims related to performance in the following words, see my
|
||||||
|
[blog post](https://blog.burntsushi.net/ripgrep/)
|
||||||
|
introducing ripgrep.)
|
||||||
|
|
||||||
|
* Are you frequently searching a repository of code? If so, ripgrep might be a
|
||||||
|
good choice since there's likely a good chunk of your repository that you
|
||||||
|
don't want to search. grep, can, of course, be made to filter files using
|
||||||
|
recursive search, and if you don't mind writing out the requisite `--exclude`
|
||||||
|
rules or writing wrapper scripts, then grep might be sufficient. (I'm not
|
||||||
|
kidding, I myself did this with grep for almost a decade before writing
|
||||||
|
ripgrep.) But if you instead enjoy having a search tool respect your
|
||||||
|
`.gitignore`, then ripgrep might be perfect for you!
|
||||||
|
* Are you frequently searching non-ASCII text that is UTF-8 encoded? One of
|
||||||
|
ripgrep's key features is that it can handle Unicode features in your
|
||||||
|
patterns in a way that tends to be faster than GNU grep. Unicode features
|
||||||
|
in ripgrep are enabled by default; there is no need to configure your locale
|
||||||
|
settings to use ripgrep properly because ripgrep doesn't respect your locale
|
||||||
|
settings.
|
||||||
|
* Do you need to search UTF-16 files and you don't want to bother explicitly
|
||||||
|
transcoding them? Great. ripgrep does this for you automatically. No need
|
||||||
|
to enable it.
|
||||||
|
* Do you need to search a large directory of large files? ripgrep uses
|
||||||
|
parallelism by default, which tends to make it faster than a standard
|
||||||
|
`grep -r` search. However, if you're OK writing the occasional
|
||||||
|
`find ./ -print0 | xargs -P8 -0 grep` command, then maybe grep is good
|
||||||
|
enough.
|
||||||
|
|
||||||
|
Here are some cases where you might *not* want to use ripgrep. The same caveats
|
||||||
|
for the previous section apply.
|
||||||
|
|
||||||
|
* Are you writing portable shell scripts intended to work in a variety of
|
||||||
|
environments? Great, probably not a good idea to use ripgrep! ripgrep has
|
||||||
|
nowhere near the ubiquity of grep, so if you do use ripgrep, you might need
|
||||||
|
to futz with the installation process more than you would with grep.
|
||||||
|
* Do you care about POSIX compatibility? If so, then you can't use ripgrep
|
||||||
|
because it never was, isn't and never will be POSIX compatible.
|
||||||
|
* Do you hate tools that try to do something smart? If so, ripgrep is all about
|
||||||
|
being smart, so you might prefer to just stick with grep.
|
||||||
|
* Is there a particular feature of grep you rely on that ripgrep either doesn't
|
||||||
|
have or never will have? If the former, file a bug report, maybe ripgrep can
|
||||||
|
do it! If the latter, well, then, just use grep.
|
||||||
|
|
||||||
|
|
||||||
|
<h3 name="intentcountsforsomething">
|
||||||
|
What does the "rip" in ripgrep mean?
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
When I first started writing ripgrep, I called it `rep`, intending it to be a
|
||||||
|
shorter variant of `grep`. Soon after, I renamed it to `xrep` since `rep`
|
||||||
|
wasn't obvious enough of a name for my taste. And also because adding `x` to
|
||||||
|
anything always makes it better, right?
|
||||||
|
|
||||||
|
Before ripgrep's first public release, I decided that I didn't like `xrep`. I
|
||||||
|
thought it was slightly awkward to type, and despite my previous praise of the
|
||||||
|
letter `x`, I kind of thought it was pretty lame. Being someone who really
|
||||||
|
likes Rust, I wanted to call it "rustgrep" or maybe "rgrep" for short. But I
|
||||||
|
thought that was just as lame, and maybe a little too in-your-face. But I
|
||||||
|
wanted to continue using `r` so I could at least pretend Rust had something to
|
||||||
|
do with it.
|
||||||
|
|
||||||
|
I spent a couple of days trying to think of very short words that began with
|
||||||
|
the letter `r` that were even somewhat related to the task of searching. I
|
||||||
|
don't remember how it popped into my head, but "rip" came up as something that
|
||||||
|
meant "fast," as in, "to rip through your text." The fact that RIP is also
|
||||||
|
an initialism for "Rest in Peace" (as in, "ripgrep kills grep") never really
|
||||||
|
dawned on me. Perhaps the coincidence is too striking to believe that, but
|
||||||
|
I didn't realize it until someone explicitly pointed it out to me after the
|
||||||
|
initial public release. I admit that I found it mildly amusing, but if I had
|
||||||
|
realized it myself before the public release, I probably would have pressed on
|
||||||
|
and chose a different name. Alas, renaming things after a release is hard, so I
|
||||||
|
decided to mush on.
|
||||||
|
|
||||||
|
Given the fact that
|
||||||
|
[ripgrep never was, is or will be a 100% drop-in replacement for
|
||||||
|
grep](#posix4ever),
|
||||||
|
ripgrep is neither actually a "grep killer" nor was it ever intended to be. It
|
||||||
|
certainly does eat into some of its use cases, but that's nothing that other
|
||||||
|
tools like ack or The Silver Searcher weren't already doing.
|
||||||
785
GUIDE.md
Normal file
785
GUIDE.md
Normal file
@@ -0,0 +1,785 @@
|
|||||||
|
## User Guide
|
||||||
|
|
||||||
|
This guide is intended to give an elementary description of ripgrep and an
|
||||||
|
overview of its capabilities. This guide assumes that ripgrep is
|
||||||
|
[installed](README.md#installation)
|
||||||
|
and that readers have passing familiarity with using command line tools. This
|
||||||
|
also assumes a Unix-like system, although most commands are probably easily
|
||||||
|
translatable to any command line shell environment.
|
||||||
|
|
||||||
|
|
||||||
|
### Table of Contents
|
||||||
|
|
||||||
|
* [Basics](#basics)
|
||||||
|
* [Recursive search](#recursive-search)
|
||||||
|
* [Automatic filtering](#automatic-filtering)
|
||||||
|
* [Manual filtering: globs](#manual-filtering-globs)
|
||||||
|
* [Manual filtering: file types](#manual-filtering-file-types)
|
||||||
|
* [Replacements](#replacements)
|
||||||
|
* [Configuration file](#configuration-file)
|
||||||
|
* [File encoding](#file-encoding)
|
||||||
|
* [Binary data](#binary-data)
|
||||||
|
* [Common options](#common-options)
|
||||||
|
|
||||||
|
|
||||||
|
### Basics
|
||||||
|
|
||||||
|
ripgrep is a command line tool that searches your files for patterns that
|
||||||
|
you give it. ripgrep behaves as if reading each file line by line. If a line
|
||||||
|
matches the pattern provided to ripgrep, then that line will be printed. If a
|
||||||
|
line does not match the pattern, then the line is not printed.
|
||||||
|
|
||||||
|
The best way to see how this works is with an example. To show an example, we
|
||||||
|
need something to search. Let's try searching ripgrep's source code. First
|
||||||
|
grab a ripgrep source archive from
|
||||||
|
https://github.com/BurntSushi/ripgrep/archive/0.7.1.zip
|
||||||
|
and extract it:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ curl -LO https://github.com/BurntSushi/ripgrep/archive/0.7.1.zip
|
||||||
|
$ unzip 0.7.1.zip
|
||||||
|
$ cd ripgrep-0.7.1
|
||||||
|
$ ls
|
||||||
|
benchsuite grep tests Cargo.toml LICENSE-MIT
|
||||||
|
ci ignore wincolor CHANGELOG.md README.md
|
||||||
|
complete pkg appveyor.yml compile snapcraft.yaml
|
||||||
|
doc src build.rs COPYING UNLICENSE
|
||||||
|
globset termcolor Cargo.lock HomebrewFormula
|
||||||
|
```
|
||||||
|
|
||||||
|
Let's try our first search by looking for all occurrences of the word `fast`
|
||||||
|
in `README.md`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg fast README.md
|
||||||
|
75: faster than both. (N.B. It is not, strictly speaking, a "drop-in" replacement
|
||||||
|
88: color and full Unicode support. Unlike GNU grep, `ripgrep` stays fast while
|
||||||
|
119:### Is it really faster than everything else?
|
||||||
|
124:Summarizing, `ripgrep` is fast because:
|
||||||
|
129: optimizations to make searching very fast.
|
||||||
|
```
|
||||||
|
|
||||||
|
(**Note:** If you see an error message from ripgrep saying that it didn't
|
||||||
|
search any files, then re-run ripgrep with the `--debug` flag. One likely cause
|
||||||
|
of this is that you have a `*` rule in a `$HOME/.gitignore` file.)
|
||||||
|
|
||||||
|
So what happened here? ripgrep read the contents of `README.md`, and for each
|
||||||
|
line that contained `fast`, ripgrep printed it to your terminal. ripgrep also
|
||||||
|
included the line number for each line by default. If your terminal supports
|
||||||
|
colors, then your output might actually look something like this screenshot:
|
||||||
|
|
||||||
|
[](https://burntsushi.net/stuff/ripgrep-guide-sample.png)
|
||||||
|
|
||||||
|
In this example, we searched for something called a "literal" string. This
|
||||||
|
means that our pattern was just some normal text that we asked ripgrep to
|
||||||
|
find. But ripgrep supports the ability to specify patterns via [regular
|
||||||
|
expressions](https://en.wikipedia.org/wiki/Regular_expression). As an example,
|
||||||
|
what if we wanted to find all lines have a word that contains `fast` followed
|
||||||
|
by some number of other letters?
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fast\w+' README.md
|
||||||
|
75: faster than both. (N.B. It is not, strictly speaking, a "drop-in" replacement
|
||||||
|
119:### Is it really faster than everything else?
|
||||||
|
```
|
||||||
|
|
||||||
|
In this example, we used the pattern `fast\w+`. This pattern tells ripgrep to
|
||||||
|
look for any lines containing the letters `fast` followed by *one or more*
|
||||||
|
word-like characters. Namely, `\w` matches characters that compose words (like
|
||||||
|
`a` and `L` but unlike `.` and ` `). The `+` after the `\w` means, "match the
|
||||||
|
previous pattern one or more times." This means that the word `fast` won't
|
||||||
|
match because there are no word characters following the final `t`. But a word
|
||||||
|
like `faster` will. `faste` would also match!
|
||||||
|
|
||||||
|
Here's a different variation on this same theme:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fast\w*' README.md
|
||||||
|
75: faster than both. (N.B. It is not, strictly speaking, a "drop-in" replacement
|
||||||
|
88: color and full Unicode support. Unlike GNU grep, `ripgrep` stays fast while
|
||||||
|
119:### Is it really faster than everything else?
|
||||||
|
124:Summarizing, `ripgrep` is fast because:
|
||||||
|
129: optimizations to make searching very fast.
|
||||||
|
```
|
||||||
|
|
||||||
|
In this case, we used `fast\w*` for our pattern instead of `fast\w+`. The `*`
|
||||||
|
means that it should match *zero* or more times. In this case, ripgrep will
|
||||||
|
print the same lines as the pattern `fast`, but if your terminal supports
|
||||||
|
colors, you'll notice that `faster` will be highlighted instead of just the
|
||||||
|
`fast` prefix.
|
||||||
|
|
||||||
|
It is beyond the scope of this guide to provide a full tutorial on regular
|
||||||
|
expressions, but ripgrep's specific syntax is documented here:
|
||||||
|
https://docs.rs/regex/*/regex/#syntax
|
||||||
|
|
||||||
|
|
||||||
|
### Recursive search
|
||||||
|
|
||||||
|
In the previous section, we showed how to use ripgrep to search a single file.
|
||||||
|
In this section, we'll show how to use ripgrep to search an entire directory
|
||||||
|
of files. In fact, *recursively* searching your current working directory is
|
||||||
|
the default mode of operation for ripgrep, which means doing this is very
|
||||||
|
simple.
|
||||||
|
|
||||||
|
Using our unzipped archive of ripgrep source code, here's how to find all
|
||||||
|
function definitions whose name is `write`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fn write\('
|
||||||
|
src/printer.rs
|
||||||
|
469: fn write(&mut self, buf: &[u8]) {
|
||||||
|
|
||||||
|
termcolor/src/lib.rs
|
||||||
|
227: fn write(&mut self, b: &[u8]) -> io::Result<usize> {
|
||||||
|
250: fn write(&mut self, b: &[u8]) -> io::Result<usize> {
|
||||||
|
428: fn write(&mut self, b: &[u8]) -> io::Result<usize> { self.wtr.write(b) }
|
||||||
|
441: fn write(&mut self, b: &[u8]) -> io::Result<usize> { self.wtr.write(b) }
|
||||||
|
454: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
511: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
848: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
915: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
949: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
1114: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
1348: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
1353: fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
```
|
||||||
|
|
||||||
|
(**Note:** We escape the `(` here because `(` has special significance inside
|
||||||
|
regular expressions. You could also use `rg -F 'fn write('` to achieve the
|
||||||
|
same thing, where `-F` interprets your pattern as a literal string instead of
|
||||||
|
a regular expression.)
|
||||||
|
|
||||||
|
In this example, we didn't specify a file at all. Instead, ripgrep defaulted
|
||||||
|
to searching your current directory in the absence of a path. In general,
|
||||||
|
`rg foo` is equivalent to `rg foo ./`.
|
||||||
|
|
||||||
|
This particular search showed us results in both the `src` and `termcolor`
|
||||||
|
directories. The `src` directory is the core ripgrep code where as `termcolor`
|
||||||
|
is a dependency of ripgrep (and is used by other tools). What if we only wanted
|
||||||
|
to search core ripgrep code? Well, that's easy, just specify the directory you
|
||||||
|
want:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fn write\(' src
|
||||||
|
src/printer.rs
|
||||||
|
469: fn write(&mut self, buf: &[u8]) {
|
||||||
|
```
|
||||||
|
|
||||||
|
Here, ripgrep limited its search to the `src` directory. Another way of doing
|
||||||
|
this search would be to `cd` into the `src` directory and simply use `rg 'fn
|
||||||
|
write\('` again.
|
||||||
|
|
||||||
|
|
||||||
|
### Automatic filtering
|
||||||
|
|
||||||
|
After recursive search, ripgrep's most important feature is what it *doesn't*
|
||||||
|
search. By default, when you search a directory, ripgrep will ignore all of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
1. Files and directories that match the rules in your `.gitignore` glob
|
||||||
|
pattern.
|
||||||
|
2. Hidden files and directories.
|
||||||
|
3. Binary files. (ripgrep considers any file with a `NUL` byte to be binary.)
|
||||||
|
4. Symbolic links aren't followed.
|
||||||
|
|
||||||
|
All of these things can be toggled using various flags provided by ripgrep:
|
||||||
|
|
||||||
|
1. You can disable `.gitignore` handling with the `--no-ignore` flag.
|
||||||
|
2. Hidden files and directories can be searched with the `--hidden` flag.
|
||||||
|
3. Binary files can be searched via the `--text` (`-a` for short) flag.
|
||||||
|
Be careful with this flag! Binary files may emit control characters to your
|
||||||
|
terminal, which might cause strange behavior.
|
||||||
|
4. ripgrep can follow symlinks with the `--follow` (`-L` for short) flag.
|
||||||
|
|
||||||
|
As a special convenience, ripgrep also provides a flag called `--unrestricted`
|
||||||
|
(`-u` for short). Repeated uses of this flag will cause ripgrep to disable
|
||||||
|
more and more of its filtering. That is, `-u` will disable `.gitignore`
|
||||||
|
handling, `-uu` will search hidden files and directories and `-uuu` will search
|
||||||
|
binary files. This is useful when you're using ripgrep and you aren't sure
|
||||||
|
whether its filtering is hiding results from you. Tacking on a couple `-u`
|
||||||
|
flags is a quick way to find out. (Use the `--debug` flag if you're still
|
||||||
|
perplexed, and if that doesn't help,
|
||||||
|
[file an issue](https://github.com/BurntSushi/ripgrep/issues/new).)
|
||||||
|
|
||||||
|
ripgrep's `.gitignore` handling actually goes a bit beyond just `.gitignore`
|
||||||
|
files. ripgrep will also respect repository specific rules found in
|
||||||
|
`$GIT_DIR/info/exclude`, as well as any global ignore rules in your
|
||||||
|
`core.excludesFile` (which is usually `$XDG_CONFIG_HOME/git/ignore` on
|
||||||
|
Unix-like systems).
|
||||||
|
|
||||||
|
Sometimes you want to search files that are in your `.gitignore`, so it is
|
||||||
|
possible to specify additional ignore rules or overrides in a `.ignore`
|
||||||
|
(application agnostic) or `.rgignore` (ripgrep specific) file.
|
||||||
|
|
||||||
|
For example, let's say you have a `.gitignore` file that looks like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
log/
|
||||||
|
```
|
||||||
|
|
||||||
|
This generally means that any `log` directory won't be tracked by `git`.
|
||||||
|
However, perhaps it contains useful output that you'd like to include in your
|
||||||
|
searches, but you still don't want to track it in `git`. You can achieve this
|
||||||
|
by creating a `.ignore` file in the same directory as the `.gitignore` file
|
||||||
|
with the following contents:
|
||||||
|
|
||||||
|
```
|
||||||
|
!log/
|
||||||
|
```
|
||||||
|
|
||||||
|
ripgrep treats `.ignore` files with higher precedence than `.gitignore` files
|
||||||
|
(and treats `.rgignore` files with higher precedence than `.ignore` files).
|
||||||
|
This means ripgrep will see the `!log/` whitelist rule first and search that
|
||||||
|
directory.
|
||||||
|
|
||||||
|
Like `.gitignore`, a `.ignore` file can be placed in any directory. Its rules
|
||||||
|
will be processed with respect to the directory it resides in, just like
|
||||||
|
`.gitignore`.
|
||||||
|
|
||||||
|
To process `.gitignore` and `.ignore` files case insensitively, use the flag
|
||||||
|
`--ignore-file-case-insensitive`. This is especially useful on case insensitive
|
||||||
|
file systems like those on Windows and macOS. Note though that this can come
|
||||||
|
with a significant performance penalty, and is therefore disabled by default.
|
||||||
|
|
||||||
|
For a more in depth description of how glob patterns in a `.gitignore` file
|
||||||
|
are interpreted, please see `man gitignore`.
|
||||||
|
|
||||||
|
|
||||||
|
### Manual filtering: globs
|
||||||
|
|
||||||
|
In the previous section, we talked about ripgrep's filtering that it does by
|
||||||
|
default. It is "automatic" because it reacts to your environment. That is, it
|
||||||
|
uses already existing `.gitignore` files to produce more relevant search
|
||||||
|
results.
|
||||||
|
|
||||||
|
In addition to automatic filtering, ripgrep also provides more manual or ad hoc
|
||||||
|
filtering. This comes in two varieties: additional glob patterns specified in
|
||||||
|
your ripgrep commands and file type filtering. This section covers glob
|
||||||
|
patterns while the next section covers file type filtering.
|
||||||
|
|
||||||
|
In our ripgrep source code (see [Basics](#basics) for instructions on how to
|
||||||
|
get a source archive to search), let's say we wanted to see which things depend
|
||||||
|
on `clap`, our argument parser.
|
||||||
|
|
||||||
|
We could do this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg clap
|
||||||
|
[lots of results]
|
||||||
|
```
|
||||||
|
|
||||||
|
But this shows us many things, and we're only interested in where we wrote
|
||||||
|
`clap` as a dependency. Instead, we could limit ourselves to TOML files, which
|
||||||
|
is how dependencies are communicated to Rust's build tool, Cargo:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg clap -g '*.toml'
|
||||||
|
Cargo.toml
|
||||||
|
35:clap = "2.26"
|
||||||
|
51:clap = "2.26"
|
||||||
|
```
|
||||||
|
|
||||||
|
The `-g '*.toml'` syntax says, "make sure every file searched matches this
|
||||||
|
glob pattern." Note that we put `'*.toml'` in single quotes to prevent our
|
||||||
|
shell from expanding the `*`.
|
||||||
|
|
||||||
|
If we wanted, we could tell ripgrep to search anything *but* `*.toml` files:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg clap -g '!*.toml'
|
||||||
|
[lots of results]
|
||||||
|
```
|
||||||
|
|
||||||
|
This will give you a lot of results again as above, but they won't include
|
||||||
|
files ending with `.toml`. Note that the use of a `!` here to mean "negation"
|
||||||
|
is a bit non-standard, but it was chosen to be consistent with how globs in
|
||||||
|
`.gitignore` files are written. (Although, the meaning is reversed. In
|
||||||
|
`.gitignore` files, a `!` prefix means whitelist, and on the command line, a
|
||||||
|
`!` means blacklist.)
|
||||||
|
|
||||||
|
Globs are interpreted in exactly the same way as `.gitignore` patterns. That
|
||||||
|
is, later globs will override earlier globs. For example, the following command
|
||||||
|
will search only `*.toml` files:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg clap -g '!*.toml' -g '*.toml'
|
||||||
|
```
|
||||||
|
|
||||||
|
Interestingly, reversing the order of the globs in this case will match
|
||||||
|
nothing, since the presence of at least one non-blacklist glob will institute a
|
||||||
|
requirement that every file searched must match at least one glob. In this
|
||||||
|
case, the blacklist glob takes precedence over the previous glob and prevents
|
||||||
|
any file from being searched at all!
|
||||||
|
|
||||||
|
|
||||||
|
### Manual filtering: file types
|
||||||
|
|
||||||
|
Over time, you might notice that you use the same glob patterns over and over.
|
||||||
|
For example, you might find yourself doing a lot of searches where you only
|
||||||
|
want to see results for Rust files:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fn run' -g '*.rs'
|
||||||
|
```
|
||||||
|
|
||||||
|
Instead of writing out the glob every time, you can use ripgrep's support for
|
||||||
|
file types:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fn run' --type rust
|
||||||
|
```
|
||||||
|
|
||||||
|
or, more succinctly,
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fn run' -trust
|
||||||
|
```
|
||||||
|
|
||||||
|
The way the `--type` flag functions is simple. It acts as a name that is
|
||||||
|
assigned to one or more globs that match the relevant files. This lets you
|
||||||
|
write a single type that might encompass a broad range of file extensions. For
|
||||||
|
example, if you wanted to search C files, you'd have to check both C source
|
||||||
|
files and C header files:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'int main' -g '*.{c,h}'
|
||||||
|
```
|
||||||
|
|
||||||
|
or you could just use the C file type:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'int main' -tc
|
||||||
|
```
|
||||||
|
|
||||||
|
Just as you can write blacklist globs, you can blacklist file types too:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg clap --type-not rust
|
||||||
|
```
|
||||||
|
|
||||||
|
or, more succinctly,
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg clap -Trust
|
||||||
|
```
|
||||||
|
|
||||||
|
That is, `-t` means "include files of this type" where as `-T` means "exclude
|
||||||
|
files of this type."
|
||||||
|
|
||||||
|
To see the globs that make up a type, run `rg --type-list`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg --type-list | rg '^make:'
|
||||||
|
make: *.mak, *.mk, GNUmakefile, Gnumakefile, Makefile, gnumakefile, makefile
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, ripgrep comes with a bunch of pre-defined types. Generally, these
|
||||||
|
types correspond to well known public formats. But you can define your own
|
||||||
|
types as well. For example, perhaps you frequently search "web" files, which
|
||||||
|
consist of Javascript, HTML and CSS:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg --type-add 'web:*.html' --type-add 'web:*.css' --type-add 'web:*.js' -tweb title
|
||||||
|
```
|
||||||
|
|
||||||
|
or, more succinctly,
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg --type-add 'web:*.{html,css,js}' -tweb title
|
||||||
|
```
|
||||||
|
|
||||||
|
The above command defines a new type, `web`, corresponding to the glob
|
||||||
|
`*.{html,css,js}`. It then applies the new filter with `-tweb` and searches for
|
||||||
|
the pattern `title`. If you ran
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg --type-add 'web:*.{html,css,js}' --type-list
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you would see your `web` type show up in the list, even though it is not
|
||||||
|
part of ripgrep's built-in types.
|
||||||
|
|
||||||
|
It is important to stress here that the `--type-add` flag only applies to the
|
||||||
|
current command. It does not add a new file type and save it somewhere in a
|
||||||
|
persistent form. If you want a type to be available in every ripgrep command,
|
||||||
|
then you should either create a shell alias:
|
||||||
|
|
||||||
|
```
|
||||||
|
alias rg="rg --type-add 'web:*.{html,css,js}'"
|
||||||
|
```
|
||||||
|
|
||||||
|
or add `--type-add=web:*.{html,css,js}` to your ripgrep configuration file.
|
||||||
|
([Configuration files](#configuration-file) are covered in more detail later.)
|
||||||
|
|
||||||
|
|
||||||
|
### Replacements
|
||||||
|
|
||||||
|
ripgrep provides a limited ability to modify its output by replacing matched
|
||||||
|
text with some other text. This is easiest to explain with an example. Remember
|
||||||
|
when we searched for the word `fast` in ripgrep's README?
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg fast README.md
|
||||||
|
75: faster than both. (N.B. It is not, strictly speaking, a "drop-in" replacement
|
||||||
|
88: color and full Unicode support. Unlike GNU grep, `ripgrep` stays fast while
|
||||||
|
119:### Is it really faster than everything else?
|
||||||
|
124:Summarizing, `ripgrep` is fast because:
|
||||||
|
129: optimizations to make searching very fast.
|
||||||
|
```
|
||||||
|
|
||||||
|
What if we wanted to *replace* all occurrences of `fast` with `FAST`? That's
|
||||||
|
easy with ripgrep's `--replace` flag:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg fast README.md --replace FAST
|
||||||
|
75: FASTer than both. (N.B. It is not, strictly speaking, a "drop-in" replacement
|
||||||
|
88: color and full Unicode support. Unlike GNU grep, `ripgrep` stays FAST while
|
||||||
|
119:### Is it really FASTer than everything else?
|
||||||
|
124:Summarizing, `ripgrep` is FAST because:
|
||||||
|
129: optimizations to make searching very FAST.
|
||||||
|
```
|
||||||
|
|
||||||
|
or, more succinctly,
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg fast README.md -r FAST
|
||||||
|
[snip]
|
||||||
|
```
|
||||||
|
|
||||||
|
In essence, the `--replace` flag applies *only* to the matching portion of text
|
||||||
|
in the output. If you instead wanted to replace an entire line of text, then
|
||||||
|
you need to include the entire line in your match. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '^.*fast.*$' README.md -r FAST
|
||||||
|
75:FAST
|
||||||
|
88:FAST
|
||||||
|
119:FAST
|
||||||
|
124:FAST
|
||||||
|
129:FAST
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can combine the `--only-matching` (or `-o` for short) with
|
||||||
|
the `--replace` flag to achieve the same result:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg fast README.md --only-matching --replace FAST
|
||||||
|
75:FAST
|
||||||
|
88:FAST
|
||||||
|
119:FAST
|
||||||
|
124:FAST
|
||||||
|
129:FAST
|
||||||
|
```
|
||||||
|
|
||||||
|
or, more succinctly,
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg fast README.md -or FAST
|
||||||
|
[snip]
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, replacements can include capturing groups. For example, let's say
|
||||||
|
we wanted to find all occurrences of `fast` followed by another word and
|
||||||
|
join them together with a dash. The pattern we might use for that is
|
||||||
|
`fast\s+(\w+)`, which matches `fast`, followed by any amount of whitespace,
|
||||||
|
followed by any number of "word" characters. We put the `\w+` in a "capturing
|
||||||
|
group" (indicated by parentheses) so that we can reference it later in our
|
||||||
|
replacement string. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fast\s+(\w+)' README.md -r 'fast-$1'
|
||||||
|
88: color and full Unicode support. Unlike GNU grep, `ripgrep` stays fast-while
|
||||||
|
124:Summarizing, `ripgrep` is fast-because:
|
||||||
|
```
|
||||||
|
|
||||||
|
Our replacement string here, `fast-$1`, consists of `fast-` followed by the
|
||||||
|
contents of the capturing group at index `1`. (Capturing groups actually start
|
||||||
|
at index 0, but the `0`th capturing group always corresponds to the entire
|
||||||
|
match. The capturing group at index `1` always corresponds to the first
|
||||||
|
explicit capturing group found in the regex pattern.)
|
||||||
|
|
||||||
|
Capturing groups can also be named, which is sometimes more convenient than
|
||||||
|
using the indices. For example, the following command is equivalent to the
|
||||||
|
above command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'fast\s+(?P<word>\w+)' README.md -r 'fast-$word'
|
||||||
|
88: color and full Unicode support. Unlike GNU grep, `ripgrep` stays fast-while
|
||||||
|
124:Summarizing, `ripgrep` is fast-because:
|
||||||
|
```
|
||||||
|
|
||||||
|
It is important to note that ripgrep **will never modify your files**. The
|
||||||
|
`--replace` flag only controls ripgrep's output. (And there is no flag to let
|
||||||
|
you do a replacement in a file.)
|
||||||
|
|
||||||
|
|
||||||
|
### Configuration file
|
||||||
|
|
||||||
|
It is possible that ripgrep's default options aren't suitable in every case.
|
||||||
|
For that reason, and because shell aliases aren't always convenient, ripgrep
|
||||||
|
supports configuration files.
|
||||||
|
|
||||||
|
Setting up a configuration file is simple. ripgrep will not look in any
|
||||||
|
predetermined directory for a config file automatically. Instead, you need to
|
||||||
|
set the `RIPGREP_CONFIG_PATH` environment variable to the file path of your
|
||||||
|
config file. Once the environment variable is set, open the file and just type
|
||||||
|
in the flags you want set automatically. There are only two rules for
|
||||||
|
describing the format of the config file:
|
||||||
|
|
||||||
|
1. Every line is a shell argument, after trimming whitespace.
|
||||||
|
2. Lines starting with `#` (optionally preceded by any amount of whitespace)
|
||||||
|
are ignored.
|
||||||
|
|
||||||
|
In particular, there is no escaping. Each line is given to ripgrep as a single
|
||||||
|
command line argument verbatim.
|
||||||
|
|
||||||
|
Here's an example of a configuration file, which demonstrates some of the
|
||||||
|
formatting peculiarities:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat $HOME/.ripgreprc
|
||||||
|
# Don't let ripgrep vomit really long lines to my terminal, and show a preview.
|
||||||
|
--max-columns=150
|
||||||
|
--max-columns-preview
|
||||||
|
|
||||||
|
# Add my 'web' type.
|
||||||
|
--type-add
|
||||||
|
web:*.{html,css,js}*
|
||||||
|
|
||||||
|
# Using glob patterns to include/exclude files or folders
|
||||||
|
--glob=!git/*
|
||||||
|
|
||||||
|
# or
|
||||||
|
--glob
|
||||||
|
!git/*
|
||||||
|
|
||||||
|
# Set the colors.
|
||||||
|
--colors=line:none
|
||||||
|
--colors=line:style:bold
|
||||||
|
|
||||||
|
# Because who cares about case!?
|
||||||
|
--smart-case
|
||||||
|
```
|
||||||
|
|
||||||
|
When we use a flag that has a value, we either put the flag and the value on
|
||||||
|
the same line but delimited by an `=` sign (e.g., `--max-columns=150`), or we
|
||||||
|
put the flag and the value on two different lines. This is because ripgrep's
|
||||||
|
argument parser knows to treat the single argument `--max-columns=150` as a
|
||||||
|
flag with a value, but if we had written `--max-columns 150` in our
|
||||||
|
configuration file, then ripgrep's argument parser wouldn't know what to do
|
||||||
|
with it.
|
||||||
|
|
||||||
|
Putting the flag and value on different lines is exactly equivalent and is a
|
||||||
|
matter of style.
|
||||||
|
|
||||||
|
Comments are encouraged so that you remember what the config is doing. Empty
|
||||||
|
lines are OK too.
|
||||||
|
|
||||||
|
So let's say you're using the above configuration file, but while you're at a
|
||||||
|
terminal, you really want to be able to see lines longer than 150 columns. What
|
||||||
|
do you do? Thankfully, all you need to do is pass `--max-columns 0` (or `-M0`
|
||||||
|
for short) on the command line, which will override your configuration file's
|
||||||
|
setting. This works because ripgrep's configuration file is *prepended* to the
|
||||||
|
explicit arguments you give it on the command line. Since flags given later
|
||||||
|
override flags given earlier, everything works as expected. This works for most
|
||||||
|
other flags as well, and each flag's documentation states which other flags
|
||||||
|
override it.
|
||||||
|
|
||||||
|
If you're confused about what configuration file ripgrep is reading arguments
|
||||||
|
from, then running ripgrep with the `--debug` flag should help clarify things.
|
||||||
|
The debug output should note what config file is being loaded and the arguments
|
||||||
|
that have been read from the configuration.
|
||||||
|
|
||||||
|
Finally, if you want to make absolutely sure that ripgrep *isn't* reading a
|
||||||
|
configuration file, then you can pass the `--no-config` flag, which will always
|
||||||
|
prevent ripgrep from reading extraneous configuration from the environment,
|
||||||
|
regardless of what other methods of configuration are added to ripgrep in the
|
||||||
|
future.
|
||||||
|
|
||||||
|
|
||||||
|
### File encoding
|
||||||
|
|
||||||
|
[Text encoding](https://en.wikipedia.org/wiki/Character_encoding) is a complex
|
||||||
|
topic, but we can try to summarize its relevancy to ripgrep:
|
||||||
|
|
||||||
|
* Files are generally just a bundle of bytes. There is no reliable way to know
|
||||||
|
their encoding.
|
||||||
|
* Either the encoding of the pattern must match the encoding of the files being
|
||||||
|
searched, or a form of transcoding must be performed that converts either the
|
||||||
|
pattern or the file to the same encoding as the other.
|
||||||
|
* ripgrep tends to work best on plain text files, and among plain text files,
|
||||||
|
the most popular encodings likely consist of ASCII, latin1 or UTF-8. As
|
||||||
|
a special exception, UTF-16 is prevalent in Windows environments
|
||||||
|
|
||||||
|
In light of the above, here is how ripgrep behaves when `--encoding auto` is
|
||||||
|
given, which is the default:
|
||||||
|
|
||||||
|
* All input is assumed to be ASCII compatible (which means every byte that
|
||||||
|
corresponds to an ASCII codepoint actually is an ASCII codepoint). This
|
||||||
|
includes ASCII itself, latin1 and UTF-8.
|
||||||
|
* ripgrep works best with UTF-8. For example, ripgrep's regular expression
|
||||||
|
engine supports Unicode features. Namely, character classes like `\w` will
|
||||||
|
match all word characters by Unicode's definition and `.` will match any
|
||||||
|
Unicode codepoint instead of any byte. These constructions assume UTF-8,
|
||||||
|
so they simply won't match when they come across bytes in a file that aren't
|
||||||
|
UTF-8.
|
||||||
|
* To handle the UTF-16 case, ripgrep will do something called "BOM sniffing"
|
||||||
|
by default. That is, the first three bytes of a file will be read, and if
|
||||||
|
they correspond to a UTF-16 BOM, then ripgrep will transcode the contents of
|
||||||
|
the file from UTF-16 to UTF-8, and then execute the search on the transcoded
|
||||||
|
version of the file. (This incurs a performance penalty since transcoding
|
||||||
|
is slower than regex searching.) If the file contains invalid UTF-16, then
|
||||||
|
the Unicode replacement codepoint is substituted in place of invalid code
|
||||||
|
units.
|
||||||
|
* To handle other cases, ripgrep provides a `-E/--encoding` flag, which permits
|
||||||
|
you to specify an encoding from the
|
||||||
|
[Encoding Standard](https://encoding.spec.whatwg.org/#concept-encoding-get).
|
||||||
|
ripgrep will assume *all* files searched are the encoding specified (unless
|
||||||
|
the file has a BOM) and will perform a transcoding step just like in the
|
||||||
|
UTF-16 case described above.
|
||||||
|
|
||||||
|
By default, ripgrep will not require its input be valid UTF-8. That is, ripgrep
|
||||||
|
can and will search arbitrary bytes. The key here is that if you're searching
|
||||||
|
content that isn't UTF-8, then the usefulness of your pattern will degrade. If
|
||||||
|
you're searching bytes that aren't ASCII compatible, then it's likely the
|
||||||
|
pattern won't find anything. With all that said, this mode of operation is
|
||||||
|
important, because it lets you find ASCII or UTF-8 *within* files that are
|
||||||
|
otherwise arbitrary bytes.
|
||||||
|
|
||||||
|
As a special case, the `-E/--encoding` flag supports the value `none`, which
|
||||||
|
will completely disable all encoding related logic, including BOM sniffing.
|
||||||
|
When `-E/--encoding` is set to `none`, ripgrep will search the raw bytes of
|
||||||
|
the underlying file with no transcoding step. For example, here's how you might
|
||||||
|
search the raw UTF-16 encoding of the string `Шерлок`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '(?-u)\(\x045\x04@\x04;\x04>\x04:\x04' -E none -a some-utf16-file
|
||||||
|
```
|
||||||
|
|
||||||
|
Of course, that's just an example meant to show how one can drop down into
|
||||||
|
raw bytes. Namely, the simpler command works as you might expect automatically:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg 'Шерлок' some-utf16-file
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, it is possible to disable ripgrep's Unicode support from within the
|
||||||
|
regular expression. For example, let's say you wanted `.` to match any byte
|
||||||
|
rather than any Unicode codepoint. (You might want this while searching a
|
||||||
|
binary file, since `.` by default will not match invalid UTF-8.) You could do
|
||||||
|
this by disabling Unicode via a regular expression flag:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '(?-u:.)'
|
||||||
|
```
|
||||||
|
|
||||||
|
This works for any part of the pattern. For example, the following will find
|
||||||
|
any Unicode word character followed by any ASCII word character followed by
|
||||||
|
another Unicode word character:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rg '\w(?-u:\w)\w'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Binary data
|
||||||
|
|
||||||
|
In addition to skipping hidden files and files in your `.gitignore` by default,
|
||||||
|
ripgrep also attempts to skip binary files. ripgrep does this by default
|
||||||
|
because binary files (like PDFs or images) are typically not things you want to
|
||||||
|
search when searching for regex matches. Moreover, if content in a binary file
|
||||||
|
did match, then it's possible for undesirable binary data to be printed to your
|
||||||
|
terminal and wreak havoc.
|
||||||
|
|
||||||
|
Unfortunately, unlike skipping hidden files and respecting your `.gitignore`
|
||||||
|
rules, a file cannot as easily be classified as binary. In order to figure out
|
||||||
|
whether a file is binary, the most effective heuristic that balances
|
||||||
|
correctness with performance is to simply look for `NUL` bytes. At that point,
|
||||||
|
the determination is simple: a file is considered "binary" if and only if it
|
||||||
|
contains a `NUL` byte somewhere in its contents.
|
||||||
|
|
||||||
|
The issue is that while most binary files will have a `NUL` byte toward the
|
||||||
|
beginning of its contents, this is not necessarily true. The `NUL` byte might
|
||||||
|
be the very last byte in a large file, but that file is still considered
|
||||||
|
binary. While this leads to a fair amount of complexity inside ripgrep's
|
||||||
|
implementation, it also results in some unintuitive user experiences.
|
||||||
|
|
||||||
|
At a high level, ripgrep operates in three different modes with respect to
|
||||||
|
binary files:
|
||||||
|
|
||||||
|
1. The default mode is to attempt to remove binary files from a search
|
||||||
|
completely. This is meant to mirror how ripgrep removes hidden files and
|
||||||
|
files in your `.gitignore` automatically. That is, as soon as a file is
|
||||||
|
detected as binary, searching stops. If a match was already printed (because
|
||||||
|
it was detected long before a `NUL` byte), then ripgrep will print a warning
|
||||||
|
message indicating that the search stopped prematurely. This default mode
|
||||||
|
**only applies to files searched by ripgrep as a result of recursive
|
||||||
|
directory traversal**, which is consistent with ripgrep's other automatic
|
||||||
|
filtering. For example, `rg foo .file` will search `.file` even though it
|
||||||
|
is hidden. Similarly, `rg foo binary-file` search `binary-file` in "binary"
|
||||||
|
mode automatically.
|
||||||
|
2. Binary mode is similar to the default mode, except it will not always
|
||||||
|
stop searching after it sees a `NUL` byte. Namely, in this mode, ripgrep
|
||||||
|
will continue searching a file that is known to be binary until the first
|
||||||
|
of two conditions is met: 1) the end of the file has been reached or 2) a
|
||||||
|
match is or has been seen. This means that in binary mode, if ripgrep
|
||||||
|
reports no matches, then there are no matches in the file. When a match does
|
||||||
|
occur, ripgrep prints a message similar to one it prints when in its default
|
||||||
|
mode indicating that the search has stopped prematurely. This mode can be
|
||||||
|
forcefully enabled for all files with the `--binary` flag. The purpose of
|
||||||
|
binary mode is to provide a way to discover matches in all files, but to
|
||||||
|
avoid having binary data dumped into your terminal.
|
||||||
|
3. Text mode completely disables all binary detection and searches all files
|
||||||
|
as if they were text. This is useful when searching a file that is
|
||||||
|
predominantly text but contains a `NUL` byte, or if you are specifically
|
||||||
|
trying to search binary data. This mode can be enabled with the `-a/--text`
|
||||||
|
flag. Note that when using this mode on very large binary files, it is
|
||||||
|
possible for ripgrep to use a lot of memory.
|
||||||
|
|
||||||
|
Unfortunately, there is one additional complexity in ripgrep that can make it
|
||||||
|
difficult to reason about binary files. That is, the way binary detection works
|
||||||
|
depends on the way that ripgrep searches your files. Specifically:
|
||||||
|
|
||||||
|
* When ripgrep uses memory maps, then binary detection is only performed on the
|
||||||
|
first few kilobytes of the file in addition to every matching line.
|
||||||
|
* When ripgrep doesn't use memory maps, then binary detection is performed on
|
||||||
|
all bytes searched.
|
||||||
|
|
||||||
|
This means that whether a file is detected as binary or not can change based
|
||||||
|
on the internal search strategy used by ripgrep. If you prefer to keep
|
||||||
|
ripgrep's binary file detection consistent, then you can disable memory maps
|
||||||
|
via the `--no-mmap` flag. (The cost will be a small performance regression when
|
||||||
|
searching very large files on some platforms.)
|
||||||
|
|
||||||
|
|
||||||
|
### Common options
|
||||||
|
|
||||||
|
ripgrep has a lot of flags. Too many to keep in your head at once. This section
|
||||||
|
is intended to give you a sampling of some of the most important and frequently
|
||||||
|
used options that will likely impact how you use ripgrep on a regular basis.
|
||||||
|
|
||||||
|
* `-h`: Show ripgrep's condensed help output.
|
||||||
|
* `--help`: Show ripgrep's longer form help output. (Nearly what you'd find in
|
||||||
|
ripgrep's man page, so pipe it into a pager!)
|
||||||
|
* `-i/--ignore-case`: When searching for a pattern, ignore case differences.
|
||||||
|
That is `rg -i fast` matches `fast`, `fASt`, `FAST`, etc.
|
||||||
|
* `-S/--smart-case`: This is similar to `--ignore-case`, but disables itself
|
||||||
|
if the pattern contains any uppercase letters. Usually this flag is put into
|
||||||
|
alias or a config file.
|
||||||
|
* `-w/--word-regexp`: Require that all matches of the pattern be surrounded
|
||||||
|
by word boundaries. That is, given `pattern`, the `--word-regexp` flag will
|
||||||
|
cause ripgrep to behave as if `pattern` were actually `\b(?:pattern)\b`.
|
||||||
|
* `-c/--count`: Report a count of total matched lines.
|
||||||
|
* `--files`: Print the files that ripgrep *would* search, but don't actually
|
||||||
|
search them.
|
||||||
|
* `-a/--text`: Search binary files as if they were plain text.
|
||||||
|
* `-z/--search-zip`: Search compressed files (gzip, bzip2, lzma, xz, lz4,
|
||||||
|
brotli, zstd). This is disabled by default.
|
||||||
|
* `-C/--context`: Show the lines surrounding a match.
|
||||||
|
* `--sort path`: Force ripgrep to sort its output by file name. (This disables
|
||||||
|
parallelism, so it might be slower.)
|
||||||
|
* `-L/--follow`: Follow symbolic links while recursively searching.
|
||||||
|
* `-M/--max-columns`: Limit the length of lines printed by ripgrep.
|
||||||
|
* `--debug`: Shows ripgrep's debug output. This is useful for understanding
|
||||||
|
why a particular file might be ignored from search, or what kinds of
|
||||||
|
configuration ripgrep is loading from the environment.
|
||||||
1
HomebrewFormula
Symbolic link
1
HomebrewFormula
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
pkg/brew
|
||||||
53
ISSUE_TEMPLATE.md
Normal file
53
ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#### What version of ripgrep are you using?
|
||||||
|
|
||||||
|
Replace this text with the output of `rg --version`.
|
||||||
|
|
||||||
|
#### How did you install ripgrep?
|
||||||
|
|
||||||
|
If you installed ripgrep with snap and are getting strange file permission or
|
||||||
|
file not found errors, then please do not file a bug. Instead, use one of the
|
||||||
|
Github binary releases.
|
||||||
|
|
||||||
|
#### What operating system are you using ripgrep on?
|
||||||
|
|
||||||
|
Replace this text with your operating system and version.
|
||||||
|
|
||||||
|
#### Describe your question, feature request, or bug.
|
||||||
|
|
||||||
|
If a question, please describe the problem you're trying to solve and give
|
||||||
|
as much context as possible.
|
||||||
|
|
||||||
|
If a feature request, please describe the behavior you want and the motivation.
|
||||||
|
Please also provide an example of how ripgrep would be used if your feature
|
||||||
|
request were added.
|
||||||
|
|
||||||
|
If a bug, please see below.
|
||||||
|
|
||||||
|
#### If this is a bug, what are the steps to reproduce the behavior?
|
||||||
|
|
||||||
|
If possible, please include both your search patterns and the corpus on which
|
||||||
|
you are searching. Unless the bug is very obvious, then it is unlikely that it
|
||||||
|
will be fixed if the ripgrep maintainers cannot reproduce it.
|
||||||
|
|
||||||
|
If the corpus is too big and you cannot decrease its size, file the bug anyway
|
||||||
|
and the ripgrep maintainers will help figure out next steps.
|
||||||
|
|
||||||
|
#### If this is a bug, what is the actual behavior?
|
||||||
|
|
||||||
|
Show the command you ran and the actual output. Include the `--debug` flag in
|
||||||
|
your invocation of ripgrep.
|
||||||
|
|
||||||
|
If the output is large, put it in a gist: https://gist.github.com/
|
||||||
|
|
||||||
|
If the output is small, put it in code fences:
|
||||||
|
|
||||||
|
```
|
||||||
|
your
|
||||||
|
output
|
||||||
|
goes
|
||||||
|
here
|
||||||
|
```
|
||||||
|
|
||||||
|
#### If this is a bug, what is the expected behavior?
|
||||||
|
|
||||||
|
What do you think ripgrep should have done?
|
||||||
14
Makefile
14
Makefile
@@ -1,14 +0,0 @@
|
|||||||
all:
|
|
||||||
echo Nothing to do...
|
|
||||||
|
|
||||||
ctags:
|
|
||||||
ctags --options=ctags.rust --languages=Rust src/*.rs src/*/*.rs
|
|
||||||
|
|
||||||
docs:
|
|
||||||
cargo doc
|
|
||||||
in-dir ./target/doc fix-perms
|
|
||||||
rscp ./target/doc/* gopher:~/www/burntsushi.net/rustdoc/
|
|
||||||
|
|
||||||
push:
|
|
||||||
git push origin master
|
|
||||||
git push github master
|
|
||||||
434
README.md
434
README.md
@@ -1,5 +1,429 @@
|
|||||||
rep
|
ripgrep (rg)
|
||||||
---
|
------------
|
||||||
A faster `grep`, written in Rust using the
|
ripgrep is a line-oriented search tool that recursively searches your current
|
||||||
[`regex`](https://github.com/rust-lang-nursery/regex)
|
directory for a regex pattern. By default, ripgrep will respect your .gitignore
|
||||||
crate.
|
and automatically skip hidden files/directories and binary files. ripgrep
|
||||||
|
has first class support on Windows, macOS and Linux, with binary downloads
|
||||||
|
available for [every release](https://github.com/BurntSushi/ripgrep/releases).
|
||||||
|
ripgrep is similar to other popular search tools like The Silver Searcher, ack
|
||||||
|
and grep.
|
||||||
|
|
||||||
|
[](https://travis-ci.org/BurntSushi/ripgrep)
|
||||||
|
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||||
|
[](https://crates.io/crates/ripgrep)
|
||||||
|
[](https://repology.org/project/ripgrep/badges)
|
||||||
|
|
||||||
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
|
||||||
|
### CHANGELOG
|
||||||
|
|
||||||
|
Please see the [CHANGELOG](CHANGELOG.md) for a release history.
|
||||||
|
|
||||||
|
### Documentation quick links
|
||||||
|
|
||||||
|
* [Installation](#installation)
|
||||||
|
* [User Guide](GUIDE.md)
|
||||||
|
* [Frequently Asked Questions](FAQ.md)
|
||||||
|
* [Regex syntax](https://docs.rs/regex/1/regex/#syntax)
|
||||||
|
* [Configuration files](GUIDE.md#configuration-file)
|
||||||
|
* [Shell completions](FAQ.md#complete)
|
||||||
|
* [Building](#building)
|
||||||
|
* [Translations](#translations)
|
||||||
|
|
||||||
|
|
||||||
|
### Screenshot of search results
|
||||||
|
|
||||||
|
[](http://burntsushi.net/stuff/ripgrep1.png)
|
||||||
|
|
||||||
|
|
||||||
|
### Quick examples comparing tools
|
||||||
|
|
||||||
|
This example searches the entire Linux kernel source tree (after running
|
||||||
|
`make defconfig && make -j8`) for `[A-Z]+_SUSPEND`, where all matches must be
|
||||||
|
words. Timings were collected on a system with an Intel i7-6900K 3.2 GHz, and
|
||||||
|
ripgrep was compiled with SIMD enabled.
|
||||||
|
|
||||||
|
Please remember that a single benchmark is never enough! See my
|
||||||
|
[blog post on ripgrep](http://blog.burntsushi.net/ripgrep/)
|
||||||
|
for a very detailed comparison with more benchmarks and analysis.
|
||||||
|
|
||||||
|
| Tool | Command | Line count | Time |
|
||||||
|
| ---- | ------- | ---------- | ---- |
|
||||||
|
| ripgrep (Unicode) | `rg -n -w '[A-Z]+_SUSPEND'` | 450 | **0.106s** |
|
||||||
|
| [git grep](https://www.kernel.org/pub/software/scm/git/docs/git-grep.html) | `LC_ALL=C git grep -E -n -w '[A-Z]+_SUSPEND'` | 450 | 0.553s |
|
||||||
|
| [The Silver Searcher](https://github.com/ggreer/the_silver_searcher) | `ag -w '[A-Z]+_SUSPEND'` | 450 | 0.589s |
|
||||||
|
| [git grep (Unicode)](https://www.kernel.org/pub/software/scm/git/docs/git-grep.html) | `LC_ALL=en_US.UTF-8 git grep -E -n -w '[A-Z]+_SUSPEND'` | 450 | 2.266s |
|
||||||
|
| [sift](https://github.com/svent/sift) | `sift --git -n -w '[A-Z]+_SUSPEND'` | 450 | 3.505s |
|
||||||
|
| [ack](https://github.com/petdance/ack2) | `ack -w '[A-Z]+_SUSPEND'` | 1878 | 6.823s |
|
||||||
|
| [The Platinum Searcher](https://github.com/monochromegane/the_platinum_searcher) | `pt -w -e '[A-Z]+_SUSPEND'` | 450 | 14.208s |
|
||||||
|
|
||||||
|
(Yes, `ack` [has](https://github.com/petdance/ack2/issues/445) a
|
||||||
|
[bug](https://github.com/petdance/ack2/issues/14).)
|
||||||
|
|
||||||
|
Here's another benchmark that disregards gitignore files and searches with a
|
||||||
|
whitelist instead. The corpus is the same as in the previous benchmark, and the
|
||||||
|
flags passed to each command ensure that they are doing equivalent work:
|
||||||
|
|
||||||
|
| Tool | Command | Line count | Time |
|
||||||
|
| ---- | ------- | ---------- | ---- |
|
||||||
|
| ripgrep | `rg -L -u -tc -n -w '[A-Z]+_SUSPEND'` | 404 | **0.079s** |
|
||||||
|
| [ucg](https://github.com/gvansickle/ucg) | `ucg --type=cc -w '[A-Z]+_SUSPEND'` | 390 | 0.163s |
|
||||||
|
| [GNU grep](https://www.gnu.org/software/grep/) | `egrep -R -n --include='*.c' --include='*.h' -w '[A-Z]+_SUSPEND'` | 404 | 0.611s |
|
||||||
|
|
||||||
|
(`ucg` [has slightly different behavior in the presence of symbolic links](https://github.com/gvansickle/ucg/issues/106).)
|
||||||
|
|
||||||
|
And finally, a straight-up comparison between ripgrep and GNU grep on a single
|
||||||
|
large file (~9.3GB,
|
||||||
|
[`OpenSubtitles2016.raw.en.gz`](http://opus.lingfil.uu.se/OpenSubtitles2016/mono/OpenSubtitles2016.raw.en.gz)):
|
||||||
|
|
||||||
|
| Tool | Command | Line count | Time |
|
||||||
|
| ---- | ------- | ---------- | ---- |
|
||||||
|
| ripgrep | `rg -w 'Sherlock [A-Z]\w+'` | 5268 | **2.108s** |
|
||||||
|
| [GNU grep](https://www.gnu.org/software/grep/) | `LC_ALL=C egrep -w 'Sherlock [A-Z]\w+'` | 5268 | 7.014s |
|
||||||
|
|
||||||
|
In the above benchmark, passing the `-n` flag (for showing line numbers)
|
||||||
|
increases the times to `2.640s` for ripgrep and `10.277s` for GNU grep.
|
||||||
|
|
||||||
|
|
||||||
|
### Why should I use ripgrep?
|
||||||
|
|
||||||
|
* It can replace many use cases served by other search tools
|
||||||
|
because it contains most of their features and is generally faster. (See
|
||||||
|
[the FAQ](FAQ.md#posix4ever) for more details on whether ripgrep can truly
|
||||||
|
replace grep.)
|
||||||
|
* Like other tools specialized to code search, ripgrep defaults to recursive
|
||||||
|
directory search and won't search files ignored by your
|
||||||
|
`.gitignore`/`.ignore`/`.rgignore` files. It also ignores hidden and binary
|
||||||
|
files by default. ripgrep also implements full support for `.gitignore`,
|
||||||
|
whereas there are many bugs related to that functionality in other code
|
||||||
|
search tools claiming to provide the same functionality.
|
||||||
|
* ripgrep can search specific types of files. For example, `rg -tpy foo`
|
||||||
|
limits your search to Python files and `rg -Tjs foo` excludes Javascript
|
||||||
|
files from your search. ripgrep can be taught about new file types with
|
||||||
|
custom matching rules.
|
||||||
|
* ripgrep supports many features found in `grep`, such as showing the context
|
||||||
|
of search results, searching multiple patterns, highlighting matches with
|
||||||
|
color and full Unicode support. Unlike GNU grep, ripgrep stays fast while
|
||||||
|
supporting Unicode (which is always on).
|
||||||
|
* ripgrep has optional support for switching its regex engine to use PCRE2.
|
||||||
|
Among other things, this makes it possible to use look-around and
|
||||||
|
backreferences in your patterns, which are not supported in ripgrep's default
|
||||||
|
regex engine. PCRE2 support can be enabled with `-P/--pcre2` (use PCRE2
|
||||||
|
always) or `--auto-hybrid-regex` (use PCRE2 only if needed).
|
||||||
|
* ripgrep supports searching files in text encodings other than UTF-8, such
|
||||||
|
as UTF-16, latin-1, GBK, EUC-JP, Shift_JIS and more. (Some support for
|
||||||
|
automatically detecting UTF-16 is provided. Other text encodings must be
|
||||||
|
specifically specified with the `-E/--encoding` flag.)
|
||||||
|
* ripgrep supports searching files compressed in a common format (brotli,
|
||||||
|
bzip2, gzip, lz4, lzma, xz, or zstandard) with the `-z/--search-zip` flag.
|
||||||
|
* ripgrep supports arbitrary input preprocessing filters which could be PDF
|
||||||
|
text extraction, less supported decompression, decrypting, automatic encoding
|
||||||
|
detection and so on.
|
||||||
|
|
||||||
|
In other words, use ripgrep if you like speed, filtering by default, fewer
|
||||||
|
bugs and Unicode support.
|
||||||
|
|
||||||
|
|
||||||
|
### Why shouldn't I use ripgrep?
|
||||||
|
|
||||||
|
Despite initially not wanting to add every feature under the sun to ripgrep,
|
||||||
|
over time, ripgrep has grown support for most features found in other file
|
||||||
|
searching tools. This includes searching for results spanning across multiple
|
||||||
|
lines, and opt-in support for PCRE2, which provides look-around and
|
||||||
|
backreference support.
|
||||||
|
|
||||||
|
At this point, the primary reasons not to use ripgrep probably consist of one
|
||||||
|
or more of the following:
|
||||||
|
|
||||||
|
* You need a portable and ubiquitous tool. While ripgrep works on Windows,
|
||||||
|
macOS and Linux, it is not ubiquitous and it does not conform to any
|
||||||
|
standard such as POSIX. The best tool for this job is good old grep.
|
||||||
|
* There still exists some other feature (or bug) not listed in this README that
|
||||||
|
you rely on that's in another tool that isn't in ripgrep.
|
||||||
|
* There is a performance edge case where ripgrep doesn't do well where another
|
||||||
|
tool does do well. (Please file a bug report!)
|
||||||
|
* ripgrep isn't possible to install on your machine or isn't available for your
|
||||||
|
platform. (Please file a bug report!)
|
||||||
|
|
||||||
|
|
||||||
|
### Is it really faster than everything else?
|
||||||
|
|
||||||
|
Generally, yes. A large number of benchmarks with detailed analysis for each is
|
||||||
|
[available on my blog](http://blog.burntsushi.net/ripgrep/).
|
||||||
|
|
||||||
|
Summarizing, ripgrep is fast because:
|
||||||
|
|
||||||
|
* It is built on top of
|
||||||
|
[Rust's regex engine](https://github.com/rust-lang-nursery/regex).
|
||||||
|
Rust's regex engine uses finite automata, SIMD and aggressive literal
|
||||||
|
optimizations to make searching very fast. (PCRE2 support can be opted into
|
||||||
|
with the `-P/--pcre2` flag.)
|
||||||
|
* Rust's regex library maintains performance with full Unicode support by
|
||||||
|
building UTF-8 decoding directly into its deterministic finite automaton
|
||||||
|
engine.
|
||||||
|
* It supports searching with either memory maps or by searching incrementally
|
||||||
|
with an intermediate buffer. The former is better for single files and the
|
||||||
|
latter is better for large directories. ripgrep chooses the best searching
|
||||||
|
strategy for you automatically.
|
||||||
|
* Applies your ignore patterns in `.gitignore` files using a
|
||||||
|
[`RegexSet`](https://docs.rs/regex/1/regex/struct.RegexSet.html).
|
||||||
|
That means a single file path can be matched against multiple glob patterns
|
||||||
|
simultaneously.
|
||||||
|
* It uses a lock-free parallel recursive directory iterator, courtesy of
|
||||||
|
[`crossbeam`](https://docs.rs/crossbeam) and
|
||||||
|
[`ignore`](https://docs.rs/ignore).
|
||||||
|
|
||||||
|
|
||||||
|
### Feature comparison
|
||||||
|
|
||||||
|
Andy Lester, author of [ack](https://beyondgrep.com/), has published an
|
||||||
|
excellent table comparing the features of ack, ag, git-grep, GNU grep and
|
||||||
|
ripgrep: https://beyondgrep.com/feature-comparison/
|
||||||
|
|
||||||
|
Note that ripgrep has grown a few significant new features recently that
|
||||||
|
are not yet present in Andy's table. This includes, but is not limited to,
|
||||||
|
configuration files, passthru, support for searching compressed files,
|
||||||
|
multiline search and opt-in fancy regex support via PCRE2.
|
||||||
|
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
The binary name for ripgrep is `rg`.
|
||||||
|
|
||||||
|
**[Archives of precompiled binaries for ripgrep are available for Windows,
|
||||||
|
macOS and Linux.](https://github.com/BurntSushi/ripgrep/releases)** Users of
|
||||||
|
platforms not explicitly mentioned below are advised to download one of these
|
||||||
|
archives.
|
||||||
|
|
||||||
|
Linux binaries are static executables. Windows binaries are available either as
|
||||||
|
built with MinGW (GNU) or with Microsoft Visual C++ (MSVC). When possible,
|
||||||
|
prefer MSVC over GNU, but you'll need to have the [Microsoft VC++ 2015
|
||||||
|
redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145)
|
||||||
|
installed.
|
||||||
|
|
||||||
|
If you're a **macOS Homebrew** or a **Linuxbrew** user,
|
||||||
|
then you can install ripgrep either
|
||||||
|
from homebrew-core, (compiled with rust stable, no SIMD):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ brew install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **MacPorts** user, then you can install ripgrep from the
|
||||||
|
[official ports](https://www.macports.org/ports.php?by=name&substr=ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo port install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Windows Chocolatey** user, then you can install ripgrep from the
|
||||||
|
[official repo](https://chocolatey.org/packages/ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ choco install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Windows Scoop** user, then you can install ripgrep from the
|
||||||
|
[official bucket](https://github.com/ScoopInstaller/Main/blob/master/bucket/ripgrep.json):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ scoop install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're an **Arch Linux** user, then you can install ripgrep from the official repos:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pacman -S ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Gentoo** user, you can install ripgrep from the
|
||||||
|
[official repo](https://packages.gentoo.org/packages/sys-apps/ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ emerge sys-apps/ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Fedora** user, you can install ripgrep from official
|
||||||
|
repositories.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo dnf install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're an **openSUSE Leap 15.0** user, you can install ripgrep from the
|
||||||
|
[utilities repo](https://build.opensuse.org/package/show/utilities/ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo zypper ar https://download.opensuse.org/repositories/utilities/openSUSE_Leap_15.0/utilities.repo
|
||||||
|
$ sudo zypper install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
If you're an **openSUSE Tumbleweed** user, you can install ripgrep from the
|
||||||
|
[official repo](http://software.opensuse.org/package/ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo zypper install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **RHEL/CentOS 7** user, you can install ripgrep from
|
||||||
|
[copr](https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo
|
||||||
|
$ sudo yum install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Nix** user, you can install ripgrep from
|
||||||
|
[nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/text/ripgrep/default.nix):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ nix-env --install ripgrep
|
||||||
|
$ # (Or using the attribute name, which is also ripgrep.)
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Debian** user (or a user of a Debian derivative like **Ubuntu**),
|
||||||
|
then ripgrep can be installed using a binary `.deb` file provided in each
|
||||||
|
[ripgrep release](https://github.com/BurntSushi/ripgrep/releases).
|
||||||
|
|
||||||
|
```
|
||||||
|
$ curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb
|
||||||
|
$ sudo dpkg -i ripgrep_11.0.2_amd64.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
If you run Debian Buster (currently Debian stable) or Debian sid, ripgrep is
|
||||||
|
[officially maintained by Debian](https://tracker.debian.org/pkg/rust-ripgrep).
|
||||||
|
```
|
||||||
|
$ sudo apt-get install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're an **Ubuntu Cosmic (18.10)** (or newer) user, ripgrep is
|
||||||
|
[available](https://launchpad.net/ubuntu/+source/rust-ripgrep) using the same
|
||||||
|
packaging as Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo apt-get install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
(N.B. Various snaps for ripgrep on Ubuntu are also available, but none of them
|
||||||
|
seem to work right and generate a number of very strange bug reports that I
|
||||||
|
don't know how to fix and don't have the time to fix. Therefore, it is no
|
||||||
|
longer a recommended installation option.)
|
||||||
|
|
||||||
|
If you're a **FreeBSD** user, then you can install ripgrep from the
|
||||||
|
[official ports](https://www.freshports.org/textproc/ripgrep/):
|
||||||
|
|
||||||
|
```
|
||||||
|
# pkg install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're an **OpenBSD** user, then you can install ripgrep from the
|
||||||
|
[official ports](http://openports.se/textproc/ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ doas pkg_add ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **NetBSD** user, then you can install ripgrep from
|
||||||
|
[pkgsrc](http://pkgsrc.se/textproc/ripgrep):
|
||||||
|
|
||||||
|
```
|
||||||
|
# pkgin install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're a **Rust programmer**, ripgrep can be installed with `cargo`.
|
||||||
|
|
||||||
|
* Note that the minimum supported version of Rust for ripgrep is **1.34.0**,
|
||||||
|
although ripgrep may work with older versions.
|
||||||
|
* Note that the binary may be bigger than expected because it contains debug
|
||||||
|
symbols. This is intentional. To remove debug symbols and therefore reduce
|
||||||
|
the file size, run `strip` on the binary.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cargo install ripgrep
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Building
|
||||||
|
|
||||||
|
ripgrep is written in Rust, so you'll need to grab a
|
||||||
|
[Rust installation](https://www.rust-lang.org/) in order to compile it.
|
||||||
|
ripgrep compiles with Rust 1.34.0 (stable) or newer. In general, ripgrep tracks
|
||||||
|
the latest stable release of the Rust compiler.
|
||||||
|
|
||||||
|
To build ripgrep:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git clone https://github.com/BurntSushi/ripgrep
|
||||||
|
$ cd ripgrep
|
||||||
|
$ cargo build --release
|
||||||
|
$ ./target/release/rg --version
|
||||||
|
0.1.3
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have a Rust nightly compiler and a recent Intel CPU, then you can enable
|
||||||
|
additional optional SIMD acceleration like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
RUSTFLAGS="-C target-cpu=native" cargo build --release --features 'simd-accel'
|
||||||
|
```
|
||||||
|
|
||||||
|
The `simd-accel` feature enables SIMD support in certain ripgrep dependencies
|
||||||
|
(responsible for transcoding). They are not necessary to get SIMD optimizations
|
||||||
|
for search; those are enabled automatically. Hopefully, some day, the
|
||||||
|
`simd-accel` feature will similarly become unnecessary. **WARNING:** Currently,
|
||||||
|
enabling this option can increase compilation times dramatically.
|
||||||
|
|
||||||
|
Finally, optional PCRE2 support can be built with ripgrep by enabling the
|
||||||
|
`pcre2` feature:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cargo build --release --features 'pcre2'
|
||||||
|
```
|
||||||
|
|
||||||
|
(Tip: use `--features 'pcre2 simd-accel'` to also include compile time SIMD
|
||||||
|
optimizations, which will only work with a nightly compiler.)
|
||||||
|
|
||||||
|
Enabling the PCRE2 feature works with a stable Rust compiler and will
|
||||||
|
attempt to automatically find and link with your system's PCRE2 library via
|
||||||
|
`pkg-config`. If one doesn't exist, then ripgrep will build PCRE2 from source
|
||||||
|
using your system's C compiler and then statically link it into the final
|
||||||
|
executable. Static linking can be forced even when there is an available PCRE2
|
||||||
|
system library by either building ripgrep with the MUSL target or by setting
|
||||||
|
`PCRE2_SYS_STATIC=1`.
|
||||||
|
|
||||||
|
ripgrep can be built with the MUSL target on Linux by first installing the MUSL
|
||||||
|
library on your system (consult your friendly neighborhood package manager).
|
||||||
|
Then you just need to add MUSL support to your Rust toolchain and rebuild
|
||||||
|
ripgrep, which yields a fully static executable:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rustup target add x86_64-unknown-linux-musl
|
||||||
|
$ cargo build --release --target x86_64-unknown-linux-musl
|
||||||
|
```
|
||||||
|
|
||||||
|
Applying the `--features` flag from above works as expected. If you want to
|
||||||
|
build a static executable with MUSL and with PCRE2, then you will need to have
|
||||||
|
`musl-gcc` installed, which might be in a separate package from the actual
|
||||||
|
MUSL library, depending on your Linux distribution.
|
||||||
|
|
||||||
|
|
||||||
|
### Running tests
|
||||||
|
|
||||||
|
ripgrep is relatively well-tested, including both unit tests and integration
|
||||||
|
tests. To run the full test suite, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cargo test --all
|
||||||
|
```
|
||||||
|
|
||||||
|
from the repository root.
|
||||||
|
|
||||||
|
|
||||||
|
### Translations
|
||||||
|
|
||||||
|
The following is a list of known translations of ripgrep's documentation. These
|
||||||
|
are unofficially maintained and may not be up to date.
|
||||||
|
|
||||||
|
* [Chinese](https://github.com/chinanf-boy/ripgrep-zh#%E6%9B%B4%E6%96%B0-)
|
||||||
|
|||||||
75
appveyor.yml
75
appveyor.yml
@@ -1,52 +1,70 @@
|
|||||||
|
cache:
|
||||||
|
- c:\cargo\registry
|
||||||
|
- c:\cargo\git
|
||||||
|
|
||||||
|
init:
|
||||||
|
- mkdir c:\cargo
|
||||||
|
- mkdir c:\rustup
|
||||||
|
- SET PATH=c:\cargo\bin;%PATH%
|
||||||
|
|
||||||
|
clone_folder: c:\projects\ripgrep
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
CARGO_HOME: "c:\\cargo"
|
||||||
|
RUSTUP_HOME: "c:\\rustup"
|
||||||
|
CARGO_TARGET_DIR: "c:\\projects\\ripgrep\\target"
|
||||||
global:
|
global:
|
||||||
PROJECT_NAME: xrep
|
PROJECT_NAME: ripgrep
|
||||||
|
RUST_BACKTRACE: full
|
||||||
matrix:
|
matrix:
|
||||||
# Nightly channel
|
|
||||||
- TARGET: i686-pc-windows-gnu
|
|
||||||
CHANNEL: nightly
|
|
||||||
- TARGET: i686-pc-windows-msvc
|
|
||||||
CHANNEL: nightly
|
|
||||||
- TARGET: x86_64-pc-windows-gnu
|
- TARGET: x86_64-pc-windows-gnu
|
||||||
CHANNEL: nightly
|
CHANNEL: stable
|
||||||
|
BITS: 64
|
||||||
|
MSYS2: 1
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
- TARGET: x86_64-pc-windows-msvc
|
||||||
CHANNEL: nightly
|
CHANNEL: stable
|
||||||
|
BITS: 64
|
||||||
|
- TARGET: i686-pc-windows-gnu
|
||||||
|
CHANNEL: stable
|
||||||
|
BITS: 32
|
||||||
|
MSYS2: 1
|
||||||
|
- TARGET: i686-pc-windows-msvc
|
||||||
|
CHANNEL: stable
|
||||||
|
BITS: 32
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
# Install Rust and Cargo
|
# Install Rust and Cargo
|
||||||
# (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml)
|
# (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml)
|
||||||
install:
|
install:
|
||||||
- ps: Start-FileDownload "https://static.rust-lang.org/dist/channel-rust-stable"
|
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
||||||
- ps: $env:RUST_VERSION = Get-Content channel-rust-stable | select -first 1 | %{$_.split('-')[1]}
|
- rustup-init.exe -y --default-host %TARGET%
|
||||||
- if NOT "%CHANNEL%" == "stable" set RUST_VERSION=%CHANNEL%
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
||||||
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:TARGET}.exe"
|
- if defined MSYS2 set PATH=C:\msys64\mingw%BITS%\bin;%PATH%
|
||||||
- rust-%RUST_VERSION%-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
|
|
||||||
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
|
|
||||||
- if "%TARGET%" == "i686-pc-windows-gnu" set PATH=%PATH%;C:\msys64\mingw32\bin
|
|
||||||
- if "%TARGET%" == "x86_64-pc-windows-gnu" set PATH=%PATH%;C:\msys64\mingw64\bin
|
|
||||||
- rustc -V
|
- rustc -V
|
||||||
- cargo -V
|
- cargo -V
|
||||||
|
|
||||||
# ???
|
# Hack to work around a harmless warning in Appveyor builds?
|
||||||
build: false
|
build: false
|
||||||
|
|
||||||
# Equivalent to Travis' `script` phase
|
# Equivalent to Travis' `script` phase
|
||||||
# TODO modify this phase as you see fit
|
|
||||||
test_script:
|
test_script:
|
||||||
- cargo test --verbose
|
- cargo test --verbose --all --features pcre2
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
# Generate artifacts for release
|
# Generate artifacts for release
|
||||||
# TODO(burntsushi): How can we enable SSSE3 on Windows?
|
- cargo build --release --features pcre2
|
||||||
- cargo build --release
|
|
||||||
- mkdir staging
|
- mkdir staging
|
||||||
- copy target\release\xrep.exe staging
|
- copy target\release\rg.exe staging
|
||||||
|
- ps: copy target\release\build\ripgrep-*\out\_rg.ps1 staging
|
||||||
- cd staging
|
- cd staging
|
||||||
# release zipfile will look like 'rust-everywhere-v1.2.3-x86_64-pc-windows-msvc'
|
# release zipfile will look like 'ripgrep-1.2.3-x86_64-pc-windows-msvc'
|
||||||
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
|
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
|
||||||
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
|
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
description: 'Windows release'
|
description: 'Automatically deployed release'
|
||||||
# All the zipped artifacts will be deployed
|
# All the zipped artifacts will be deployed
|
||||||
artifact: /.*\.zip/
|
artifact: /.*\.zip/
|
||||||
auth_token:
|
auth_token:
|
||||||
@@ -54,15 +72,10 @@ deploy:
|
|||||||
provider: GitHub
|
provider: GitHub
|
||||||
# deploy when a new tag is pushed and only on the stable channel
|
# deploy when a new tag is pushed and only on the stable channel
|
||||||
on:
|
on:
|
||||||
# channel to use to produce the release artifacts
|
CHANNEL: stable
|
||||||
# NOTE make sure you only release *once* per target
|
|
||||||
# TODO you may want to pick a different channel
|
|
||||||
CHANNEL: nightly
|
|
||||||
appveyor_repo_tag: true
|
appveyor_repo_tag: true
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- appveyor
|
- /^\d+\.\d+\.\d+$/
|
||||||
- /\d+\.\d+\.\d+/
|
|
||||||
except:
|
|
||||||
- master
|
- master
|
||||||
|
|||||||
1323
benchsuite/benchsuite
Executable file
1323
benchsuite/benchsuite
Executable file
File diff suppressed because it is too large
Load Diff
93
benchsuite/runs/2016-09-17-ubuntu1604-ec2/README.SETUP
Normal file
93
benchsuite/runs/2016-09-17-ubuntu1604-ec2/README.SETUP
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
Ubuntu 16.04 HVM AMI
|
||||||
|
c3.2xlarge, Xeon E5-2680, 2.8 GHz, 8 CPUs, 16 GB memory, 80 GB SSD
|
||||||
|
|
||||||
|
# Generic system setup
|
||||||
|
|
||||||
|
mkfs.ext4 /dev/xvdb
|
||||||
|
sudo mount /dev/xvdb /mnt
|
||||||
|
sudo chown ubuntu /mnt
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install \ # for building Linux kernel
|
||||||
|
make gcc bc
|
||||||
|
sudo apt-get install \ # for the silver searcher
|
||||||
|
automake pkg-config zlib1g-dev liblzma-dev libpcre3 libpcre3-dev
|
||||||
|
sudo apt-get install \ # for Universal Code Grep
|
||||||
|
libtool libpcre2-8-0 libpcre2-dev
|
||||||
|
sudo apt-get install \ # for sift and the platinum searcher
|
||||||
|
go
|
||||||
|
|
||||||
|
# Get benchmark corpora
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
mkdir /mnt/bench
|
||||||
|
git clone git://github.com/BurntSushi/ripgrep
|
||||||
|
cd ripgrep/benchsuite
|
||||||
|
./benchsuite --dir /mnt/bench/ --download all # takes around 15 minutes
|
||||||
|
|
||||||
|
# Install search tools
|
||||||
|
mkdir /mnt/bin/
|
||||||
|
|
||||||
|
## ripgrep
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
mkdir ripgrep-bin
|
||||||
|
cd ripgrep-bin
|
||||||
|
curl -LO 'https://github.com/BurntSushi/ripgrep/releases/download/0.1.2/ripgrep-0.1.2-x86_64-unknown-linux-musl.tar.gz'
|
||||||
|
cp ripgrep-0.1.2-x86_64-unknown-linux-musl/rg /mnt/bin/
|
||||||
|
|
||||||
|
## The Silver Searcher
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
git clone git://github.com/ggreer/the_silver_searcher
|
||||||
|
cd the_silver_searcher
|
||||||
|
git checkout cda635
|
||||||
|
./build.sh
|
||||||
|
cp ag /mnt/bin/
|
||||||
|
|
||||||
|
## Universal Code Grep
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
git clone git://github.com/gvansickle/ucg
|
||||||
|
cd ucg
|
||||||
|
git checkout 487bfb
|
||||||
|
autoreconf -i
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
cp ucg /mnt/bin/
|
||||||
|
|
||||||
|
## The Platinum Searcher
|
||||||
|
|
||||||
|
export GOPATH=/mnt/go
|
||||||
|
go get github.com/monochromegane/the_platinum_searcher
|
||||||
|
cd /mnt/go/src/github.com/monochromegane/the_platinum_searcher
|
||||||
|
git checkout 509368
|
||||||
|
go install github.com/monochromegane/the_platinum_searcher/cmd/...
|
||||||
|
cp /mnt/go/bin/pt /mnt/bin/
|
||||||
|
|
||||||
|
## Sift
|
||||||
|
|
||||||
|
export GOPATH=/mnt/go
|
||||||
|
go get github.com/svent/sift
|
||||||
|
cd /mnt/go/src/github.com/svent/sift
|
||||||
|
git checkout 2d175c
|
||||||
|
go install
|
||||||
|
cp /mnt/go/bin/sift /mnt/bin/
|
||||||
|
|
||||||
|
## 'git grep' and GNU grep
|
||||||
|
|
||||||
|
They are part of the standard Ubuntu install, and are pretty recent (as of
|
||||||
|
September 2016).
|
||||||
|
|
||||||
|
$ git --version
|
||||||
|
git version 2.7.4
|
||||||
|
$ grep --version
|
||||||
|
grep (GNU grep) 2.25
|
||||||
|
|
||||||
|
|
||||||
|
# Running benchmarks
|
||||||
|
|
||||||
|
export PATH="/mnt/bin:$PATH"
|
||||||
|
cd /mnt/ripgrep/benchsuite
|
||||||
|
./benchsuite --dir /mnt/bench/ --raw /mnt/bench/raw.csv \
|
||||||
|
| tee /mnt/bench/summary
|
||||||
|
# The above took around 30 minutes to run to completion.
|
||||||
457
benchsuite/runs/2016-09-17-ubuntu1604-ec2/raw.csv
Normal file
457
benchsuite/runs/2016-09-17-ubuntu1604-ec2/raw.csv
Normal file
@@ -0,0 +1,457 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.30042552947998047,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.3699159622192383,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2950403690338135,68,
|
||||||
|
linux_alternates,1,3,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.7572166919708252,68,
|
||||||
|
linux_alternates,1,3,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.7568728923797607,68,
|
||||||
|
linux_alternates,1,3,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.7468714714050293,68,
|
||||||
|
linux_alternates,1,3,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5062770843505859,68,LC_ALL=C
|
||||||
|
linux_alternates,1,3,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.49932026863098145,68,LC_ALL=C
|
||||||
|
linux_alternates,1,3,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5008277893066406,68,LC_ALL=C
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.19775605201721191,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.19699668884277344,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.19636178016662598,68,
|
||||||
|
linux_alternates,1,3,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.21344256401062012,68,
|
||||||
|
linux_alternates,1,3,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.21743154525756836,68,
|
||||||
|
linux_alternates,1,3,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.22065043449401855,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.31632304191589355,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.3168807029724121,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.4834277629852295,160,
|
||||||
|
linux_alternates_casei,1,3,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.9558978080749512,160,
|
||||||
|
linux_alternates_casei,1,3,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.9736671447753906,160,
|
||||||
|
linux_alternates_casei,1,3,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.9648356437683105,160,
|
||||||
|
linux_alternates_casei,1,3,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,2.0229439735412598,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,3,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,2.0214922428131104,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,3,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,2.022616147994995,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.22146987915039062,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.22275280952453613,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.22226715087890625,160,
|
||||||
|
linux_alternates_casei,1,3,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5290391445159912,160,
|
||||||
|
linux_alternates_casei,1,3,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5196049213409424,160,
|
||||||
|
linux_alternates_casei,1,3,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5219125747680664,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.2871882915496826,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.38920140266418457,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.3668382167816162,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,1.6073203086853027,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,1.6012177467346191,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,1.5818352699279785,16,
|
||||||
|
linux_literal,1,3,ag (ignore) (mmap),ag -s PM_RESUME,1.592775583267212,16,
|
||||||
|
linux_literal,1,3,ag (ignore) (mmap),ag -s PM_RESUME,1.5901448726654053,16,
|
||||||
|
linux_literal,1,3,ag (ignore) (mmap),ag -s PM_RESUME,1.586061716079712,16,
|
||||||
|
linux_literal,1,3,pt (ignore),pt PM_RESUME,0.45094990730285645,16,
|
||||||
|
linux_literal,1,3,pt (ignore),pt PM_RESUME,0.47065186500549316,16,
|
||||||
|
linux_literal,1,3,pt (ignore),pt PM_RESUME,0.4422800540924072,16,
|
||||||
|
linux_literal,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.6293809413909912,16,
|
||||||
|
linux_literal,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.6314799785614014,16,
|
||||||
|
linux_literal,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.6289358139038086,16,
|
||||||
|
linux_literal,1,3,git grep (ignore),git grep -I -n PM_RESUME,0.347550630569458,16,LC_ALL=C
|
||||||
|
linux_literal,1,3,git grep (ignore),git grep -I -n PM_RESUME,0.345928430557251,16,LC_ALL=C
|
||||||
|
linux_literal,1,3,git grep (ignore),git grep -I -n PM_RESUME,0.33939385414123535,16,LC_ALL=C
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.20830345153808594,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.34220385551452637,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.2077772617340088,16,
|
||||||
|
linux_literal,1,3,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.21996808052062988,16,
|
||||||
|
linux_literal,1,3,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.22822093963623047,16,
|
||||||
|
linux_literal,1,3,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.21923017501831055,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.2988588809967041,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.5339267253875732,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.43750762939453125,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,1.603757381439209,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,1.618077278137207,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,1.6234121322631836,370,
|
||||||
|
linux_literal_casei,1,3,ag (ignore) (mmap),ag -i PM_RESUME,1.621368646621704,370,
|
||||||
|
linux_literal_casei,1,3,ag (ignore) (mmap),ag -i PM_RESUME,1.5698626041412354,370,
|
||||||
|
linux_literal_casei,1,3,ag (ignore) (mmap),ag -i PM_RESUME,1.6105949878692627,370,
|
||||||
|
linux_literal_casei,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.8005843162536621,370,
|
||||||
|
linux_literal_casei,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.8044955730438232,370,
|
||||||
|
linux_literal_casei,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.806922197341919,370,
|
||||||
|
linux_literal_casei,1,3,git grep (ignore),git grep -I -n -i PM_RESUME,0.34161829948425293,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,3,git grep (ignore),git grep -I -n -i PM_RESUME,0.3455958366394043,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,3,git grep (ignore),git grep -I -n -i PM_RESUME,0.3493361473083496,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.2149522304534912,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.21602368354797363,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.27021098136901855,370,
|
||||||
|
linux_literal_casei,1,3,ucg (whitelist),ucg -i PM_RESUME,0.22747421264648438,370,
|
||||||
|
linux_literal_casei,1,3,ucg (whitelist),ucg -i PM_RESUME,0.22050881385803223,370,
|
||||||
|
linux_literal_casei,1,3,ucg (whitelist),ucg -i PM_RESUME,0.21217584609985352,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.27482175827026367,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.2796294689178467,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.27638936042785645,16,
|
||||||
|
linux_literal_default,1,3,ag,ag PM_RESUME,1.598384141921997,16,
|
||||||
|
linux_literal_default,1,3,ag,ag PM_RESUME,1.5849597454071045,16,
|
||||||
|
linux_literal_default,1,3,ag,ag PM_RESUME,1.6000149250030518,16,
|
||||||
|
linux_literal_default,1,3,ucg,ucg PM_RESUME,0.2263963222503662,16,
|
||||||
|
linux_literal_default,1,3,ucg,ucg PM_RESUME,0.21367835998535156,16,
|
||||||
|
linux_literal_default,1,3,ucg,ucg PM_RESUME,0.21764111518859863,16,
|
||||||
|
linux_literal_default,1,3,pt,pt PM_RESUME,0.42263340950012207,16,
|
||||||
|
linux_literal_default,1,3,pt,pt PM_RESUME,0.467041015625,16,
|
||||||
|
linux_literal_default,1,3,pt,pt PM_RESUME,0.42820048332214355,16,
|
||||||
|
linux_literal_default,1,3,sift,sift PM_RESUME,0.33421826362609863,16,
|
||||||
|
linux_literal_default,1,3,sift,sift PM_RESUME,0.35932135581970215,16,
|
||||||
|
linux_literal_default,1,3,sift,sift PM_RESUME,0.3372631072998047,16,
|
||||||
|
linux_literal_default,1,3,git grep,git grep PM_RESUME,0.348984956741333,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,3,git grep,git grep PM_RESUME,0.34420299530029297,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,3,git grep,git grep PM_RESUME,0.33880615234375,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.5833027362823486,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.5783836841583252,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.5806806087493896,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.4163496494293213,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.4040029048919678,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.40265560150146484,490,
|
||||||
|
linux_no_literal,1,3,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},2.3176910877227783,766,
|
||||||
|
linux_no_literal,1,3,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},2.3504347801208496,766,
|
||||||
|
linux_no_literal,1,3,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},2.317542552947998,766,
|
||||||
|
linux_no_literal,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},25.821982383728027,491,
|
||||||
|
linux_no_literal,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},25.82067561149597,491,
|
||||||
|
linux_no_literal,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},25.626302242279053,491,
|
||||||
|
linux_no_literal,1,3,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},26.349210023880005,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},26.34226369857788,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},26.340656995773315,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},4.14680290222168,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,3,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},4.153340578079224,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,3,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},4.154819011688232,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.49768829345703125,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.5121400356292725,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.49718427658081055,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.38550543785095215,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.32651591300964355,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3246915340423584,419,
|
||||||
|
linux_no_literal,1,3,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.128183126449585,416,
|
||||||
|
linux_no_literal,1,3,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.1255216598510742,416,
|
||||||
|
linux_no_literal,1,3,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.1268525123596191,416,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.36306214332580566,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.45077037811279297,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.3804624080657959,1652,
|
||||||
|
linux_re_literal_suffix,1,3,ag (ignore),ag -s [A-Z]+_RESUME,1.8995850086212158,1652,
|
||||||
|
linux_re_literal_suffix,1,3,ag (ignore),ag -s [A-Z]+_RESUME,1.8897662162780762,1652,
|
||||||
|
linux_re_literal_suffix,1,3,ag (ignore),ag -s [A-Z]+_RESUME,1.878380537033081,1652,
|
||||||
|
linux_re_literal_suffix,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,10.48949646949768,1652,
|
||||||
|
linux_re_literal_suffix,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,10.289165735244751,1652,
|
||||||
|
linux_re_literal_suffix,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,10.000468254089355,1652,
|
||||||
|
linux_re_literal_suffix,1,3,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,1.1080453395843506,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,3,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,1.10821533203125,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,3,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,1.105595588684082,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.2073357105255127,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.20552492141723633,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.2061319351196289,1630,
|
||||||
|
linux_re_literal_suffix,1,3,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.3013310432434082,1630,
|
||||||
|
linux_re_literal_suffix,1,3,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.3005218505859375,1630,
|
||||||
|
linux_re_literal_suffix,1,3,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.29984378814697266,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.4162716865539551,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.47885966300964355,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.5135962963104248,23,
|
||||||
|
linux_unicode_greek,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},7.570494651794434,23,
|
||||||
|
linux_unicode_greek,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},7.790151596069336,23,
|
||||||
|
linux_unicode_greek,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},7.783358812332153,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.4370443820953369,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.40680766105651855,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.4011569023132324,103,
|
||||||
|
linux_unicode_greek_casei,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.002422809600830078,,
|
||||||
|
linux_unicode_greek_casei,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.002414226531982422,,
|
||||||
|
linux_unicode_greek_casei,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.002293109893798828,,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.44771265983581543,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.3006107807159424,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.3026111125946045,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.43827080726623535,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.2931697368621826,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.33072638511657715,174,
|
||||||
|
linux_unicode_word,1,3,ag (ignore) (ASCII),ag -s \wAh,1.7645132541656494,174,
|
||||||
|
linux_unicode_word,1,3,ag (ignore) (ASCII),ag -s \wAh,1.7730333805084229,174,
|
||||||
|
linux_unicode_word,1,3,ag (ignore) (ASCII),ag -s \wAh,1.773383378982544,174,
|
||||||
|
linux_unicode_word,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n \wAh,10.872124671936035,174,
|
||||||
|
linux_unicode_word,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n \wAh,11.147738456726074,174,
|
||||||
|
linux_unicode_word,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n \wAh,11.029243469238281,174,
|
||||||
|
linux_unicode_word,1,3,git grep (ignore),git grep -E -I -n \wAh,13.047154664993286,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,3,git grep (ignore),git grep -E -I -n \wAh,13.025037288665771,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,3,git grep (ignore),git grep -E -I -n \wAh,13.081012487411499,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,3,git grep (ignore) (ASCII),git grep -E -I -n \wAh,2.98722767829895,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,3,git grep (ignore) (ASCII),git grep -E -I -n \wAh,2.987990379333496,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,3,git grep (ignore) (ASCII),git grep -E -I -n \wAh,2.988698959350586,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.21961355209350586,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.2884254455566406,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.21905040740966797,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.23966765403747559,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.21801042556762695,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.21909880638122559,168,
|
||||||
|
linux_unicode_word,1,3,ucg (ASCII),ucg --nosmart-case \wAh,0.2259504795074463,168,
|
||||||
|
linux_unicode_word,1,3,ucg (ASCII),ucg --nosmart-case \wAh,0.22269177436828613,168,
|
||||||
|
linux_unicode_word,1,3,ucg (ASCII),ucg --nosmart-case \wAh,0.2259974479675293,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.34968090057373047,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.28850769996643066,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.34809160232543945,6,
|
||||||
|
linux_word,1,3,ag (ignore),ag -s -w PM_RESUME,1.6134660243988037,6,
|
||||||
|
linux_word,1,3,ag (ignore),ag -s -w PM_RESUME,1.59847092628479,6,
|
||||||
|
linux_word,1,3,ag (ignore),ag -s -w PM_RESUME,1.581369161605835,6,
|
||||||
|
linux_word,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,7.644887208938599,6,
|
||||||
|
linux_word,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,7.8782219886779785,6,
|
||||||
|
linux_word,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,7.754150152206421,6,
|
||||||
|
linux_word,1,3,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.34302353858947754,6,LC_ALL=C
|
||||||
|
linux_word,1,3,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.33672142028808594,6,LC_ALL=C
|
||||||
|
linux_word,1,3,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.35193610191345215,6,LC_ALL=C
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.33329272270202637,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.25751829147338867,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.21761608123779297,6,
|
||||||
|
linux_word,1,3,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.22014284133911133,6,
|
||||||
|
linux_word,1,3,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.22314929962158203,6,
|
||||||
|
linux_word,1,3,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.2202434539794922,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.622809886932373,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6181182861328125,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6205663681030273,848,
|
||||||
|
subtitles_en_alternate,1,3,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.7565691471099854,848,
|
||||||
|
subtitles_en_alternate,1,3,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.7561769485473633,848,
|
||||||
|
subtitles_en_alternate,1,3,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.7559969425201416,848,
|
||||||
|
subtitles_en_alternate,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.4493463039398193,848,
|
||||||
|
subtitles_en_alternate,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.44877028465271,848,
|
||||||
|
subtitles_en_alternate,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.4433801174163818,848,
|
||||||
|
subtitles_en_alternate,1,3,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4114174842834473,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.411625862121582,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.408623456954956,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.2900726795196533,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.2905848026275635,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.2903940677642822,848,
|
||||||
|
subtitles_en_alternate,1,3,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.9546515941619873,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.955279588699341,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.954089403152466,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,5.169135332107544,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,5.174601078033447,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,5.1684675216674805,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4171736240386963,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4158167839050293,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4186513423919678,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.531639575958252,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.526550054550171,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.528509140014648,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.722398281097412,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7225935459136963,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7222185134887695,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,5.12151837348938,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,3,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,5.119963884353638,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,3,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,5.121079683303833,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.2684764862060547,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.26811957359313965,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.2684173583984375,629,
|
||||||
|
subtitles_en_literal,1,3,pt,pt -N Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.435128688812256,629,
|
||||||
|
subtitles_en_literal,1,3,pt,pt -N Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4362881183624268,629,
|
||||||
|
subtitles_en_literal,1,3,pt,pt -N Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4399220943450928,629,
|
||||||
|
subtitles_en_literal,1,3,sift,sift Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.32662391662597656,629,
|
||||||
|
subtitles_en_literal,1,3,sift,sift Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.3277275562286377,629,
|
||||||
|
subtitles_en_literal,1,3,sift,sift Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.32798290252685547,629,
|
||||||
|
subtitles_en_literal,1,3,grep,grep -a Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.520500659942627,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep,grep -a Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5191032886505127,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep,grep -a Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5171597003936768,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.595801830291748,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5954360961914062,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5945618152618408,629,
|
||||||
|
subtitles_en_literal,1,3,ag (lines),ag -s Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7291676998138428,629,
|
||||||
|
subtitles_en_literal,1,3,ag (lines),ag -s Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.730966329574585,629,
|
||||||
|
subtitles_en_literal,1,3,ag (lines),ag -s Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.728854179382324,629,
|
||||||
|
subtitles_en_literal,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.775996208190918,629,
|
||||||
|
subtitles_en_literal,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.7760195732116699,629,
|
||||||
|
subtitles_en_literal,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.7763564586639404,629,
|
||||||
|
subtitles_en_literal,1,3,pt (lines),pt Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.433366060256958,629,
|
||||||
|
subtitles_en_literal,1,3,pt (lines),pt Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.4338581562042236,629,
|
||||||
|
subtitles_en_literal,1,3,pt (lines),pt Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,3.435924768447876,629,
|
||||||
|
subtitles_en_literal,1,3,sift (lines),sift -n Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.7586827278137207,629,
|
||||||
|
subtitles_en_literal,1,3,sift (lines),sift -n Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.7590317726135254,629,
|
||||||
|
subtitles_en_literal,1,3,sift (lines),sift -n Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.754432201385498,629,
|
||||||
|
subtitles_en_literal,1,3,grep (lines),grep -an Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9726488590240479,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep (lines),grep -an Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9699857234954834,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep (lines),grep -an Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9714112281799316,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.36658453941345215,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.3654778003692627,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.36565113067626953,642,
|
||||||
|
subtitles_en_literal_casei,1,3,grep,grep -ai Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.0890116691589355,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,3,grep,grep -ai Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.08124852180481,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,3,grep,grep -ai Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.0796849727630615,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,3,grep (ASCII),grep -E -ai Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6151647567749023,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,grep (ASCII),grep -E -ai Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6141552925109863,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,grep (ASCII),grep -E -ai Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6132988929748535,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6962459087371826,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6945579051971436,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.693866491317749,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ag (lines) (ASCII),ag -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.771639823913574,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ag (lines) (ASCII),ag -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.772296190261841,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ag (lines) (ASCII),ag -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7712018489837646,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.8068230152130127,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.80411696434021,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.8038516044616699,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5951778888702393,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5971941947937012,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5952184200286865,629,
|
||||||
|
subtitles_en_literal_word,1,3,ag (ASCII),ag -sw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7292284965515137,629,
|
||||||
|
subtitles_en_literal_word,1,3,ag (ASCII),ag -sw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.728681802749634,629,
|
||||||
|
subtitles_en_literal_word,1,3,ag (ASCII),ag -sw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7315311431884766,629,
|
||||||
|
subtitles_en_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.784024715423584,629,
|
||||||
|
subtitles_en_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.780540943145752,629,
|
||||||
|
subtitles_en_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.7772648334503174,629,
|
||||||
|
subtitles_en_literal_word,1,3,grep (ASCII),grep -anw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9744353294372559,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,3,grep (ASCII),grep -anw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9781327247619629,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,3,grep (ASCII),grep -anw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9798097610473633,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5965189933776855,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5960156917572021,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.5975723266601562,629,
|
||||||
|
subtitles_en_literal_word,1,3,grep,grep -anw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9818971157073975,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,3,grep,grep -anw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.9785251617431641,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,3,grep,grep -anw Sherlock Holmes /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.977081298828125,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.7750890254974365,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.774017333984375,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.783200740814209,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.5396409034729004,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.5404820442199707,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,2.5400590896606445,13,
|
||||||
|
subtitles_en_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,10.072888612747192,48,
|
||||||
|
subtitles_en_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,10.075153350830078,48,
|
||||||
|
subtitles_en_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,10.0713791847229,48,
|
||||||
|
subtitles_en_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,7.734791278839111,13,
|
||||||
|
subtitles_en_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,7.7345263957977295,13,
|
||||||
|
subtitles_en_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,7.73199462890625,13,
|
||||||
|
subtitles_en_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.411367416381836,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.41072940826416,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.414730072021484,13,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6052529811859131,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6049232482910156,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6045565605163574,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,grep,grep -E -an \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.2849924564361572,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,3,grep,grep -E -an \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.2837722301483154,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,3,grep,grep -E -an \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.2847650051116943,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6005992889404297,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.600543737411499,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,0.6009273529052734,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,11.664374113082886,323,
|
||||||
|
subtitles_en_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,11.674306869506836,323,
|
||||||
|
subtitles_en_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,11.657484769821167,323,
|
||||||
|
subtitles_en_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.650290012359619,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.651855707168579,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,4.649921417236328,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.2745037078857422,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.275665521621704,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.sample.en,1.273988962173462,317,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.9031155109405518,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.9021081924438477,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.9028818607330322,691,
|
||||||
|
subtitles_ru_alternate,1,3,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,5.8895978927612305,691,
|
||||||
|
subtitles_ru_alternate,1,3,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,5.891357660293579,691,
|
||||||
|
subtitles_ru_alternate,1,3,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,5.892467975616455,691,
|
||||||
|
subtitles_ru_alternate,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.7517757415771484,691,
|
||||||
|
subtitles_ru_alternate,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.7550888061523438,691,
|
||||||
|
subtitles_ru_alternate,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.7555651664733887,691,
|
||||||
|
subtitles_ru_alternate,1,3,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.51417875289917,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.512972116470337,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.507266521453857,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.300950288772583,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.2987852096557617,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.3024635314941406,691,
|
||||||
|
subtitles_ru_alternate,1,3,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,7.983739137649536,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,7.988446950912476,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,7.979671478271484,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,5.889382362365723,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,5.902577877044678,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,5.890571355819702,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.7548162937164307,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.747791051864624,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.7396674156188965,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.58053183555603,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.594751596450806,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.561670541763306,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.833597183227539,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.831137180328369,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.830361843109131,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.723876953125,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.723239183425903,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.722000360488892,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.3252851963043213,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.3270294666290283,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.32680773735046387,583,
|
||||||
|
subtitles_ru_literal,1,3,pt,pt -N Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,12.932488679885864,583,
|
||||||
|
subtitles_ru_literal,1,3,pt,pt -N Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,12.91330337524414,583,
|
||||||
|
subtitles_ru_literal,1,3,pt,pt -N Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,12.911381006240845,583,
|
||||||
|
subtitles_ru_literal,1,3,sift,sift Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,16.438587427139282,583,
|
||||||
|
subtitles_ru_literal,1,3,sift,sift Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,16.412389755249023,583,
|
||||||
|
subtitles_ru_literal,1,3,sift,sift Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,16.412444353103638,583,
|
||||||
|
subtitles_ru_literal,1,3,grep,grep -a Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7865939140319824,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep,grep -a Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7889957427978516,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep,grep -a Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7923679351806641,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9255633354187012,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9285938739776611,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9274048805236816,583,
|
||||||
|
subtitles_ru_literal,1,3,ag (lines),ag -s Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.4811036586761475,583,
|
||||||
|
subtitles_ru_literal,1,3,ag (lines),ag -s Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.4785168170928955,583,
|
||||||
|
subtitles_ru_literal,1,3,ag (lines),ag -s Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.484618186950684,583,
|
||||||
|
subtitles_ru_literal,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7743628025054932,583,
|
||||||
|
subtitles_ru_literal,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7731456756591797,583,
|
||||||
|
subtitles_ru_literal,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7749128341674805,583,
|
||||||
|
subtitles_ru_literal,1,3,pt (lines),pt Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,12.931540250778198,583,
|
||||||
|
subtitles_ru_literal,1,3,pt (lines),pt Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,12.935162782669067,583,
|
||||||
|
subtitles_ru_literal,1,3,pt (lines),pt Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,12.949711561203003,583,
|
||||||
|
subtitles_ru_literal,1,3,sift (lines),sift -n Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,17.183809995651245,583,
|
||||||
|
subtitles_ru_literal,1,3,sift (lines),sift -n Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,17.19060492515564,583,
|
||||||
|
subtitles_ru_literal,1,3,sift (lines),sift -n Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,17.17626404762268,583,
|
||||||
|
subtitles_ru_literal,1,3,grep (lines),grep -an Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.3023960590362549,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep (lines),grep -an Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.2992589473724365,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep (lines),grep -an Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.299330711364746,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.1320264339447021,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.1323668956756592,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.1354515552520752,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,grep,grep -ai Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.194744348526001,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,3,grep,grep -ai Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.190656423568726,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,3,grep,grep -ai Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,8.18506383895874,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,3,grep (ASCII),grep -E -ai Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7826528549194336,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,grep (ASCII),grep -E -ai Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7846219539642334,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,grep (ASCII),grep -E -ai Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7846999168395996,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.734788179397583,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7333040237426758,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.731860637664795,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,ag (lines) (ASCII),ag -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7297205924987793,,
|
||||||
|
subtitles_ru_literal_casei,1,3,ag (lines) (ASCII),ag -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7314808368682861,,
|
||||||
|
subtitles_ru_literal_casei,1,3,ag (lines) (ASCII),ag -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7289514541625977,,
|
||||||
|
subtitles_ru_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7773914337158203,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.774536371231079,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7740859985351562,583,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.3252553939819336,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.32543301582336426,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.32512736320495605,,
|
||||||
|
subtitles_ru_literal_word,1,3,ag (ASCII),ag -sw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7519562244415283,,
|
||||||
|
subtitles_ru_literal_word,1,3,ag (ASCII),ag -sw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.752692699432373,,
|
||||||
|
subtitles_ru_literal_word,1,3,ag (ASCII),ag -sw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.7524521350860596,,
|
||||||
|
subtitles_ru_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7868170738220215,583,
|
||||||
|
subtitles_ru_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.7786612510681152,583,
|
||||||
|
subtitles_ru_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.776214838027954,583,
|
||||||
|
subtitles_ru_literal_word,1,3,grep (ASCII),grep -anw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.303652286529541,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,3,grep (ASCII),grep -anw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.3012151718139648,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,3,grep (ASCII),grep -anw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.307457685470581,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9280951023101807,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9285900592803955,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9288535118103027,579,
|
||||||
|
subtitles_ru_literal_word,1,3,grep,grep -anw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.3026466369628906,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,3,grep,grep -anw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.3016819953918457,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,3,grep,grep -anw Шерлок Холмс /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.3006587028503418,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.895586729049683,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.914353132247925,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,4.902980327606201,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,3.972637891769409,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,3.9723849296569824,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,3.9723057746887207,,
|
||||||
|
subtitles_ru_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.3936586380004883,,
|
||||||
|
subtitles_ru_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.3987748622894287,,
|
||||||
|
subtitles_ru_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.393911361694336,,
|
||||||
|
subtitles_ru_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.8932065963745117,,
|
||||||
|
subtitles_ru_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.8977222442626953,,
|
||||||
|
subtitles_ru_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.893040895462036,,
|
||||||
|
subtitles_ru_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.4844722747802734,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.485093116760254,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.482459306716919,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9564735889434814,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9561436176300049,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,0.9558789730072021,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep,grep -E -an \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.6620113849639893,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep,grep -E -an \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.6624438762664795,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep,grep -E -an \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.6610260009765625,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.4094629287719727,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.409822702407837,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.4094691276550293,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.866976261138916,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.8666067123413086,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,2.865297317504883,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.602109670639038,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.598329782485962,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /mnt/bench/subtitles/OpenSubtitles2016.raw.ru,1.5975282192230225,,LC_ALL=C
|
||||||
|
226
benchsuite/runs/2016-09-17-ubuntu1604-ec2/summary
Normal file
226
benchsuite/runs/2016-09-17-ubuntu1604-ec2/summary
Normal file
@@ -0,0 +1,226 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.322 +/- 0.042 (lines: 68)
|
||||||
|
ag (ignore) 1.754 +/- 0.006 (lines: 68)
|
||||||
|
git grep (ignore) 0.502 +/- 0.004 (lines: 68)
|
||||||
|
rg (whitelist)* 0.197 +/- 0.001 (lines: 68)*
|
||||||
|
ucg (whitelist) 0.217 +/- 0.004 (lines: 68)
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.372 +/- 0.096 (lines: 160)
|
||||||
|
ag (ignore) 1.965 +/- 0.009 (lines: 160)
|
||||||
|
git grep (ignore) 2.022 +/- 0.001 (lines: 160)
|
||||||
|
rg (whitelist)* 0.222 +/- 0.001 (lines: 160)*
|
||||||
|
ucg (whitelist) 0.524 +/- 0.005 (lines: 160)
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.348 +/- 0.054 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 1.597 +/- 0.013 (lines: 16)
|
||||||
|
ag (ignore) (mmap) 1.590 +/- 0.003 (lines: 16)
|
||||||
|
pt (ignore) 0.455 +/- 0.015 (lines: 16)
|
||||||
|
sift (ignore) 0.630 +/- 0.001 (lines: 16)
|
||||||
|
git grep (ignore) 0.344 +/- 0.004 (lines: 16)
|
||||||
|
rg (whitelist)* 0.253 +/- 0.077 (lines: 16)
|
||||||
|
ucg (whitelist) 0.222 +/- 0.005 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.423 +/- 0.118 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 1.615 +/- 0.010 (lines: 370)
|
||||||
|
ag (ignore) (mmap) 1.601 +/- 0.027 (lines: 370)
|
||||||
|
sift (ignore) 0.804 +/- 0.003 (lines: 370)
|
||||||
|
git grep (ignore) 0.346 +/- 0.004 (lines: 370)
|
||||||
|
rg (whitelist) 0.234 +/- 0.032 (lines: 370)
|
||||||
|
ucg (whitelist)* 0.220 +/- 0.008 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg 0.277 +/- 0.002 (lines: 16)
|
||||||
|
ag 1.594 +/- 0.008 (lines: 16)
|
||||||
|
ucg* 0.219 +/- 0.007 (lines: 16)*
|
||||||
|
pt 0.439 +/- 0.024 (lines: 16)
|
||||||
|
sift 0.344 +/- 0.014 (lines: 16)
|
||||||
|
git grep 0.344 +/- 0.005 (lines: 16)
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.581 +/- 0.002 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.408 +/- 0.008 (lines: 490)
|
||||||
|
ag (ignore) (ASCII) 2.329 +/- 0.019 (lines: 766)
|
||||||
|
sift (ignore) (ASCII) 25.756 +/- 0.113 (lines: 491)
|
||||||
|
git grep (ignore) 26.344 +/- 0.005 (lines: 490)
|
||||||
|
git grep (ignore) (ASCII) 4.152 +/- 0.004 (lines: 490)
|
||||||
|
rg (whitelist) 0.502 +/- 0.008 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.346 +/- 0.035 (lines: 419)*
|
||||||
|
ucg (whitelist) (ASCII) 1.127 +/- 0.001 (lines: 416)
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.398 +/- 0.046 (lines: 1652)
|
||||||
|
ag (ignore) 1.889 +/- 0.011 (lines: 1652)
|
||||||
|
sift (ignore) 10.260 +/- 0.246 (lines: 1652)
|
||||||
|
git grep (ignore) 1.107 +/- 0.001 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.206 +/- 0.001 (lines: 1630)*
|
||||||
|
ucg (whitelist) 0.301 +/- 0.001 (lines: 1630)
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.470 +/- 0.049 (lines: 23)*
|
||||||
|
sift 7.715 +/- 0.125 (lines: 23)
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg 0.415 +/- 0.019 (lines: 103)
|
||||||
|
sift* 0.002 +/- 0.000 (lines: 0)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.350 +/- 0.084 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.354 +/- 0.075 (lines: 174)
|
||||||
|
ag (ignore) (ASCII) 1.770 +/- 0.005 (lines: 174)
|
||||||
|
sift (ignore) (ASCII) 11.016 +/- 0.138 (lines: 174)
|
||||||
|
git grep (ignore) 13.051 +/- 0.028 (lines: 186)
|
||||||
|
git grep (ignore) (ASCII) 2.988 +/- 0.001 (lines: 174)
|
||||||
|
rg (whitelist) 0.242 +/- 0.040 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.226 +/- 0.012 (lines: 168)
|
||||||
|
ucg (ASCII) 0.225 +/- 0.002 (lines: 168)*
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.329 +/- 0.035 (lines: 6)
|
||||||
|
ag (ignore) 1.598 +/- 0.016 (lines: 6)
|
||||||
|
sift (ignore) 7.759 +/- 0.117 (lines: 6)
|
||||||
|
git grep (ignore) 0.344 +/- 0.008 (lines: 6)
|
||||||
|
rg (whitelist)* 0.269 +/- 0.059 (lines: 6)
|
||||||
|
ucg (whitelist) 0.221 +/- 0.002 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.620 +/- 0.002 (lines: 848)
|
||||||
|
ag (lines) 3.756 +/- 0.000 (lines: 848)
|
||||||
|
ucg (lines) 1.447 +/- 0.003 (lines: 848)
|
||||||
|
grep (lines) 3.411 +/- 0.002 (lines: 848)
|
||||||
|
rg* 0.290 +/- 0.000 (lines: 848)*
|
||||||
|
grep 2.955 +/- 0.001 (lines: 848)
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 5.171 +/- 0.003 (lines: 862)
|
||||||
|
ucg (ASCII) 3.417 +/- 0.001 (lines: 862)
|
||||||
|
grep (ASCII) 4.529 +/- 0.003 (lines: 862)
|
||||||
|
rg* 2.722 +/- 0.000 (lines: 862)*
|
||||||
|
grep 5.121 +/- 0.001 (lines: 862)
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.268 +/- 0.000 (lines: 629)*
|
||||||
|
pt 3.437 +/- 0.003 (lines: 629)
|
||||||
|
sift 0.327 +/- 0.001 (lines: 629)
|
||||||
|
grep 0.519 +/- 0.002 (lines: 629)
|
||||||
|
rg (lines) 0.595 +/- 0.001 (lines: 629)
|
||||||
|
ag (lines) 2.730 +/- 0.001 (lines: 629)
|
||||||
|
ucg (lines) 0.776 +/- 0.000 (lines: 629)
|
||||||
|
pt (lines) 3.434 +/- 0.001 (lines: 629)
|
||||||
|
sift (lines) 0.757 +/- 0.003 (lines: 629)
|
||||||
|
grep (lines) 0.971 +/- 0.001 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.366 +/- 0.001 (lines: 642)*
|
||||||
|
grep 4.083 +/- 0.005 (lines: 642)
|
||||||
|
grep (ASCII) 0.614 +/- 0.001 (lines: 642)
|
||||||
|
rg (lines) 0.695 +/- 0.001 (lines: 642)
|
||||||
|
ag (lines) (ASCII) 2.772 +/- 0.001 (lines: 642)
|
||||||
|
ucg (lines) (ASCII) 0.805 +/- 0.002 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII)* 0.596 +/- 0.001 (lines: 629)*
|
||||||
|
ag (ASCII) 2.730 +/- 0.002 (lines: 629)
|
||||||
|
ucg (ASCII) 0.781 +/- 0.003 (lines: 629)
|
||||||
|
grep (ASCII) 0.977 +/- 0.003 (lines: 629)
|
||||||
|
rg 0.597 +/- 0.001 (lines: 629)
|
||||||
|
grep 0.979 +/- 0.002 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.777 +/- 0.005 (lines: 13)
|
||||||
|
rg (ASCII)* 2.540 +/- 0.000 (lines: 13)*
|
||||||
|
ag (ASCII) 10.073 +/- 0.002 (lines: 48)
|
||||||
|
ucg (ASCII) 7.734 +/- 0.002 (lines: 13)
|
||||||
|
grep (ASCII) 4.412 +/- 0.002 (lines: 13)
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.605 +/- 0.000 (lines: 317)
|
||||||
|
grep 1.285 +/- 0.001 (lines: 317)
|
||||||
|
rg (ASCII)* 0.601 +/- 0.000 (lines: 317)*
|
||||||
|
ag (ASCII) 11.665 +/- 0.008 (lines: 323)
|
||||||
|
ucg (ASCII) 4.651 +/- 0.001 (lines: 317)
|
||||||
|
grep (ASCII) 1.275 +/- 0.001 (lines: 317)
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.903 +/- 0.001 (lines: 691)
|
||||||
|
ag (lines) 5.891 +/- 0.001 (lines: 691)
|
||||||
|
ucg (lines) 2.754 +/- 0.002 (lines: 691)
|
||||||
|
grep (lines) 8.511 +/- 0.004 (lines: 691)
|
||||||
|
rg* 1.301 +/- 0.002 (lines: 691)*
|
||||||
|
grep 7.984 +/- 0.004 (lines: 691)
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 5.894 +/- 0.007 (lines: 691)
|
||||||
|
ucg (ASCII)* 2.747 +/- 0.008 (lines: 691)*
|
||||||
|
grep (ASCII) 8.579 +/- 0.017 (lines: 691)
|
||||||
|
rg 4.832 +/- 0.002 (lines: 735)
|
||||||
|
grep 8.723 +/- 0.001 (lines: 735)
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.326 +/- 0.001 (lines: 583)*
|
||||||
|
pt 12.919 +/- 0.012 (lines: 583)
|
||||||
|
sift 16.421 +/- 0.015 (lines: 583)
|
||||||
|
grep 0.789 +/- 0.003 (lines: 583)
|
||||||
|
rg (lines) 0.927 +/- 0.002 (lines: 583)
|
||||||
|
ag (lines) 4.481 +/- 0.003 (lines: 583)
|
||||||
|
ucg (lines) 1.774 +/- 0.001 (lines: 583)
|
||||||
|
pt (lines) 12.939 +/- 0.010 (lines: 583)
|
||||||
|
sift (lines) 17.184 +/- 0.007 (lines: 583)
|
||||||
|
grep (lines) 1.300 +/- 0.002 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg 1.133 +/- 0.002 (lines: 604)
|
||||||
|
grep 8.190 +/- 0.005 (lines: 604)
|
||||||
|
grep (ASCII) 0.784 +/- 0.001 (lines: 583)
|
||||||
|
rg (lines) 1.733 +/- 0.001 (lines: 604)
|
||||||
|
ag (lines) (ASCII)* 0.730 +/- 0.001 (lines: 0)*
|
||||||
|
ucg (lines) (ASCII) 1.775 +/- 0.002 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.325 +/- 0.000 (lines: 0)*
|
||||||
|
ag (ASCII) 0.752 +/- 0.000 (lines: 0)
|
||||||
|
ucg (ASCII) 1.781 +/- 0.006 (lines: 583)
|
||||||
|
grep (ASCII) 1.304 +/- 0.003 (lines: 583)
|
||||||
|
rg 0.929 +/- 0.000 (lines: 579)
|
||||||
|
grep 1.302 +/- 0.001 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 4.904 +/- 0.009 (lines: 41)
|
||||||
|
rg (ASCII) 3.972 +/- 0.000 (lines: 0)
|
||||||
|
ag (ASCII)* 2.395 +/- 0.003 (lines: 0)*
|
||||||
|
ucg (ASCII) 2.895 +/- 0.003 (lines: 0)
|
||||||
|
grep (ASCII) 2.484 +/- 0.001 (lines: 0)
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.956 +/- 0.000 (lines: 278)*
|
||||||
|
grep 1.662 +/- 0.001 (lines: 278)
|
||||||
|
ag (ASCII) 2.410 +/- 0.000 (lines: 0)
|
||||||
|
ucg (ASCII) 2.866 +/- 0.001 (lines: 0)
|
||||||
|
grep (ASCII) 1.599 +/- 0.002 (lines: 0)
|
||||||
93
benchsuite/runs/2016-09-20-ubuntu1604-ec2/README.SETUP
Normal file
93
benchsuite/runs/2016-09-20-ubuntu1604-ec2/README.SETUP
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
Ubuntu 16.04 HVM AMI
|
||||||
|
c3.2xlarge, Xeon E5-2680, 2.8 GHz, 8 CPUs, 16 GB memory, 80 GB SSD
|
||||||
|
|
||||||
|
# Generic system setup
|
||||||
|
|
||||||
|
mkfs.ext4 /dev/xvdb
|
||||||
|
sudo mount /dev/xvdb /mnt
|
||||||
|
sudo chown ubuntu /mnt
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install \ # for building Linux kernel
|
||||||
|
make gcc bc
|
||||||
|
sudo apt-get install \ # for the silver searcher
|
||||||
|
automake pkg-config zlib1g-dev liblzma-dev libpcre3 libpcre3-dev
|
||||||
|
sudo apt-get install \ # for Universal Code Grep
|
||||||
|
libtool libpcre2-8-0 libpcre2-dev
|
||||||
|
sudo apt-get install \ # for sift and the platinum searcher
|
||||||
|
go
|
||||||
|
|
||||||
|
# Get benchmark corpora
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
mkdir /mnt/bench
|
||||||
|
git clone git://github.com/BurntSushi/ripgrep
|
||||||
|
cd ripgrep/benchsuite
|
||||||
|
./benchsuite --dir /mnt/bench/ --download all # takes around 15 minutes
|
||||||
|
|
||||||
|
# Install search tools
|
||||||
|
mkdir /mnt/bin/
|
||||||
|
|
||||||
|
## ripgrep
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
mkdir ripgrep-bin
|
||||||
|
cd ripgrep-bin
|
||||||
|
curl -LO 'https://github.com/BurntSushi/ripgrep/releases/download/0.1.2/ripgrep-0.1.2-x86_64-unknown-linux-musl.tar.gz'
|
||||||
|
cp ripgrep-0.1.2-x86_64-unknown-linux-musl/rg /mnt/bin/
|
||||||
|
|
||||||
|
## The Silver Searcher
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
git clone git://github.com/ggreer/the_silver_searcher
|
||||||
|
cd the_silver_searcher
|
||||||
|
git checkout cda635
|
||||||
|
./build.sh
|
||||||
|
cp ag /mnt/bin/
|
||||||
|
|
||||||
|
## Universal Code Grep
|
||||||
|
|
||||||
|
cd /mnt
|
||||||
|
git clone git://github.com/gvansickle/ucg
|
||||||
|
cd ucg
|
||||||
|
git checkout 487bfb
|
||||||
|
autoreconf -i
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
cp ucg /mnt/bin/
|
||||||
|
|
||||||
|
## The Platinum Searcher
|
||||||
|
|
||||||
|
export GOPATH=/mnt/go
|
||||||
|
go get github.com/monochromegane/the_platinum_searcher
|
||||||
|
cd /mnt/go/src/github.com/monochromegane/the_platinum_searcher
|
||||||
|
git checkout 509368
|
||||||
|
go install github.com/monochromegane/the_platinum_searcher/cmd/...
|
||||||
|
cp /mnt/go/bin/pt /mnt/bin/
|
||||||
|
|
||||||
|
## Sift
|
||||||
|
|
||||||
|
export GOPATH=/mnt/go
|
||||||
|
go get github.com/svent/sift
|
||||||
|
cd /mnt/go/src/github.com/svent/sift
|
||||||
|
git checkout 2d175c
|
||||||
|
go install
|
||||||
|
cp /mnt/go/bin/sift /mnt/bin/
|
||||||
|
|
||||||
|
## 'git grep' and GNU grep
|
||||||
|
|
||||||
|
They are part of the standard Ubuntu install, and are pretty recent (as of
|
||||||
|
September 2016).
|
||||||
|
|
||||||
|
$ git --version
|
||||||
|
git version 2.7.4
|
||||||
|
$ grep --version
|
||||||
|
grep (GNU grep) 2.25
|
||||||
|
|
||||||
|
|
||||||
|
# Running benchmarks
|
||||||
|
|
||||||
|
export PATH="/mnt/bin:$PATH"
|
||||||
|
cd /mnt/ripgrep/benchsuite
|
||||||
|
./benchsuite \
|
||||||
|
--dir /mnt/bench/ --raw /mnt/bench/raw.csv --warmup-iter 3 --bench-iter 10
|
||||||
|
# The above took around 120 minutes to run to completion.
|
||||||
1611
benchsuite/runs/2016-09-20-ubuntu1604-ec2/raw.csv
Normal file
1611
benchsuite/runs/2016-09-20-ubuntu1604-ec2/raw.csv
Normal file
File diff suppressed because it is too large
Load Diff
235
benchsuite/runs/2016-09-20-ubuntu1604-ec2/summary
Normal file
235
benchsuite/runs/2016-09-20-ubuntu1604-ec2/summary
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.351 +/- 0.074 (lines: 68)
|
||||||
|
ag (ignore) 1.747 +/- 0.005 (lines: 68)
|
||||||
|
git grep (ignore) 0.501 +/- 0.003 (lines: 68)
|
||||||
|
rg (whitelist)* 0.216 +/- 0.031 (lines: 68)
|
||||||
|
ucg (whitelist) 0.214 +/- 0.008 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.391 +/- 0.078 (lines: 160)
|
||||||
|
ag (ignore) 1.968 +/- 0.009 (lines: 160)
|
||||||
|
git grep (ignore) 2.018 +/- 0.006 (lines: 160)
|
||||||
|
rg (whitelist)* 0.222 +/- 0.001 (lines: 160)*
|
||||||
|
ucg (whitelist) 0.522 +/- 0.002 (lines: 160)
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.334 +/- 0.053 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 1.611 +/- 0.009 (lines: 16)
|
||||||
|
ag (ignore) (mmap) 1.588 +/- 0.011 (lines: 16)
|
||||||
|
pt (ignore) 0.456 +/- 0.025 (lines: 16)
|
||||||
|
sift (ignore) 0.630 +/- 0.004 (lines: 16)
|
||||||
|
git grep (ignore) 0.345 +/- 0.007 (lines: 16)
|
||||||
|
rg (whitelist)* 0.228 +/- 0.042 (lines: 16)
|
||||||
|
ucg (whitelist) 0.218 +/- 0.007 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.345 +/- 0.073 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 1.612 +/- 0.011 (lines: 370)
|
||||||
|
ag (ignore) (mmap) 1.609 +/- 0.015 (lines: 370)
|
||||||
|
pt (ignore) 17.204 +/- 0.126 (lines: 370)
|
||||||
|
sift (ignore) 0.805 +/- 0.005 (lines: 370)
|
||||||
|
git grep (ignore) 0.343 +/- 0.007 (lines: 370)
|
||||||
|
rg (whitelist)* 0.222 +/- 0.021 (lines: 370)
|
||||||
|
ucg (whitelist) 0.217 +/- 0.006 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg 0.349 +/- 0.104 (lines: 16)
|
||||||
|
ag 1.589 +/- 0.009 (lines: 16)
|
||||||
|
ucg* 0.218 +/- 0.007 (lines: 16)*
|
||||||
|
pt 0.462 +/- 0.012 (lines: 16)
|
||||||
|
sift 0.352 +/- 0.018 (lines: 16)
|
||||||
|
git grep 0.342 +/- 0.005 (lines: 16)
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.577 +/- 0.003 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.416 +/- 0.025 (lines: 490)
|
||||||
|
ag (ignore) (ASCII) 2.339 +/- 0.010 (lines: 766)
|
||||||
|
pt (ignore) (ASCII) 22.066 +/- 0.057 (lines: 490)
|
||||||
|
sift (ignore) (ASCII) 25.563 +/- 0.108 (lines: 490)
|
||||||
|
git grep (ignore) 26.382 +/- 0.044 (lines: 490)
|
||||||
|
git grep (ignore) (ASCII) 4.153 +/- 0.010 (lines: 490)
|
||||||
|
rg (whitelist) 0.503 +/- 0.011 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.343 +/- 0.038 (lines: 419)*
|
||||||
|
ucg (whitelist) (ASCII) 1.130 +/- 0.003 (lines: 416)
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.318 +/- 0.034 (lines: 1652)
|
||||||
|
ag (ignore) 1.899 +/- 0.008 (lines: 1652)
|
||||||
|
pt (ignore) 13.713 +/- 0.241 (lines: 1652)
|
||||||
|
sift (ignore) 10.172 +/- 0.186 (lines: 1652)
|
||||||
|
git grep (ignore) 1.108 +/- 0.004 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.221 +/- 0.022 (lines: 1630)*
|
||||||
|
ucg (whitelist) 0.301 +/- 0.001 (lines: 1630)
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.414 +/- 0.021 (lines: 23)*
|
||||||
|
pt 12.745 +/- 0.166 (lines: 23)
|
||||||
|
sift 7.767 +/- 0.264 (lines: 23)
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg 0.425 +/- 0.027 (lines: 103)
|
||||||
|
pt 12.612 +/- 0.217 (lines: 23)
|
||||||
|
sift* 0.002 +/- 0.000 (lines: 0)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.355 +/- 0.073 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.329 +/- 0.060 (lines: 174)
|
||||||
|
ag (ignore) (ASCII) 1.774 +/- 0.011 (lines: 174)
|
||||||
|
pt (ignore) (ASCII) 14.180 +/- 0.180 (lines: 174)
|
||||||
|
sift (ignore) (ASCII) 11.087 +/- 0.108 (lines: 174)
|
||||||
|
git grep (ignore) 13.045 +/- 0.008 (lines: 186)
|
||||||
|
git grep (ignore) (ASCII) 2.991 +/- 0.004 (lines: 174)
|
||||||
|
rg (whitelist) 0.235 +/- 0.031 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.225 +/- 0.023 (lines: 168)*
|
||||||
|
ucg (ASCII) 0.229 +/- 0.007 (lines: 168)
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.362 +/- 0.080 (lines: 6)
|
||||||
|
ag (ignore) 1.603 +/- 0.009 (lines: 6)
|
||||||
|
pt (ignore) 14.417 +/- 0.144 (lines: 6)
|
||||||
|
sift (ignore) 7.840 +/- 0.123 (lines: 6)
|
||||||
|
git grep (ignore) 0.341 +/- 0.005 (lines: 6)
|
||||||
|
rg (whitelist)* 0.220 +/- 0.026 (lines: 6)*
|
||||||
|
ucg (whitelist) 0.221 +/- 0.007 (lines: 6)
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.619 +/- 0.001 (lines: 848)
|
||||||
|
ag (lines) 3.757 +/- 0.001 (lines: 848)
|
||||||
|
ucg (lines) 1.479 +/- 0.002 (lines: 848)
|
||||||
|
grep (lines) 3.412 +/- 0.004 (lines: 848)
|
||||||
|
rg* 0.294 +/- 0.001 (lines: 848)*
|
||||||
|
grep 2.955 +/- 0.003 (lines: 848)
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 5.170 +/- 0.004 (lines: 862)
|
||||||
|
ucg (ASCII) 3.453 +/- 0.005 (lines: 862)
|
||||||
|
grep (ASCII) 4.537 +/- 0.025 (lines: 862)
|
||||||
|
rg* 2.724 +/- 0.002 (lines: 862)*
|
||||||
|
grep 5.125 +/- 0.006 (lines: 862)
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.268 +/- 0.000 (lines: 629)*
|
||||||
|
rg (no mmap) 0.336 +/- 0.001 (lines: 629)
|
||||||
|
pt 3.433 +/- 0.002 (lines: 629)
|
||||||
|
sift 0.326 +/- 0.002 (lines: 629)
|
||||||
|
grep 0.516 +/- 0.001 (lines: 629)
|
||||||
|
rg (lines) 0.595 +/- 0.001 (lines: 629)
|
||||||
|
ag (lines) 2.730 +/- 0.003 (lines: 629)
|
||||||
|
ucg (lines) 0.745 +/- 0.001 (lines: 629)
|
||||||
|
pt (lines) 3.434 +/- 0.005 (lines: 629)
|
||||||
|
sift (lines) 0.756 +/- 0.002 (lines: 629)
|
||||||
|
grep (lines) 0.969 +/- 0.001 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.366 +/- 0.001 (lines: 642)*
|
||||||
|
grep 4.084 +/- 0.005 (lines: 642)
|
||||||
|
grep (ASCII) 0.614 +/- 0.001 (lines: 642)
|
||||||
|
rg (lines) 0.696 +/- 0.002 (lines: 642)
|
||||||
|
ag (lines) (ASCII) 2.775 +/- 0.004 (lines: 642)
|
||||||
|
ucg (lines) (ASCII) 0.841 +/- 0.002 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII) 0.596 +/- 0.001 (lines: 629)
|
||||||
|
ag (ASCII) 2.729 +/- 0.001 (lines: 629)
|
||||||
|
ucg (ASCII) 0.810 +/- 0.002 (lines: 629)
|
||||||
|
grep (ASCII) 0.970 +/- 0.000 (lines: 629)
|
||||||
|
rg* 0.596 +/- 0.001 (lines: 629)*
|
||||||
|
grep 0.972 +/- 0.003 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.777 +/- 0.003 (lines: 13)
|
||||||
|
rg (ASCII)* 2.541 +/- 0.005 (lines: 13)*
|
||||||
|
ag (ASCII) 10.076 +/- 0.005 (lines: 48)
|
||||||
|
ucg (ASCII) 7.771 +/- 0.004 (lines: 13)
|
||||||
|
grep (ASCII) 4.411 +/- 0.004 (lines: 13)
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.605 +/- 0.000 (lines: 317)
|
||||||
|
grep 1.286 +/- 0.002 (lines: 317)
|
||||||
|
rg (ASCII)* 0.602 +/- 0.000 (lines: 317)*
|
||||||
|
ag (ASCII) 11.663 +/- 0.008 (lines: 323)
|
||||||
|
ucg (ASCII) 4.690 +/- 0.002 (lines: 317)
|
||||||
|
grep (ASCII) 1.276 +/- 0.002 (lines: 317)
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.902 +/- 0.002 (lines: 691)
|
||||||
|
ag (lines) 5.892 +/- 0.003 (lines: 691)
|
||||||
|
ucg (lines) 2.864 +/- 0.006 (lines: 691)
|
||||||
|
grep (lines) 8.511 +/- 0.005 (lines: 691)
|
||||||
|
rg* 1.300 +/- 0.002 (lines: 691)*
|
||||||
|
grep 7.994 +/- 0.017 (lines: 691)
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 5.891 +/- 0.001 (lines: 691)
|
||||||
|
ucg (ASCII)* 2.868 +/- 0.005 (lines: 691)*
|
||||||
|
grep (ASCII) 8.572 +/- 0.009 (lines: 691)
|
||||||
|
rg 4.834 +/- 0.004 (lines: 735)
|
||||||
|
grep 8.729 +/- 0.004 (lines: 735)
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.325 +/- 0.001 (lines: 583)*
|
||||||
|
rg (no mmap) 0.452 +/- 0.002 (lines: 583)
|
||||||
|
pt 12.917 +/- 0.009 (lines: 583)
|
||||||
|
sift 16.418 +/- 0.008 (lines: 583)
|
||||||
|
grep 0.780 +/- 0.001 (lines: 583)
|
||||||
|
rg (lines) 0.926 +/- 0.001 (lines: 583)
|
||||||
|
ag (lines) 4.481 +/- 0.003 (lines: 583)
|
||||||
|
ucg (lines) 1.889 +/- 0.004 (lines: 583)
|
||||||
|
pt (lines) 12.935 +/- 0.011 (lines: 583)
|
||||||
|
sift (lines) 17.177 +/- 0.010 (lines: 583)
|
||||||
|
grep (lines) 1.300 +/- 0.003 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg 1.131 +/- 0.001 (lines: 604)
|
||||||
|
grep 8.187 +/- 0.006 (lines: 604)
|
||||||
|
grep (ASCII) 0.785 +/- 0.001 (lines: 583)
|
||||||
|
rg (lines) 1.733 +/- 0.002 (lines: 604)
|
||||||
|
ag (lines) (ASCII)* 0.729 +/- 0.001 (lines: 0)*
|
||||||
|
ucg (lines) (ASCII) 1.896 +/- 0.005 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.325 +/- 0.000 (lines: 0)*
|
||||||
|
ag (ASCII) 0.753 +/- 0.001 (lines: 0)
|
||||||
|
ucg (ASCII) 1.891 +/- 0.004 (lines: 583)
|
||||||
|
grep (ASCII) 1.303 +/- 0.004 (lines: 583)
|
||||||
|
rg 0.929 +/- 0.001 (lines: 579)
|
||||||
|
grep 1.304 +/- 0.003 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 4.905 +/- 0.003 (lines: 41)
|
||||||
|
rg (ASCII) 3.973 +/- 0.002 (lines: 0)
|
||||||
|
ag (ASCII)* 2.395 +/- 0.004 (lines: 0)*
|
||||||
|
ucg (ASCII) 3.006 +/- 0.005 (lines: 0)
|
||||||
|
grep (ASCII) 2.483 +/- 0.005 (lines: 0)
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.957 +/- 0.001 (lines: 278)*
|
||||||
|
grep 1.660 +/- 0.002 (lines: 278)
|
||||||
|
ag (ASCII) 2.411 +/- 0.001 (lines: 0)
|
||||||
|
ucg (ASCII) 2.980 +/- 0.002 (lines: 0)
|
||||||
|
grep (ASCII) 1.596 +/- 0.003 (lines: 0)
|
||||||
484
benchsuite/runs/2016-09-22-archlinux-cheetah/raw.csv
Normal file
484
benchsuite/runs/2016-09-22-archlinux-cheetah/raw.csv
Normal file
@@ -0,0 +1,484 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.16187143325805664,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.15862464904785156,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.15711188316345215,68,
|
||||||
|
linux_alternates,1,3,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5682125091552734,68,
|
||||||
|
linux_alternates,1,3,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.551994800567627,68,
|
||||||
|
linux_alternates,1,3,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5516140460968018,68,
|
||||||
|
linux_alternates,1,3,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.24930572509765625,68,LC_ALL=C
|
||||||
|
linux_alternates,1,3,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.25743985176086426,68,LC_ALL=C
|
||||||
|
linux_alternates,1,3,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.24960589408874512,68,LC_ALL=C
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1039431095123291,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10251975059509277,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10156440734863281,68,
|
||||||
|
linux_alternates,1,3,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.15678954124450684,68,
|
||||||
|
linux_alternates,1,3,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.15236687660217285,68,
|
||||||
|
linux_alternates,1,3,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1554563045501709,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.16192197799682617,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.15988397598266602,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1610555648803711,160,
|
||||||
|
linux_alternates_casei,1,3,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.6026794910430908,160,
|
||||||
|
linux_alternates_casei,1,3,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.6083211898803711,160,
|
||||||
|
linux_alternates_casei,1,3,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.674222469329834,160,
|
||||||
|
linux_alternates_casei,1,3,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,1.0635485649108887,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,3,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.8944556713104248,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,3,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.860692024230957,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.11778616905212402,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.11570453643798828,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.13424015045166016,160,
|
||||||
|
linux_alternates_casei,1,3,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2392585277557373,160,
|
||||||
|
linux_alternates_casei,1,3,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2421557903289795,160,
|
||||||
|
linux_alternates_casei,1,3,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2390902042388916,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.14362168312072754,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.16165685653686523,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.1725757122039795,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3785591125488281,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3961794376373291,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3924229145050049,16,
|
||||||
|
linux_literal,1,3,ag (ignore) (mmap),ag -s PM_RESUME,0.5462315082550049,16,
|
||||||
|
linux_literal,1,3,ag (ignore) (mmap),ag -s PM_RESUME,0.7240490913391113,16,
|
||||||
|
linux_literal,1,3,ag (ignore) (mmap),ag -s PM_RESUME,0.4528837203979492,16,
|
||||||
|
linux_literal,1,3,pt (ignore),pt PM_RESUME,0.16354584693908691,16,
|
||||||
|
linux_literal,1,3,pt (ignore),pt PM_RESUME,0.15301966667175293,16,
|
||||||
|
linux_literal,1,3,pt (ignore),pt PM_RESUME,0.15467524528503418,16,
|
||||||
|
linux_literal,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.33901119232177734,16,
|
||||||
|
linux_literal,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.34641242027282715,16,
|
||||||
|
linux_literal,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.3532230854034424,16,
|
||||||
|
linux_literal,1,3,git grep (ignore),git grep -I -n PM_RESUME,0.1970062255859375,16,LC_ALL=C
|
||||||
|
linux_literal,1,3,git grep (ignore),git grep -I -n PM_RESUME,0.21334624290466309,16,LC_ALL=C
|
||||||
|
linux_literal,1,3,git grep (ignore),git grep -I -n PM_RESUME,0.19323515892028809,16,LC_ALL=C
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.10708379745483398,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.10089921951293945,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.10404157638549805,16,
|
||||||
|
linux_literal,1,3,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.17191362380981445,16,
|
||||||
|
linux_literal,1,3,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.1670548915863037,16,
|
||||||
|
linux_literal,1,3,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.16875147819519043,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.16549420356750488,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.14867877960205078,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.1509239673614502,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.38896727561950684,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.39926719665527344,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3912012577056885,370,
|
||||||
|
linux_literal_casei,1,3,ag (ignore) (mmap),ag -i PM_RESUME,0.48294734954833984,370,
|
||||||
|
linux_literal_casei,1,3,ag (ignore) (mmap),ag -i PM_RESUME,0.4827127456665039,370,
|
||||||
|
linux_literal_casei,1,3,ag (ignore) (mmap),ag -i PM_RESUME,0.4216601848602295,370,
|
||||||
|
linux_literal_casei,1,3,pt (ignore),pt -i PM_RESUME,11.884198665618896,370,
|
||||||
|
linux_literal_casei,1,3,pt (ignore),pt -i PM_RESUME,12.05774974822998,370,
|
||||||
|
linux_literal_casei,1,3,pt (ignore),pt -i PM_RESUME,11.864668130874634,370,
|
||||||
|
linux_literal_casei,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.3698842525482178,370,
|
||||||
|
linux_literal_casei,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.3745250701904297,370,
|
||||||
|
linux_literal_casei,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.3670051097869873,370,
|
||||||
|
linux_literal_casei,1,3,git grep (ignore),git grep -I -n -i PM_RESUME,0.18896126747131348,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,3,git grep (ignore),git grep -I -n -i PM_RESUME,0.19655537605285645,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,3,git grep (ignore),git grep -I -n -i PM_RESUME,0.183945894241333,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.11336517333984375,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.10497522354125977,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.10771870613098145,370,
|
||||||
|
linux_literal_casei,1,3,ucg (whitelist),ucg -i PM_RESUME,0.1626441478729248,370,
|
||||||
|
linux_literal_casei,1,3,ucg (whitelist),ucg -i PM_RESUME,0.16270971298217773,370,
|
||||||
|
linux_literal_casei,1,3,ucg (whitelist),ucg -i PM_RESUME,0.1596980094909668,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.14002084732055664,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.13782882690429688,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.13794231414794922,16,
|
||||||
|
linux_literal_default,1,3,ag,ag PM_RESUME,0.4623262882232666,16,
|
||||||
|
linux_literal_default,1,3,ag,ag PM_RESUME,0.419907808303833,16,
|
||||||
|
linux_literal_default,1,3,ag,ag PM_RESUME,0.44193005561828613,16,
|
||||||
|
linux_literal_default,1,3,ucg,ucg PM_RESUME,0.1634502410888672,16,
|
||||||
|
linux_literal_default,1,3,ucg,ucg PM_RESUME,0.17029428482055664,16,
|
||||||
|
linux_literal_default,1,3,ucg,ucg PM_RESUME,0.16076922416687012,16,
|
||||||
|
linux_literal_default,1,3,pt,pt PM_RESUME,0.15809178352355957,16,
|
||||||
|
linux_literal_default,1,3,pt,pt PM_RESUME,0.1554114818572998,16,
|
||||||
|
linux_literal_default,1,3,pt,pt PM_RESUME,0.15415430068969727,16,
|
||||||
|
linux_literal_default,1,3,sift,sift PM_RESUME,0.1160738468170166,16,
|
||||||
|
linux_literal_default,1,3,sift,sift PM_RESUME,0.11754369735717773,16,
|
||||||
|
linux_literal_default,1,3,sift,sift PM_RESUME,0.11825299263000488,16,
|
||||||
|
linux_literal_default,1,3,git grep,git grep PM_RESUME,0.18619132041931152,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,3,git grep,git grep PM_RESUME,0.16708111763000488,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,3,git grep,git grep PM_RESUME,0.20236515998840332,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.34000611305236816,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.36969494819641113,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3622872829437256,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2572669982910156,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3148176670074463,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3092081546783447,490,
|
||||||
|
linux_no_literal,1,3,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.7651598453521729,766,
|
||||||
|
linux_no_literal,1,3,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.7487096786499023,766,
|
||||||
|
linux_no_literal,1,3,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.7506840229034424,766,
|
||||||
|
linux_no_literal,1,3,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.426137685775757,490,
|
||||||
|
linux_no_literal,1,3,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.454124450683594,490,
|
||||||
|
linux_no_literal,1,3,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.573740243911743,490,
|
||||||
|
linux_no_literal,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.734328746795654,490,
|
||||||
|
linux_no_literal,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.95349931716919,490,
|
||||||
|
linux_no_literal,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.97816801071167,490,
|
||||||
|
linux_no_literal,1,3,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.792009830474854,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.744960308074951,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},9.04098892211914,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,3,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.8596012592315674,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,3,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.824751853942871,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,3,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.9543235301971436,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.31849026679992676,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3028290271759033,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.31795716285705566,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.22214102745056152,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2748534679412842,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2098088264465332,419,
|
||||||
|
linux_no_literal,1,3,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.4494349956512451,416,
|
||||||
|
linux_no_literal,1,3,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.44551706314086914,416,
|
||||||
|
linux_no_literal,1,3,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.4425935745239258,416,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.19018173217773438,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.1422746181488037,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.14041566848754883,1652,
|
||||||
|
linux_re_literal_suffix,1,3,ag (ignore),ag -s [A-Z]+_RESUME,0.5190994739532471,1652,
|
||||||
|
linux_re_literal_suffix,1,3,ag (ignore),ag -s [A-Z]+_RESUME,0.5290501117706299,1652,
|
||||||
|
linux_re_literal_suffix,1,3,ag (ignore),ag -s [A-Z]+_RESUME,0.5360753536224365,1652,
|
||||||
|
linux_re_literal_suffix,1,3,pt (ignore),pt -e [A-Z]+_RESUME,11.900719404220581,1652,
|
||||||
|
linux_re_literal_suffix,1,3,pt (ignore),pt -e [A-Z]+_RESUME,11.905181646347046,1652,
|
||||||
|
linux_re_literal_suffix,1,3,pt (ignore),pt -e [A-Z]+_RESUME,11.878832817077637,1652,
|
||||||
|
linux_re_literal_suffix,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,3.9338936805725098,1652,
|
||||||
|
linux_re_literal_suffix,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,3.971776247024536,1652,
|
||||||
|
linux_re_literal_suffix,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,4.010965585708618,1652,
|
||||||
|
linux_re_literal_suffix,1,3,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.553400993347168,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,3,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.5757920742034912,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,3,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.6472165584564209,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.10109567642211914,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.1010751724243164,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.10259413719177246,1630,
|
||||||
|
linux_re_literal_suffix,1,3,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13558602333068848,1630,
|
||||||
|
linux_re_literal_suffix,1,3,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13765740394592285,1630,
|
||||||
|
linux_re_literal_suffix,1,3,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.14018011093139648,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.2655603885650635,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.2579922676086426,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.2389824390411377,23,
|
||||||
|
linux_unicode_greek,1,3,pt,pt -e \p{Greek},11.789764881134033,23,
|
||||||
|
linux_unicode_greek,1,3,pt,pt -e \p{Greek},11.717109680175781,23,
|
||||||
|
linux_unicode_greek,1,3,pt,pt -e \p{Greek},11.714937448501587,23,
|
||||||
|
linux_unicode_greek,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.732529401779175,23,
|
||||||
|
linux_unicode_greek,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.782707452774048,23,
|
||||||
|
linux_unicode_greek,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.8073642253875732,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.29653406143188477,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.24062681198120117,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.24714946746826172,103,
|
||||||
|
linux_unicode_greek_casei,1,3,pt,pt -i -e \p{Greek},11.754312515258789,23,
|
||||||
|
linux_unicode_greek_casei,1,3,pt,pt -i -e \p{Greek},11.742995500564575,23,
|
||||||
|
linux_unicode_greek_casei,1,3,pt,pt -i -e \p{Greek},11.763852596282959,23,
|
||||||
|
linux_unicode_greek_casei,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.0018308162689208984,,
|
||||||
|
linux_unicode_greek_casei,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.0017769336700439453,,
|
||||||
|
linux_unicode_greek_casei,1,3,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.0018434524536132812,,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.19392776489257812,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.14665579795837402,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.15625548362731934,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.14500045776367188,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.15199685096740723,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.14606475830078125,174,
|
||||||
|
linux_unicode_word,1,3,ag (ignore) (ASCII),ag -s \wAh,0.47933006286621094,174,
|
||||||
|
linux_unicode_word,1,3,ag (ignore) (ASCII),ag -s \wAh,0.4965095520019531,174,
|
||||||
|
linux_unicode_word,1,3,ag (ignore) (ASCII),ag -s \wAh,0.4971892833709717,174,
|
||||||
|
linux_unicode_word,1,3,pt (ignore) (ASCII),pt -e \wAh,12.043948650360107,174,
|
||||||
|
linux_unicode_word,1,3,pt (ignore) (ASCII),pt -e \wAh,12.024799823760986,174,
|
||||||
|
linux_unicode_word,1,3,pt (ignore) (ASCII),pt -e \wAh,12.032919883728027,174,
|
||||||
|
linux_unicode_word,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.146677255630493,174,
|
||||||
|
linux_unicode_word,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.05977988243103,174,
|
||||||
|
linux_unicode_word,1,3,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.246629238128662,174,
|
||||||
|
linux_unicode_word,1,3,git grep (ignore),git grep -E -I -n \wAh,4.401025772094727,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,3,git grep (ignore),git grep -E -I -n \wAh,4.499484062194824,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,3,git grep (ignore),git grep -E -I -n \wAh,4.530885934829712,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,3,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.552142858505249,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,3,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.4553732872009277,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,3,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.3407535552978516,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.10183477401733398,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.10535907745361328,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.10527634620666504,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.10268187522888184,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.10159945487976074,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.09854245185852051,168,
|
||||||
|
linux_unicode_word,1,3,ucg (ASCII),ucg --nosmart-case \wAh,0.17232871055603027,168,
|
||||||
|
linux_unicode_word,1,3,ucg (ASCII),ucg --nosmart-case \wAh,0.17245817184448242,168,
|
||||||
|
linux_unicode_word,1,3,ucg (ASCII),ucg --nosmart-case \wAh,0.1736738681793213,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.18302679061889648,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.14654874801635742,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.14666008949279785,6,
|
||||||
|
linux_word,1,3,ag (ignore),ag -s -w PM_RESUME,0.43340468406677246,6,
|
||||||
|
linux_word,1,3,ag (ignore),ag -s -w PM_RESUME,0.4431777000427246,6,
|
||||||
|
linux_word,1,3,ag (ignore),ag -s -w PM_RESUME,0.4939415454864502,6,
|
||||||
|
linux_word,1,3,pt (ignore),pt -w PM_RESUME,12.12212347984314,6,
|
||||||
|
linux_word,1,3,pt (ignore),pt -w PM_RESUME,12.106850862503052,6,
|
||||||
|
linux_word,1,3,pt (ignore),pt -w PM_RESUME,12.119231224060059,6,
|
||||||
|
linux_word,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.3320345878601074,6,
|
||||||
|
linux_word,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.2089524269104004,6,
|
||||||
|
linux_word,1,3,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.34165096282959,6,
|
||||||
|
linux_word,1,3,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.20112895965576172,6,LC_ALL=C
|
||||||
|
linux_word,1,3,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.16607999801635742,6,LC_ALL=C
|
||||||
|
linux_word,1,3,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.2049086093902588,6,LC_ALL=C
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.10440325736999512,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.09853243827819824,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.09580087661743164,6,
|
||||||
|
linux_word,1,3,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.16874432563781738,6,
|
||||||
|
linux_word,1,3,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.16241073608398438,6,
|
||||||
|
linux_word,1,3,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.1621534824371338,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5109667778015137,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.662921667098999,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.627272367477417,848,
|
||||||
|
subtitles_en_alternate,1,3,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.4915170669555664,848,
|
||||||
|
subtitles_en_alternate,1,3,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.294611930847168,848,
|
||||||
|
subtitles_en_alternate,1,3,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.475243330001831,848,
|
||||||
|
subtitles_en_alternate,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.450028419494629,848,
|
||||||
|
subtitles_en_alternate,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.266982078552246,848,
|
||||||
|
subtitles_en_alternate,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.429199457168579,848,
|
||||||
|
subtitles_en_alternate,1,3,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.81933856010437,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.829207420349121,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.795469284057617,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3135373592376709,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.47072267532348633,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3777759075164795,848,
|
||||||
|
subtitles_en_alternate,1,3,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2277214527130127,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.4641876220703125,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,3,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.4201643466949463,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.925377368927002,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.7743782997131348,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.9031031131744385,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.902085542678833,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.9104111194610596,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.9407846927642822,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.6935694217681885,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.7745134830474854,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.5532472133636475,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.3000056743621826,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.46085786819458,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2774720191955566,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.183770418167114,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,3,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.210017442703247,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,3,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.052750587463379,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2422008514404297,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18678736686706543,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20187044143676758,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21189618110656738,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21378588676452637,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2638204097747803,629,
|
||||||
|
subtitles_en_literal,1,3,pt,pt -N Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6680185794830322,629,
|
||||||
|
subtitles_en_literal,1,3,pt,pt -N Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7018795013427734,629,
|
||||||
|
subtitles_en_literal,1,3,pt,pt -N Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7135086059570312,629,
|
||||||
|
subtitles_en_literal,1,3,sift,sift Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.33170270919799805,629,
|
||||||
|
subtitles_en_literal,1,3,sift,sift Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3204488754272461,629,
|
||||||
|
subtitles_en_literal,1,3,sift,sift Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3302597999572754,629,
|
||||||
|
subtitles_en_literal,1,3,grep,grep -a Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5119576454162598,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep,grep -a Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.48076844215393066,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep,grep -a Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.6118988990783691,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.6149063110351562,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.547245979309082,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5441193580627441,629,
|
||||||
|
subtitles_en_literal,1,3,ag (lines),ag -s Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.990401268005371,629,
|
||||||
|
subtitles_en_literal,1,3,ag (lines),ag -s Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9924650192260742,629,
|
||||||
|
subtitles_en_literal,1,3,ag (lines),ag -s Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.807952642440796,629,
|
||||||
|
subtitles_en_literal,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.772294282913208,629,
|
||||||
|
subtitles_en_literal,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8758792877197266,629,
|
||||||
|
subtitles_en_literal,1,3,ucg (lines),ucg --nosmart-case Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8043625354766846,629,
|
||||||
|
subtitles_en_literal,1,3,pt (lines),pt Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5409111976623535,629,
|
||||||
|
subtitles_en_literal,1,3,pt (lines),pt Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.535851001739502,629,
|
||||||
|
subtitles_en_literal,1,3,pt (lines),pt Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6951041221618652,629,
|
||||||
|
subtitles_en_literal,1,3,sift (lines),sift -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7138817310333252,629,
|
||||||
|
subtitles_en_literal,1,3,sift (lines),sift -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.727524995803833,629,
|
||||||
|
subtitles_en_literal,1,3,sift (lines),sift -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7202486991882324,629,
|
||||||
|
subtitles_en_literal,1,3,grep (lines),grep -an Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0228428840637207,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep (lines),grep -an Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.9452800750732422,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,3,grep (lines),grep -an Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0286569595336914,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.36867737770080566,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.391110897064209,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.42432594299316406,642,
|
||||||
|
subtitles_en_literal_casei,1,3,grep,grep -ai Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.2124955654144287,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,3,grep,grep -ai Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.288994789123535,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,3,grep,grep -ai Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.2279436588287354,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,3,grep (ASCII),grep -E -ai Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5713660717010498,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,grep (ASCII),grep -E -ai Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5478014945983887,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,grep (ASCII),grep -E -ai Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5502541065216064,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5866222381591797,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5829083919525146,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7458250522613525,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ag (lines) (ASCII),ag -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8324756622314453,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ag (lines) (ASCII),ag -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8361680507659912,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ag (lines) (ASCII),ag -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.017822265625,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.9228289127349854,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.9356215000152588,642,
|
||||||
|
subtitles_en_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.9355306625366211,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.46090102195739746,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.41375064849853516,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4181649684906006,629,
|
||||||
|
subtitles_en_literal_word,1,3,ag (ASCII),ag -sw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8445067405700684,629,
|
||||||
|
subtitles_en_literal_word,1,3,ag (ASCII),ag -sw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.805356740951538,629,
|
||||||
|
subtitles_en_literal_word,1,3,ag (ASCII),ag -sw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8274097442626953,629,
|
||||||
|
subtitles_en_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.9036450386047363,629,
|
||||||
|
subtitles_en_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7601873874664307,629,
|
||||||
|
subtitles_en_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7341368198394775,629,
|
||||||
|
subtitles_en_literal_word,1,3,grep (ASCII),grep -anw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.867140531539917,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,3,grep (ASCII),grep -anw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8452246189117432,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,3,grep (ASCII),grep -anw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8254234790802002,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.39222264289855957,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5510556697845459,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.439284086227417,629,
|
||||||
|
subtitles_en_literal_word,1,3,grep,grep -anw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8688523769378662,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,3,grep,grep -anw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0727341175079346,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,3,grep,grep -anw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8665497303009033,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2950611114501953,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.226304769515991,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.3140387535095215,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.055910587310791,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.032794952392578,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0602478981018066,13,
|
||||||
|
subtitles_en_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,7.566168308258057,48,
|
||||||
|
subtitles_en_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,7.360717535018921,48,
|
||||||
|
subtitles_en_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,7.30781364440918,48,
|
||||||
|
subtitles_en_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.13957142829895,13,
|
||||||
|
subtitles_en_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.132368564605713,13,
|
||||||
|
subtitles_en_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.929611921310425,13,
|
||||||
|
subtitles_en_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.432003974914551,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.714038610458374,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.6915385723114014,13,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.42601513862609863,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.561565637588501,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5141217708587646,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,grep,grep -E -an \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.3077969551086426,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,3,grep,grep -E -an \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1768431663513184,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,3,grep,grep -E -an \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0883615016937256,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5061089992523193,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4004178047180176,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5536422729492188,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.981522798538208,323,
|
||||||
|
subtitles_en_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.83101487159729,323,
|
||||||
|
subtitles_en_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.025806427001953,323,
|
||||||
|
subtitles_en_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.906707286834717,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.8826284408569336,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.852736711502075,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.262470006942749,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1661438941955566,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1648437976837158,317,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.79972243309021,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.629694938659668,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8325402736663818,691,
|
||||||
|
subtitles_ru_alternate,1,3,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.124853849411011,691,
|
||||||
|
subtitles_ru_alternate,1,3,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.0995543003082275,691,
|
||||||
|
subtitles_ru_alternate,1,3,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.105457544326782,691,
|
||||||
|
subtitles_ru_alternate,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.491947650909424,691,
|
||||||
|
subtitles_ru_alternate,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.544341802597046,691,
|
||||||
|
subtitles_ru_alternate,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.6295418739318848,691,
|
||||||
|
subtitles_ru_alternate,1,3,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.948693513870239,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.991183280944824,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.004202842712402,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1708271503448486,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3341143131256104,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3589985370635986,691,
|
||||||
|
subtitles_ru_alternate,1,3,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.3860955238342285,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.437295436859131,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,3,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.34372615814209,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.100299119949341,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.343926668167114,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.247299432754517,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.6179757118225098,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.438668727874756,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.6296229362487793,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.816138744354248,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.005900859832764,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.96263861656189,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.222437858581543,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.260664463043213,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,4.040424823760986,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.112156391143799,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.066831350326538,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,3,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.983258962631226,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3009657859802246,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.31114768981933594,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3145453929901123,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3670217990875244,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.39557576179504395,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.38857460021972656,583,
|
||||||
|
subtitles_ru_literal,1,3,pt,pt -N Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.653504133224487,583,
|
||||||
|
subtitles_ru_literal,1,3,pt,pt -N Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.440903663635254,583,
|
||||||
|
subtitles_ru_literal,1,3,pt,pt -N Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.604345321655273,583,
|
||||||
|
subtitles_ru_literal,1,3,sift,sift Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.333267450332642,583,
|
||||||
|
subtitles_ru_literal,1,3,sift,sift Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.3738181591033936,583,
|
||||||
|
subtitles_ru_literal,1,3,sift,sift Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.604928970336914,583,
|
||||||
|
subtitles_ru_literal,1,3,grep,grep -a Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7382421493530273,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep,grep -a Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7205381393432617,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep,grep -a Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8509528636932373,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6589868068695068,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.857933759689331,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7283596992492676,583,
|
||||||
|
subtitles_ru_literal,1,3,ag (lines),ag -s Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.111611843109131,583,
|
||||||
|
subtitles_ru_literal,1,3,ag (lines),ag -s Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1084604263305664,583,
|
||||||
|
subtitles_ru_literal,1,3,ag (lines),ag -s Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.993370771408081,583,
|
||||||
|
subtitles_ru_literal,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8463020324707031,583,
|
||||||
|
subtitles_ru_literal,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8160367012023926,583,
|
||||||
|
subtitles_ru_literal,1,3,ucg (lines),ucg --nosmart-case Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9012954235076904,583,
|
||||||
|
subtitles_ru_literal,1,3,pt (lines),pt Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.590208530426025,583,
|
||||||
|
subtitles_ru_literal,1,3,pt (lines),pt Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.712487697601318,583,
|
||||||
|
subtitles_ru_literal,1,3,pt (lines),pt Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.628024339675903,583,
|
||||||
|
subtitles_ru_literal,1,3,sift (lines),sift -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.999194145202637,583,
|
||||||
|
subtitles_ru_literal,1,3,sift (lines),sift -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.639494895935059,583,
|
||||||
|
subtitles_ru_literal,1,3,sift (lines),sift -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.6554951667785645,583,
|
||||||
|
subtitles_ru_literal,1,3,grep (lines),grep -an Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3319404125213623,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep (lines),grep -an Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3712143898010254,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,3,grep (lines),grep -an Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2382845878601074,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2365717887878418,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2306108474731445,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.22041654586792,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,grep,grep -ai Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.636392116546631,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,3,grep,grep -ai Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.447664976119995,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,3,grep,grep -ai Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.47466516494751,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,3,grep (ASCII),grep -E -ai Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8679373264312744,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,grep (ASCII),grep -E -ai Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8400778770446777,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,grep (ASCII),grep -E -ai Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8912734985351562,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6649067401885986,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.472435712814331,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.5518934726715088,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,ag (lines) (ASCII),ag -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6329071521759033,,
|
||||||
|
subtitles_ru_literal_casei,1,3,ag (lines) (ASCII),ag -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6236186027526855,,
|
||||||
|
subtitles_ru_literal_casei,1,3,ag (lines) (ASCII),ag -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.744124174118042,,
|
||||||
|
subtitles_ru_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.842088222503662,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6797516345977783,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,ucg (lines) (ASCII),ucg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.86281418800354,583,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3059053421020508,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3220036029815674,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3317573070526123,,
|
||||||
|
subtitles_ru_literal_word,1,3,ag (ASCII),ag -sw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.790125846862793,,
|
||||||
|
subtitles_ru_literal_word,1,3,ag (ASCII),ag -sw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8004007339477539,,
|
||||||
|
subtitles_ru_literal_word,1,3,ag (ASCII),ag -sw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7884745597839355,,
|
||||||
|
subtitles_ru_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8595643043518066,583,
|
||||||
|
subtitles_ru_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8338594436645508,583,
|
||||||
|
subtitles_ru_literal_word,1,3,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6697683334350586,583,
|
||||||
|
subtitles_ru_literal_word,1,3,grep (ASCII),grep -anw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1608448028564453,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,3,grep (ASCII),grep -anw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3229436874389648,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,3,grep (ASCII),grep -anw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3650012016296387,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.840968132019043,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7012484073638916,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6782803535461426,579,
|
||||||
|
subtitles_ru_literal_word,1,3,grep,grep -anw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3308250904083252,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,3,grep,grep -anw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2687301635742188,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,3,grep,grep -anw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.317870855331421,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.8553390502929688,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.6567201614379883,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.6484830379486084,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.968876838684082,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.0976366996765137,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.9159646034240723,,
|
||||||
|
subtitles_ru_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8425374031066895,,
|
||||||
|
subtitles_ru_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0483176708221436,,
|
||||||
|
subtitles_ru_no_literal,1,3,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0838112831115723,,
|
||||||
|
subtitles_ru_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.510307550430298,,
|
||||||
|
subtitles_ru_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.542471408843994,,
|
||||||
|
subtitles_ru_no_literal,1,3,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.5069386959075928,,
|
||||||
|
subtitles_ru_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0888967514038086,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.119218349456787,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,3,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0531933307647705,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.792813777923584,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8660504817962646,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8515620231628418,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep,grep -E -an \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4405500888824463,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep,grep -E -an \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6386635303497314,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep,grep -E -an \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.5895426273345947,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.032708168029785,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.927478551864624,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.019101619720459,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.6226632595062256,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.5062124729156494,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.5160763263702393,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.613976240158081,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.5636706352233887,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,3,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4378304481506348,,LC_ALL=C
|
||||||
|
235
benchsuite/runs/2016-09-22-archlinux-cheetah/summary
Normal file
235
benchsuite/runs/2016-09-22-archlinux-cheetah/summary
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.159 +/- 0.002 (lines: 68)
|
||||||
|
ag (ignore) 0.557 +/- 0.009 (lines: 68)
|
||||||
|
git grep (ignore) 0.252 +/- 0.005 (lines: 68)
|
||||||
|
rg (whitelist)* 0.103 +/- 0.001 (lines: 68)*
|
||||||
|
ucg (whitelist) 0.155 +/- 0.002 (lines: 68)
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.161 +/- 0.001 (lines: 160)
|
||||||
|
ag (ignore) 0.628 +/- 0.040 (lines: 160)
|
||||||
|
git grep (ignore) 0.940 +/- 0.109 (lines: 160)
|
||||||
|
rg (whitelist)* 0.123 +/- 0.010 (lines: 160)*
|
||||||
|
ucg (whitelist) 0.240 +/- 0.002 (lines: 160)
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.159 +/- 0.015 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.389 +/- 0.009 (lines: 16)
|
||||||
|
ag (ignore) (mmap) 0.574 +/- 0.138 (lines: 16)
|
||||||
|
pt (ignore) 0.157 +/- 0.006 (lines: 16)
|
||||||
|
sift (ignore) 0.346 +/- 0.007 (lines: 16)
|
||||||
|
git grep (ignore) 0.201 +/- 0.011 (lines: 16)
|
||||||
|
rg (whitelist)* 0.104 +/- 0.003 (lines: 16)*
|
||||||
|
ucg (whitelist) 0.169 +/- 0.002 (lines: 16)
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.155 +/- 0.009 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.393 +/- 0.005 (lines: 370)
|
||||||
|
ag (ignore) (mmap) 0.462 +/- 0.035 (lines: 370)
|
||||||
|
pt (ignore) 11.936 +/- 0.106 (lines: 370)
|
||||||
|
sift (ignore) 0.370 +/- 0.004 (lines: 370)
|
||||||
|
git grep (ignore) 0.190 +/- 0.006 (lines: 370)
|
||||||
|
rg (whitelist)* 0.109 +/- 0.004 (lines: 370)*
|
||||||
|
ucg (whitelist) 0.162 +/- 0.002 (lines: 370)
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg 0.139 +/- 0.001 (lines: 16)
|
||||||
|
ag 0.441 +/- 0.021 (lines: 16)
|
||||||
|
ucg 0.165 +/- 0.005 (lines: 16)
|
||||||
|
pt 0.156 +/- 0.002 (lines: 16)
|
||||||
|
sift* 0.117 +/- 0.001 (lines: 16)*
|
||||||
|
git grep 0.185 +/- 0.018 (lines: 16)
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.357 +/- 0.015 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.294 +/- 0.032 (lines: 490)
|
||||||
|
ag (ignore) (ASCII) 0.755 +/- 0.009 (lines: 766)
|
||||||
|
pt (ignore) (ASCII) 12.485 +/- 0.078 (lines: 490)
|
||||||
|
sift (ignore) (ASCII) 8.889 +/- 0.134 (lines: 490)
|
||||||
|
git grep (ignore) 8.859 +/- 0.159 (lines: 490)
|
||||||
|
git grep (ignore) (ASCII) 1.880 +/- 0.067 (lines: 490)
|
||||||
|
rg (whitelist) 0.313 +/- 0.009 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.236 +/- 0.035 (lines: 419)*
|
||||||
|
ucg (whitelist) (ASCII) 0.446 +/- 0.003 (lines: 416)
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.158 +/- 0.028 (lines: 1652)
|
||||||
|
ag (ignore) 0.528 +/- 0.009 (lines: 1652)
|
||||||
|
pt (ignore) 11.895 +/- 0.014 (lines: 1652)
|
||||||
|
sift (ignore) 3.972 +/- 0.039 (lines: 1652)
|
||||||
|
git grep (ignore) 0.592 +/- 0.049 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.102 +/- 0.001 (lines: 1630)*
|
||||||
|
ucg (whitelist) 0.138 +/- 0.002 (lines: 1630)
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.254 +/- 0.014 (lines: 23)*
|
||||||
|
pt 11.741 +/- 0.043 (lines: 23)
|
||||||
|
sift 2.774 +/- 0.038 (lines: 23)
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg 0.261 +/- 0.031 (lines: 103)
|
||||||
|
pt 11.754 +/- 0.010 (lines: 23)
|
||||||
|
sift* 0.002 +/- 0.000 (lines: 0)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.166 +/- 0.025 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.148 +/- 0.004 (lines: 174)
|
||||||
|
ag (ignore) (ASCII) 0.491 +/- 0.010 (lines: 174)
|
||||||
|
pt (ignore) (ASCII) 12.034 +/- 0.010 (lines: 174)
|
||||||
|
sift (ignore) (ASCII) 4.151 +/- 0.094 (lines: 174)
|
||||||
|
git grep (ignore) 4.477 +/- 0.068 (lines: 186)
|
||||||
|
git grep (ignore) (ASCII) 1.449 +/- 0.106 (lines: 174)
|
||||||
|
rg (whitelist) 0.104 +/- 0.002 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.101 +/- 0.002 (lines: 168)*
|
||||||
|
ucg (ASCII) 0.173 +/- 0.001 (lines: 168)
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.159 +/- 0.021 (lines: 6)
|
||||||
|
ag (ignore) 0.457 +/- 0.032 (lines: 6)
|
||||||
|
pt (ignore) 12.116 +/- 0.008 (lines: 6)
|
||||||
|
sift (ignore) 3.294 +/- 0.074 (lines: 6)
|
||||||
|
git grep (ignore) 0.191 +/- 0.021 (lines: 6)
|
||||||
|
rg (whitelist)* 0.100 +/- 0.004 (lines: 6)*
|
||||||
|
ucg (whitelist) 0.164 +/- 0.004 (lines: 6)
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.600 +/- 0.079 (lines: 848)
|
||||||
|
ag (lines) 2.420 +/- 0.109 (lines: 848)
|
||||||
|
ucg (lines) 1.382 +/- 0.100 (lines: 848)
|
||||||
|
grep (lines) 2.815 +/- 0.017 (lines: 848)
|
||||||
|
rg* 0.387 +/- 0.079 (lines: 848)*
|
||||||
|
grep 2.371 +/- 0.126 (lines: 848)
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 3.868 +/- 0.082 (lines: 862)
|
||||||
|
ucg (ASCII) 2.918 +/- 0.020 (lines: 862)
|
||||||
|
grep (ASCII) 3.674 +/- 0.112 (lines: 862)
|
||||||
|
rg* 2.346 +/- 0.100 (lines: 862)*
|
||||||
|
grep 4.149 +/- 0.084 (lines: 862)
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.210 +/- 0.029 (lines: 629)*
|
||||||
|
rg (no mmap) 0.230 +/- 0.029 (lines: 629)
|
||||||
|
pt 1.694 +/- 0.024 (lines: 629)
|
||||||
|
sift 0.327 +/- 0.006 (lines: 629)
|
||||||
|
grep 0.535 +/- 0.069 (lines: 629)
|
||||||
|
rg (lines) 0.569 +/- 0.040 (lines: 629)
|
||||||
|
ag (lines) 1.930 +/- 0.106 (lines: 629)
|
||||||
|
ucg (lines) 0.818 +/- 0.053 (lines: 629)
|
||||||
|
pt (lines) 1.591 +/- 0.091 (lines: 629)
|
||||||
|
sift (lines) 0.721 +/- 0.007 (lines: 629)
|
||||||
|
grep (lines) 0.999 +/- 0.047 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.395 +/- 0.028 (lines: 642)*
|
||||||
|
grep 3.243 +/- 0.040 (lines: 642)
|
||||||
|
grep (ASCII) 0.556 +/- 0.013 (lines: 642)
|
||||||
|
rg (lines) 0.638 +/- 0.093 (lines: 642)
|
||||||
|
ag (lines) (ASCII) 1.895 +/- 0.106 (lines: 642)
|
||||||
|
ucg (lines) (ASCII) 0.931 +/- 0.007 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII) 0.431 +/- 0.026 (lines: 629)*
|
||||||
|
ag (ASCII) 1.826 +/- 0.020 (lines: 629)
|
||||||
|
ucg (ASCII) 0.799 +/- 0.091 (lines: 629)
|
||||||
|
grep (ASCII) 0.846 +/- 0.021 (lines: 629)
|
||||||
|
rg* 0.461 +/- 0.082 (lines: 629)
|
||||||
|
grep 0.936 +/- 0.118 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.278 +/- 0.046 (lines: 13)
|
||||||
|
rg (ASCII)* 2.050 +/- 0.015 (lines: 13)*
|
||||||
|
ag (ASCII) 7.412 +/- 0.136 (lines: 48)
|
||||||
|
ucg (ASCII) 6.067 +/- 0.119 (lines: 13)
|
||||||
|
grep (ASCII) 3.613 +/- 0.157 (lines: 13)
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.501 +/- 0.069 (lines: 317)
|
||||||
|
grep 1.191 +/- 0.110 (lines: 317)
|
||||||
|
rg (ASCII)* 0.487 +/- 0.078 (lines: 317)*
|
||||||
|
ag (ASCII) 4.946 +/- 0.102 (lines: 323)
|
||||||
|
ucg (ASCII) 3.881 +/- 0.027 (lines: 317)
|
||||||
|
grep (ASCII) 1.198 +/- 0.056 (lines: 317)
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.754 +/- 0.109 (lines: 691)
|
||||||
|
ag (lines) 4.110 +/- 0.013 (lines: 691)
|
||||||
|
ucg (lines) 2.555 +/- 0.069 (lines: 691)
|
||||||
|
grep (lines) 6.981 +/- 0.029 (lines: 691)
|
||||||
|
rg* 1.288 +/- 0.102 (lines: 691)*
|
||||||
|
grep 6.389 +/- 0.047 (lines: 691)
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 4.231 +/- 0.123 (lines: 691)
|
||||||
|
ucg (ASCII)* 2.562 +/- 0.107 (lines: 691)*
|
||||||
|
grep (ASCII) 6.928 +/- 0.099 (lines: 691)
|
||||||
|
rg 4.175 +/- 0.118 (lines: 735)
|
||||||
|
grep 7.054 +/- 0.065 (lines: 735)
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.309 +/- 0.007 (lines: 583)*
|
||||||
|
rg (no mmap) 0.384 +/- 0.015 (lines: 583)
|
||||||
|
pt 5.566 +/- 0.111 (lines: 583)
|
||||||
|
sift 6.437 +/- 0.147 (lines: 583)
|
||||||
|
grep 0.770 +/- 0.071 (lines: 583)
|
||||||
|
rg (lines) 0.748 +/- 0.101 (lines: 583)
|
||||||
|
ag (lines) 3.071 +/- 0.067 (lines: 583)
|
||||||
|
ucg (lines) 1.855 +/- 0.043 (lines: 583)
|
||||||
|
pt (lines) 5.644 +/- 0.063 (lines: 583)
|
||||||
|
sift (lines) 6.765 +/- 0.203 (lines: 583)
|
||||||
|
grep (lines) 1.314 +/- 0.068 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg 1.229 +/- 0.008 (lines: 604)
|
||||||
|
grep 6.520 +/- 0.102 (lines: 604)
|
||||||
|
grep (ASCII) 0.866 +/- 0.026 (lines: 583)
|
||||||
|
rg (lines) 1.563 +/- 0.097 (lines: 604)
|
||||||
|
ag (lines) (ASCII)* 0.667 +/- 0.067 (lines: 0)*
|
||||||
|
ucg (lines) (ASCII) 1.795 +/- 0.100 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.320 +/- 0.013 (lines: 0)*
|
||||||
|
ag (ASCII) 0.793 +/- 0.006 (lines: 0)
|
||||||
|
ucg (ASCII) 1.788 +/- 0.103 (lines: 583)
|
||||||
|
grep (ASCII) 1.283 +/- 0.108 (lines: 583)
|
||||||
|
rg 0.740 +/- 0.088 (lines: 579)
|
||||||
|
grep 1.306 +/- 0.033 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.720 +/- 0.117 (lines: 41)
|
||||||
|
rg (ASCII) 2.994 +/- 0.093 (lines: 0)
|
||||||
|
ag (ASCII)* 1.992 +/- 0.130 (lines: 0)*
|
||||||
|
ucg (ASCII) 2.520 +/- 0.020 (lines: 0)
|
||||||
|
grep (ASCII) 2.087 +/- 0.033 (lines: 0)
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.837 +/- 0.039 (lines: 278)*
|
||||||
|
grep 1.556 +/- 0.103 (lines: 278)
|
||||||
|
ag (ASCII) 1.993 +/- 0.057 (lines: 0)
|
||||||
|
ucg (ASCII) 2.548 +/- 0.065 (lines: 0)
|
||||||
|
grep (ASCII) 1.538 +/- 0.091 (lines: 0)
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09452986717224121,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08666801452636719,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08859610557556152,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07011771202087402,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06441712379455566,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06532430648803711,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10056233406066895,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09930968284606934,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09773039817810059,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07829093933105469,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0827643871307373,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08210110664367676,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06728911399841309,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06839728355407715,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.0736091136932373,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3859975337982178,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.38575077056884766,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.4032607078552246,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.0657193660736084,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.058367013931274414,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.05761837959289551,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07888174057006836,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.08236145973205566,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07680559158325195,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3796377182006836,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3852665424346924,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.387775182723999,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06758904457092285,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06706357002258301,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.07329010963439941,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06952190399169922,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06766009330749512,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06621623039245605,16,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.29076576232910156,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3039717674255371,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3147861957550049,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16966867446899414,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16578006744384766,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16440153121948242,490,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2742593288421631,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.27411365509033203,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2799038887023926,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15713810920715332,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15285205841064453,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.14862322807312012,419,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.06728196144104004,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.06869316101074219,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07347917556762695,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.05894923210144043,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.0584101676940918,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.05851030349731445,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16553878784179688,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16529393196105957,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16843223571777344,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16363120079040527,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16463160514831543,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16590571403503418,103,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07585549354553223,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07546257972717285,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07645726203918457,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.0733344554901123,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07160758972167969,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07302546501159668,174,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06922054290771484,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06507658958435059,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06478118896484375,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06373715400695801,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06354117393493652,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06615662574768066,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07121825218200684,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07050347328186035,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07254600524902344,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06099557876586914,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.061118364334106445,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.062296390533447266,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2724471092224121,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.26970720291137695,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2697625160217285,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21796512603759766,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.32093358039855957,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.35228729248046875,848,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2418622970581055,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2306008338928223,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.1873059272766113,862,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22467422485351562,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23565077781677246,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21903586387634277,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19292092323303223,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19452929496765137,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1927196979522705,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28882503509521484,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29108643531799316,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29820847511291504,629,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.32578349113464355,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2801830768585205,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.41840386390686035,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.42424988746643066,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3513953685760498,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.35476160049438477,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2841978073120117,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18991756439208984,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.296999454498291,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2810351848602295,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27904558181762695,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28331899642944336,629,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.065884590148926,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9066839218139648,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8898587226867676,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8937196731567383,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8904955387115479,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8846819400787354,13,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2928280830383301,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2243812084197998,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2868325710296631,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2832787036895752,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2892146110534668,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22050261497497559,317,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1501314640045166,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3660097122192383,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3461437225341797,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.281209945678711,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.287156343460083,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2730507850646973,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.712820529937744,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7904467582702637,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.657541036605835,735,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.28091931343078613,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2749307155609131,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.27948546409606934,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3499312400817871,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3630790710449219,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.35364317893981934,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36719226837158203,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3705906867980957,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3758120536804199,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1964221000671387,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1625583171844482,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1898295879364014,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.168842077255249,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2533905506134033,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2375917434692383,604,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.27202439308166504,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.26978445053100586,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.21065115928649902,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36217236518859863,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36077117919921875,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2883784770965576,579,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.496169090270996,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.315001964569092,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.3024141788482666,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.0939135551452637,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.8922672271728516,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1002702713012695,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3976116180419922,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.4013686180114746,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3070716857910156,278,
|
||||||
|
@@ -0,0 +1,126 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.090 +/- 0.004 (lines: 68)
|
||||||
|
rg (whitelist)* 0.067 +/- 0.003 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.099 +/- 0.001 (lines: 160)
|
||||||
|
rg (whitelist)* 0.081 +/- 0.002 (lines: 160)*
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.070 +/- 0.003 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.392 +/- 0.010 (lines: 16)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.004 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.079 +/- 0.003 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.384 +/- 0.004 (lines: 370)
|
||||||
|
rg (whitelist)* 0.069 +/- 0.003 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.068 +/- 0.002 (lines: 16)*
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.303 +/- 0.012 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.167 +/- 0.003 (lines: 490)
|
||||||
|
rg (whitelist) 0.276 +/- 0.003 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.153 +/- 0.004 (lines: 419)*
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.070 +/- 0.003 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.059 +/- 0.000 (lines: 1630)*
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.166 +/- 0.002 (lines: 23)*
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg* 0.165 +/- 0.001 (lines: 103)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.076 +/- 0.001 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.073 +/- 0.001 (lines: 174)
|
||||||
|
rg (whitelist) 0.066 +/- 0.002 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.064 +/- 0.001 (lines: 168)*
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.071 +/- 0.001 (lines: 6)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.001 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.271 +/- 0.002 (lines: 848)*
|
||||||
|
rg* 0.297 +/- 0.070 (lines: 848)
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 2.220 +/- 0.029 (lines: 862)*
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg 0.226 +/- 0.008 (lines: 629)
|
||||||
|
rg (no mmap)* 0.193 +/- 0.001 (lines: 629)*
|
||||||
|
rg (lines) 0.293 +/- 0.005 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.341 +/- 0.070 (lines: 642)*
|
||||||
|
rg (lines) 0.377 +/- 0.041 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII)* 0.257 +/- 0.058 (lines: 629)*
|
||||||
|
rg 0.281 +/- 0.002 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 1.954 +/- 0.097 (lines: 13)
|
||||||
|
rg (ASCII)* 1.890 +/- 0.005 (lines: 13)*
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.268 +/- 0.038 (lines: 317)
|
||||||
|
rg (ASCII)* 0.264 +/- 0.038 (lines: 317)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines)* 1.287 +/- 0.119 (lines: 691)
|
||||||
|
rg 1.280 +/- 0.007 (lines: 691)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 3.720 +/- 0.067 (lines: 735)*
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.278 +/- 0.003 (lines: 583)*
|
||||||
|
rg (no mmap) 0.356 +/- 0.007 (lines: 583)
|
||||||
|
rg (lines) 0.371 +/- 0.004 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg* 1.183 +/- 0.018 (lines: 604)*
|
||||||
|
rg (lines) 1.220 +/- 0.045 (lines: 604)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.251 +/- 0.035 (lines: 0)*
|
||||||
|
rg 0.337 +/- 0.042 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.371 +/- 0.108 (lines: 41)
|
||||||
|
rg (ASCII)* 3.029 +/- 0.118 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.369 +/- 0.053 (lines: 278)*
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09608030319213867,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08815908432006836,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08974266052246094,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06675052642822266,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06632375717163086,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06531620025634766,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09764790534973145,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10003781318664551,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10493707656860352,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07940077781677246,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07863998413085938,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07791614532470703,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06878829002380371,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06836318969726562,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.07277226448059082,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.379986047744751,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.40039825439453125,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.39777183532714844,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.059081315994262695,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.05873990058898926,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.0586698055267334,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07791399955749512,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.0774388313293457,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07851481437683105,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3788566589355469,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.385251522064209,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.38781046867370605,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06934094429016113,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.07142090797424316,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.07115054130554199,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06683826446533203,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.0690450668334961,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06625819206237793,16,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2812047004699707,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2557988166809082,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2892444133758545,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16913127899169922,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16315627098083496,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16622567176818848,490,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2771792411804199,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2861213684082031,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2742443084716797,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15151619911193848,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15233445167541504,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1620476245880127,419,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07045555114746094,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07046008110046387,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07087540626525879,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06178712844848633,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.0631401538848877,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.0627889633178711,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16510963439941406,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16919803619384766,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16366028785705566,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.17235875129699707,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16506695747375488,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16702055931091309,103,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07636308670043945,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.0767667293548584,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07441020011901855,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07776570320129395,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07788562774658203,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07390785217285156,174,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06318306922912598,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06787896156311035,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06569766998291016,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06557774543762207,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06389331817626953,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06407284736633301,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06868839263916016,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07014894485473633,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06822323799133301,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.05816149711608887,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.0577540397644043,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06107187271118164,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.38473939895629883,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2760040760040283,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.366499662399292,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.32836484909057617,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3063969612121582,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3368823528289795,848,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2332417964935303,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0444729328155518,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0396711826324463,862,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.13685226440429688,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1380929946899414,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.13843274116516113,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.192030668258667,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1971268653869629,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2931783199310303,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2777669429779053,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28525233268737793,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22691082954406738,629,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.31324243545532227,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4144246578216553,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.41251444816589355,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.492443323135376,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4691810607910156,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4890565872192383,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2987544536590576,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28134918212890625,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29971933364868164,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22062921524047852,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2716941833496094,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2172706127166748,629,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0828537940979004,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8791723251342773,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.079643964767456,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8388440608978271,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8970744609832764,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6844482421875,13,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28177690505981445,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29820775985717773,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2861142158508301,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22010159492492676,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22217011451721191,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2219986915588379,317,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.146566390991211,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3609087467193604,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1496453285217285,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.281858205795288,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.365553855895996,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2781758308410645,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.622640609741211,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7452948093414307,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.762295961380005,735,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.27922916412353516,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2578129768371582,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.21048188209533691,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.34738945960998535,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.368546724319458,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.35752224922180176,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2654876708984375,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2697427272796631,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3652024269104004,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.178579330444336,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1693329811096191,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.144824504852295,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0454356670379639,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0725409984588623,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2725732326507568,604,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.20514369010925293,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.18602967262268066,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2725963592529297,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.35959553718566895,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36090755462646484,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.35926032066345215,579,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.509491205215454,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.292212963104248,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.4941117763519287,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.0987064838409424,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1049976348876953,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.098233222961426,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3214902877807617,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.38519954681396484,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3827836513519287,278,
|
||||||
|
@@ -0,0 +1,126 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.091 +/- 0.004 (lines: 68)
|
||||||
|
rg (whitelist)* 0.066 +/- 0.001 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.101 +/- 0.004 (lines: 160)
|
||||||
|
rg (whitelist)* 0.079 +/- 0.001 (lines: 160)*
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.070 +/- 0.002 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.393 +/- 0.011 (lines: 16)
|
||||||
|
rg (whitelist)* 0.059 +/- 0.000 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.078 +/- 0.001 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.384 +/- 0.005 (lines: 370)
|
||||||
|
rg (whitelist)* 0.071 +/- 0.001 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.067 +/- 0.001 (lines: 16)*
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.275 +/- 0.017 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.166 +/- 0.003 (lines: 490)
|
||||||
|
rg (whitelist) 0.279 +/- 0.006 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.155 +/- 0.006 (lines: 419)*
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.071 +/- 0.000 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.063 +/- 0.001 (lines: 1630)*
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.166 +/- 0.003 (lines: 23)*
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg* 0.168 +/- 0.004 (lines: 103)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.076 +/- 0.001 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.077 +/- 0.002 (lines: 174)
|
||||||
|
rg (whitelist)* 0.066 +/- 0.002 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII) 0.065 +/- 0.001 (lines: 168)*
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.069 +/- 0.001 (lines: 6)
|
||||||
|
rg (whitelist)* 0.059 +/- 0.002 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines)* 0.342 +/- 0.058 (lines: 848)
|
||||||
|
rg 0.324 +/- 0.016 (lines: 848)*
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 2.106 +/- 0.110 (lines: 862)*
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.138 +/- 0.001 (lines: 629)*
|
||||||
|
rg (no mmap) 0.227 +/- 0.057 (lines: 629)
|
||||||
|
rg (lines) 0.263 +/- 0.032 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.380 +/- 0.058 (lines: 642)*
|
||||||
|
rg (lines) 0.484 +/- 0.013 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII) 0.293 +/- 0.010 (lines: 629)
|
||||||
|
rg* 0.237 +/- 0.030 (lines: 629)*
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.014 +/- 0.117 (lines: 13)
|
||||||
|
rg (ASCII)* 1.807 +/- 0.110 (lines: 13)*
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.289 +/- 0.009 (lines: 317)
|
||||||
|
rg (ASCII)* 0.221 +/- 0.001 (lines: 317)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines)* 1.219 +/- 0.123 (lines: 691)*
|
||||||
|
rg 1.309 +/- 0.049 (lines: 691)
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 3.710 +/- 0.076 (lines: 735)*
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.249 +/- 0.035 (lines: 583)*
|
||||||
|
rg (no mmap) 0.358 +/- 0.011 (lines: 583)
|
||||||
|
rg (lines) 0.300 +/- 0.056 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg 1.164 +/- 0.017 (lines: 604)
|
||||||
|
rg (lines)* 1.130 +/- 0.124 (lines: 604)*
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.221 +/- 0.045 (lines: 0)*
|
||||||
|
rg 0.360 +/- 0.001 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.432 +/- 0.121 (lines: 41)
|
||||||
|
rg (ASCII)* 3.101 +/- 0.004 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.363 +/- 0.036 (lines: 278)*
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10048675537109375,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09462523460388184,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0931856632232666,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06952047348022461,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07045698165893555,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06589603424072266,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09840559959411621,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0973203182220459,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09747123718261719,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07976746559143066,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07973408699035645,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0842599868774414,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06900453567504883,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06771540641784668,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.07333683967590332,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.38510584831237793,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.38396191596984863,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.37463903427124023,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.05757570266723633,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.058022260665893555,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.06006050109863281,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07654142379760742,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07764244079589844,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07787275314331055,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.38339757919311523,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.38019704818725586,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3887295722961426,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06747794151306152,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06868124008178711,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06679105758666992,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.07849764823913574,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.08336472511291504,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06723690032958984,16,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.25814294815063477,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.29274845123291016,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2985391616821289,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16458344459533691,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16898059844970703,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1756742000579834,490,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3002643585205078,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2709066867828369,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2683436870574951,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1489565372467041,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.14751625061035156,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1487743854522705,419,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.06930160522460938,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07447147369384766,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07432723045349121,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06141376495361328,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06345224380493164,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.05813455581665039,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16566061973571777,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.17109084129333496,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16268444061279297,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16269755363464355,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16636371612548828,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16133809089660645,103,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07663178443908691,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07986211776733398,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07756590843200684,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07402157783508301,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07861495018005371,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07465910911560059,174,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06782341003417969,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06639862060546875,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06768679618835449,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06638240814208984,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06481051445007324,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06659054756164551,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06744074821472168,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06904149055480957,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07302141189575195,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.05972766876220703,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.0587460994720459,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.05879020690917969,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3649451732635498,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.37390756607055664,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3691575527191162,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3192598819732666,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3968648910522461,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.347275972366333,848,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.11361026763916,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9423036575317383,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9265573024749756,862,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21686100959777832,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23349666595458984,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2394559383392334,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2971608638763428,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2950170040130615,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2873063087463379,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2898998260498047,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21834325790405273,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2833542823791504,629,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3961493968963623,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.30686163902282715,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.44585490226745605,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.46064209938049316,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4497091770172119,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.34823131561279297,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2819490432739258,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18886327743530273,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28542351722717285,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18991541862487793,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27848052978515625,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21271944046020508,629,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0810630321502686,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0093939304351807,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8533532619476318,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8952853679656982,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7897896766662598,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.893296480178833,13,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19786620140075684,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1896834373474121,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29248762130737305,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2933495044708252,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29410600662231445,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23128199577331543,317,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.343696117401123,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3544535636901855,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3534214496612549,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2638463973999023,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2450191974639893,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2779006958007812,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7900640964508057,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.812807321548462,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7412266731262207,735,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2562215328216553,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2781085968017578,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.21145415306091309,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36469101905822754,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.37107086181640625,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.29900336265563965,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3739583492279053,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3521237373352051,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3766622543334961,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1903154850006104,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.196908950805664,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1714701652526855,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0471339225769043,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2229478359222412,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1774308681488037,604,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.20592975616455078,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2680799961090088,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.29538846015930176,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36015796661376953,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3006131649017334,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36701369285583496,579,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.4495208263397217,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.4749486446380615,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.29917049407959,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.0949668884277344,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1213910579681396,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.905003070831299,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.39461803436279297,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3211812973022461,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3848116397857666,278,
|
||||||
|
@@ -0,0 +1,126 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.096 +/- 0.004 (lines: 68)
|
||||||
|
rg (whitelist)* 0.069 +/- 0.002 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.098 +/- 0.001 (lines: 160)
|
||||||
|
rg (whitelist)* 0.081 +/- 0.003 (lines: 160)*
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.070 +/- 0.003 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.381 +/- 0.006 (lines: 16)
|
||||||
|
rg (whitelist)* 0.059 +/- 0.001 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.077 +/- 0.001 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.384 +/- 0.004 (lines: 370)
|
||||||
|
rg (whitelist)* 0.068 +/- 0.001 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.076 +/- 0.008 (lines: 16)*
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.283 +/- 0.022 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.170 +/- 0.006 (lines: 490)
|
||||||
|
rg (whitelist) 0.280 +/- 0.018 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.148 +/- 0.001 (lines: 419)*
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.073 +/- 0.003 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.003 (lines: 1630)*
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.166 +/- 0.004 (lines: 23)*
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg* 0.163 +/- 0.003 (lines: 103)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.078 +/- 0.002 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.076 +/- 0.002 (lines: 174)
|
||||||
|
rg (whitelist) 0.067 +/- 0.001 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.066 +/- 0.001 (lines: 168)*
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.070 +/- 0.003 (lines: 6)
|
||||||
|
rg (whitelist)* 0.059 +/- 0.001 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.369 +/- 0.004 (lines: 848)
|
||||||
|
rg* 0.354 +/- 0.039 (lines: 848)*
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 1.994 +/- 0.104 (lines: 862)*
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.230 +/- 0.012 (lines: 629)*
|
||||||
|
rg (no mmap) 0.293 +/- 0.005 (lines: 629)
|
||||||
|
rg (lines) 0.264 +/- 0.040 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.383 +/- 0.070 (lines: 642)*
|
||||||
|
rg (lines) 0.420 +/- 0.062 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII)* 0.252 +/- 0.055 (lines: 629)
|
||||||
|
rg 0.227 +/- 0.046 (lines: 629)*
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 1.981 +/- 0.116 (lines: 13)
|
||||||
|
rg (ASCII)* 1.859 +/- 0.060 (lines: 13)*
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg* 0.227 +/- 0.057 (lines: 317)*
|
||||||
|
rg (ASCII) 0.273 +/- 0.036 (lines: 317)
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.351 +/- 0.006 (lines: 691)
|
||||||
|
rg* 1.262 +/- 0.016 (lines: 691)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 3.781 +/- 0.037 (lines: 735)*
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.249 +/- 0.034 (lines: 583)*
|
||||||
|
rg (no mmap) 0.345 +/- 0.040 (lines: 583)
|
||||||
|
rg (lines) 0.368 +/- 0.013 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg 1.186 +/- 0.013 (lines: 604)
|
||||||
|
rg (lines)* 1.149 +/- 0.091 (lines: 604)*
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.256 +/- 0.046 (lines: 0)*
|
||||||
|
rg 0.343 +/- 0.037 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.408 +/- 0.095 (lines: 41)
|
||||||
|
rg (ASCII)* 3.040 +/- 0.118 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.367 +/- 0.040 (lines: 278)*
|
||||||
157
benchsuite/runs/2016-12-24-archlinux-cheetah-musl-system/raw.csv
Normal file
157
benchsuite/runs/2016-12-24-archlinux-cheetah-musl-system/raw.csv
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09466052055358887,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09342074394226074,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0869603157043457,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06717634201049805,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06487321853637695,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06573486328125,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10077238082885742,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10428118705749512,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09920215606689453,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07973098754882812,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07897496223449707,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07888197898864746,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06830811500549316,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.0715939998626709,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06830549240112305,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3897213935852051,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.39376020431518555,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3769495487213135,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.060272932052612305,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.058103322982788086,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.06174445152282715,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07664990425109863,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07809257507324219,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.08361077308654785,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.38071417808532715,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.37515711784362793,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.38091325759887695,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06704211235046387,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06667947769165039,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06667375564575195,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06779932975769043,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06725239753723145,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06754946708679199,16,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2662222385406494,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.30044007301330566,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.30494165420532227,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.17267060279846191,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16266226768493652,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16399097442626953,490,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.25603818893432617,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.26952672004699707,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2737579345703125,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.14797663688659668,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15069222450256348,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15210580825805664,419,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.06923699378967285,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07373404502868652,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07130026817321777,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.05809664726257324,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06291556358337402,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.062150001525878906,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16234064102172852,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16682648658752441,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.1634657382965088,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16612553596496582,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.1632983684539795,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16044902801513672,103,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07571697235107422,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07967901229858398,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07469820976257324,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07374238967895508,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07341313362121582,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07449674606323242,174,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06552338600158691,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06324410438537598,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.0665595531463623,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06373834609985352,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06749844551086426,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06431031227111816,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.0686798095703125,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06870913505554199,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06892633438110352,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.05895066261291504,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06163740158081055,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.058525800704956055,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.34538722038269043,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.265763521194458,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.26305389404296875,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20859956741333008,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20516705513000488,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20496821403503418,848,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2090365886688232,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.226768732070923,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.226130962371826,862,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.24144577980041504,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21985626220703125,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21775150299072266,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2918863296508789,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1962728500366211,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19310998916625977,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.26285672187805176,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18955564498901367,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1910560131072998,629,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.40812134742736816,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.31265878677368164,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.31433773040771484,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3256862163543701,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.32616353034973145,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.32959580421447754,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27936625480651855,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28154826164245605,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20779705047607422,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.26377248764038086,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2896091938018799,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21306395530700684,629,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0740439891815186,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.875295639038086,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0514187812805176,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6831274032592773,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6856412887573242,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6853716373443604,13,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2878584861755371,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22226691246032715,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.294330358505249,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3013031482696533,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2214052677154541,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19563746452331543,317,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1506719589233398,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.345916509628296,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3316686153411865,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2255687713623047,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0810630321502686,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2861762046813965,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.666182279586792,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.730118751525879,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7910759449005127,735,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.265308141708374,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2775256633758545,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.29873085021972656,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3600039482116699,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3705918788909912,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.37277793884277344,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3728773593902588,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2903330326080322,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3601820468902588,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1635336875915527,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9739360809326172,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.155383825302124,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2030081748962402,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0454139709472656,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2500181198120117,604,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2797272205352783,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2795555591583252,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2683413028717041,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2863891124725342,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.35770344734191895,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3524661064147949,579,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.514166831970215,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.4967641830444336,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.2882306575775146,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.8897318840026855,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1153793334960938,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.100428581237793,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.4093492031097412,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.4054989814758301,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3883328437805176,278,
|
||||||
|
126
benchsuite/runs/2016-12-24-archlinux-cheetah-musl-system/summary
Normal file
126
benchsuite/runs/2016-12-24-archlinux-cheetah-musl-system/summary
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.092 +/- 0.004 (lines: 68)
|
||||||
|
rg (whitelist)* 0.066 +/- 0.001 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.101 +/- 0.003 (lines: 160)
|
||||||
|
rg (whitelist)* 0.079 +/- 0.000 (lines: 160)*
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.069 +/- 0.002 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.387 +/- 0.009 (lines: 16)
|
||||||
|
rg (whitelist)* 0.060 +/- 0.002 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.079 +/- 0.004 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.379 +/- 0.003 (lines: 370)
|
||||||
|
rg (whitelist)* 0.067 +/- 0.000 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.068 +/- 0.000 (lines: 16)*
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.291 +/- 0.021 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.166 +/- 0.005 (lines: 490)
|
||||||
|
rg (whitelist) 0.266 +/- 0.009 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.150 +/- 0.002 (lines: 419)*
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.071 +/- 0.002 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.003 (lines: 1630)*
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.164 +/- 0.002 (lines: 23)*
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg* 0.163 +/- 0.003 (lines: 103)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.077 +/- 0.003 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.074 +/- 0.001 (lines: 174)
|
||||||
|
rg (whitelist)* 0.065 +/- 0.002 (lines: 180)*
|
||||||
|
rg (whitelist) (ASCII) 0.065 +/- 0.002 (lines: 168)
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.069 +/- 0.000 (lines: 6)
|
||||||
|
rg (whitelist)* 0.060 +/- 0.002 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.291 +/- 0.047 (lines: 848)
|
||||||
|
rg* 0.206 +/- 0.002 (lines: 848)*
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 2.221 +/- 0.010 (lines: 862)*
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg 0.226 +/- 0.013 (lines: 629)
|
||||||
|
rg (no mmap) 0.227 +/- 0.056 (lines: 629)
|
||||||
|
rg (lines)* 0.214 +/- 0.042 (lines: 629)*
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.345 +/- 0.055 (lines: 642)
|
||||||
|
rg (lines) 0.327 +/- 0.002 (lines: 642)*
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII)* 0.256 +/- 0.042 (lines: 629)
|
||||||
|
rg 0.255 +/- 0.039 (lines: 629)*
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.000 +/- 0.109 (lines: 13)
|
||||||
|
rg (ASCII)* 1.685 +/- 0.001 (lines: 13)*
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.268 +/- 0.040 (lines: 317)
|
||||||
|
rg (ASCII)* 0.239 +/- 0.055 (lines: 317)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.276 +/- 0.109 (lines: 691)
|
||||||
|
rg* 1.198 +/- 0.105 (lines: 691)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 3.729 +/- 0.062 (lines: 735)*
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.281 +/- 0.017 (lines: 583)*
|
||||||
|
rg (no mmap) 0.368 +/- 0.007 (lines: 583)
|
||||||
|
rg (lines) 0.341 +/- 0.044 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg* 1.098 +/- 0.107 (lines: 604)*
|
||||||
|
rg (lines) 1.166 +/- 0.107 (lines: 604)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.276 +/- 0.007 (lines: 0)*
|
||||||
|
rg 0.332 +/- 0.040 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.433 +/- 0.126 (lines: 41)
|
||||||
|
rg (ASCII)* 3.035 +/- 0.126 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.401 +/- 0.011 (lines: 278)*
|
||||||
157
benchsuite/runs/2016-12-24-archlinux-cheetah/raw.csv
Normal file
157
benchsuite/runs/2016-12-24-archlinux-cheetah/raw.csv
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09865546226501465,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08865809440612793,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0934293270111084,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07241153717041016,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06905841827392578,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.06687068939208984,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1011350154876709,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1053009033203125,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10577726364135742,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0832066535949707,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0812225341796875,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08363056182861328,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.07260608673095703,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06956887245178223,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.07262110710144043,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3854484558105469,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.3801109790802002,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.38498902320861816,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.06220889091491699,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.059615373611450195,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.06207394599914551,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.08192729949951172,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.08037471771240234,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.08067464828491211,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3890647888183594,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3882875442504883,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3826119899749756,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.07255673408508301,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.07240700721740723,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06744766235351562,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06866455078125,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06612515449523926,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06630897521972656,16,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.30286335945129395,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2710304260253906,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.30267834663391113,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16382431983947754,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1649789810180664,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16989731788635254,490,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3308746814727783,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.27356576919555664,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2729830741882324,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16254186630249023,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15763211250305176,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15112638473510742,419,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07556724548339844,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07514452934265137,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.06890320777893066,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.061008453369140625,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06007099151611328,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.058913469314575195,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.1675281524658203,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.1719217300415039,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.1675257682800293,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16816997528076172,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16349577903747559,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.1649951934814453,103,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07944488525390625,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.08015990257263184,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07640767097473145,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.0741121768951416,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07456159591674805,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07508492469787598,174,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06891131401062012,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.0655059814453125,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06730937957763672,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.0630197525024414,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06429147720336914,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06670451164245605,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07088422775268555,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06971001625061035,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.06918931007385254,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.05994749069213867,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06264781951904297,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.061440467834472656,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4529764652252197,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28824853897094727,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.287844181060791,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.34439826011657715,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.34816765785217285,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23656105995178223,848,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.026144027709961,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2452991008758545,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2087535858154297,862,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2194046974182129,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22587895393371582,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22500324249267578,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3005552291870117,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2805304527282715,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.30254316329956055,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2822296619415283,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2205369472503662,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23558998107910156,629,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4217369556427002,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4352266788482666,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3286154270172119,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4068911075592041,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4721720218658447,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.49277544021606445,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2922394275665283,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2809920310974121,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2835381031036377,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28315305709838867,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29279136657714844,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29344797134399414,629,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0767383575439453,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0589702129364014,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8731834888458252,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6820619106292725,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8845677375793457,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6996817588806152,13,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2987375259399414,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2955625057220459,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2865116596221924,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27387547492980957,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2899343967437744,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19668984413146973,317,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4088802337646484,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3826014995574951,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4164769649505615,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2548110485076904,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.080472707748413,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3337528705596924,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.449100971221924,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.747535467147827,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7990715503692627,735,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.21280717849731445,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.18636178970336914,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2740190029144287,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36304640769958496,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3737907409667969,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.37337779998779297,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2974729537963867,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2715010643005371,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36052799224853516,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.206491231918335,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.202974557876587,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.195291519165039,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2875757217407227,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2895469665527344,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.277585506439209,604,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2928614616394043,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2610359191894531,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2692301273345947,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36007237434387207,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.37184953689575195,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3902134895324707,579,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.2949090003967285,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.48958683013916,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.389604091644287,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.894768714904785,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.873474359512329,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.088130474090576,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3918273448944092,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.38251543045043945,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2919657230377197,278,
|
||||||
|
126
benchsuite/runs/2016-12-24-archlinux-cheetah/summary
Normal file
126
benchsuite/runs/2016-12-24-archlinux-cheetah/summary
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.094 +/- 0.005 (lines: 68)
|
||||||
|
rg (whitelist)* 0.069 +/- 0.003 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.104 +/- 0.003 (lines: 160)
|
||||||
|
rg (whitelist)* 0.083 +/- 0.001 (lines: 160)*
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.072 +/- 0.002 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.384 +/- 0.003 (lines: 16)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.001 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.081 +/- 0.001 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.387 +/- 0.004 (lines: 370)
|
||||||
|
rg (whitelist)* 0.071 +/- 0.003 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.067 +/- 0.001 (lines: 16)*
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.292 +/- 0.018 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.166 +/- 0.003 (lines: 490)
|
||||||
|
rg (whitelist) 0.292 +/- 0.033 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.157 +/- 0.006 (lines: 419)*
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.073 +/- 0.004 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.060 +/- 0.001 (lines: 1630)*
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.169 +/- 0.003 (lines: 23)*
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg* 0.166 +/- 0.002 (lines: 103)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.079 +/- 0.002 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.075 +/- 0.000 (lines: 174)
|
||||||
|
rg (whitelist) 0.067 +/- 0.002 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.065 +/- 0.002 (lines: 168)*
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.070 +/- 0.001 (lines: 6)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.001 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.343 +/- 0.095 (lines: 848)
|
||||||
|
rg* 0.310 +/- 0.063 (lines: 848)*
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 2.160 +/- 0.117 (lines: 862)*
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.223 +/- 0.004 (lines: 629)*
|
||||||
|
rg (no mmap) 0.295 +/- 0.012 (lines: 629)
|
||||||
|
rg (lines) 0.246 +/- 0.032 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.395 +/- 0.058 (lines: 642)*
|
||||||
|
rg (lines) 0.457 +/- 0.045 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII)* 0.286 +/- 0.006 (lines: 629)*
|
||||||
|
rg 0.290 +/- 0.006 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.003 +/- 0.113 (lines: 13)
|
||||||
|
rg (ASCII)* 1.755 +/- 0.112 (lines: 13)*
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.294 +/- 0.006 (lines: 317)
|
||||||
|
rg (ASCII)* 0.253 +/- 0.050 (lines: 317)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.403 +/- 0.018 (lines: 691)
|
||||||
|
rg* 1.223 +/- 0.130 (lines: 691)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 3.665 +/- 0.189 (lines: 735)*
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.224 +/- 0.045 (lines: 583)*
|
||||||
|
rg (no mmap) 0.370 +/- 0.006 (lines: 583)
|
||||||
|
rg (lines) 0.310 +/- 0.046 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg* 1.202 +/- 0.006 (lines: 604)*
|
||||||
|
rg (lines) 1.285 +/- 0.006 (lines: 604)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.274 +/- 0.017 (lines: 0)*
|
||||||
|
rg 0.374 +/- 0.015 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.391 +/- 0.097 (lines: 41)
|
||||||
|
rg (ASCII)* 2.952 +/- 0.118 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.355 +/- 0.055 (lines: 278)*
|
||||||
157
benchsuite/runs/2016-12-30-archlinux-cheetah/raw.csv
Normal file
157
benchsuite/runs/2016-12-30-archlinux-cheetah/raw.csv
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09816598892211914,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08965039253234863,68,
|
||||||
|
linux_alternates,1,3,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09101128578186035,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07472872734069824,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07628297805786133,68,
|
||||||
|
linux_alternates,1,3,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07189559936523438,68,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10288548469543457,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10204243659973145,160,
|
||||||
|
linux_alternates_casei,1,3,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1031193733215332,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08190178871154785,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08523178100585938,160,
|
||||||
|
linux_alternates_casei,1,3,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.07952761650085449,160,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06972551345825195,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.0691523551940918,16,
|
||||||
|
linux_literal,1,3,rg (ignore),rg -n PM_RESUME,0.06865429878234863,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.39247632026672363,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.4009978771209717,16,
|
||||||
|
linux_literal,1,3,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.40122294425964355,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.062048912048339844,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.05932760238647461,16,
|
||||||
|
linux_literal,1,3,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.058171749114990234,16,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.08261799812316895,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.0780181884765625,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore),rg -n -i PM_RESUME,0.07934045791625977,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.4008915424346924,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.3899986743927002,370,
|
||||||
|
linux_literal_casei,1,3,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.39725732803344727,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.07104611396789551,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.0707247257232666,370,
|
||||||
|
linux_literal_casei,1,3,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.06864142417907715,370,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06764745712280273,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.06994485855102539,16,
|
||||||
|
linux_literal_default,1,3,rg,rg PM_RESUME,0.0682222843170166,16,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.27941250801086426,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.31389880180358887,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.30502963066101074,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16565680503845215,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16579079627990723,490,
|
||||||
|
linux_no_literal,1,3,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.169691801071167,490,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2969038486480713,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.2995884418487549,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.27426910400390625,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15207958221435547,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15367984771728516,419,
|
||||||
|
linux_no_literal,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15249848365783691,419,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07145977020263672,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.07139325141906738,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (ignore),rg -n [A-Z]+_RESUME,0.0708932876586914,1652,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.05987191200256348,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06223797798156738,1630,
|
||||||
|
linux_re_literal_suffix,1,3,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.06115579605102539,1630,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16427040100097656,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.16524410247802734,23,
|
||||||
|
linux_unicode_greek,1,3,rg,rg -n \p{Greek},0.1664714813232422,23,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16639113426208496,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16803503036499023,103,
|
||||||
|
linux_unicode_greek_casei,1,3,rg,rg -n -i \p{Greek},0.16656923294067383,103,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07580804824829102,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07589507102966309,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore),rg -n \wAh,0.07574295997619629,186,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07641291618347168,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07523059844970703,174,
|
||||||
|
linux_unicode_word,1,3,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.07748007774353027,174,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06804847717285156,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06720519065856934,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist),rg -n --no-ignore -tall \wAh,0.06687021255493164,180,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06528687477111816,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.07101035118103027,168,
|
||||||
|
linux_unicode_word,1,3,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.06446981430053711,168,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07159972190856934,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.0695488452911377,6,
|
||||||
|
linux_word,1,3,rg (ignore),rg -n -w PM_RESUME,0.07082796096801758,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06297016143798828,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06128263473510742,6,
|
||||||
|
linux_word,1,3,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.06177973747253418,6,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.36841607093811035,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.30306172370910645,848,
|
||||||
|
subtitles_en_alternate,1,3,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3288271427154541,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3186373710632324,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23814082145690918,848,
|
||||||
|
subtitles_en_alternate,1,3,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23152780532836914,848,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2480580806732178,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.2288904190063477,862,
|
||||||
|
subtitles_en_alternate_casei,1,3,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.287020206451416,862,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21738362312316895,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.16032648086547852,629,
|
||||||
|
subtitles_en_literal,1,3,rg,rg Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.15392351150512695,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21230578422546387,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27013158798217773,629,
|
||||||
|
subtitles_en_literal,1,3,rg (no mmap),rg --no-mmap Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19994258880615234,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2728753089904785,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23652935028076172,629,
|
||||||
|
subtitles_en_literal,1,3,rg (lines),rg -n Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2579770088195801,629,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3031468391418457,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.40822505950927734,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg,rg -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.38727545738220215,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4260599613189697,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4490511417388916,642,
|
||||||
|
subtitles_en_literal_casei,1,3,rg (lines),rg -n -i Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.49449872970581055,642,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2707977294921875,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2691836357116699,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.24464011192321777,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22373199462890625,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.25702810287475586,629,
|
||||||
|
subtitles_en_literal_word,1,3,rg,rg -nw Sherlock Holmes /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23047828674316406,629,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.139404773712158,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0484464168548584,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.0293972492218018,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.840238094329834,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7812306880950928,13,
|
||||||
|
subtitles_en_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7657690048217773,13,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.26054978370666504,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2869753837585449,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg,rg -n \w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22949600219726562,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21858429908752441,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2064223289489746,317,
|
||||||
|
subtitles_en_surrounding_words,1,3,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20789289474487305,317,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.313758373260498,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2925219535827637,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3444299697875977,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.264918565750122,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.30733060836792,691,
|
||||||
|
subtitles_ru_alternate,1,3,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1466560363769531,691,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.783818244934082,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.76894474029541,735,
|
||||||
|
subtitles_ru_alternate_casei,1,3,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.788987398147583,735,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2822730541229248,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.25232434272766113,583,
|
||||||
|
subtitles_ru_literal,1,3,rg,rg Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2563645839691162,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.34694504737854004,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3202054500579834,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (no mmap),rg --no-mmap Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3236703872680664,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.36035776138305664,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3270585536956787,583,
|
||||||
|
subtitles_ru_literal,1,3,rg (lines),rg -n Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3121967315673828,583,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0397696495056152,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.158402442932129,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg,rg -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1158676147460938,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.2041549682617188,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1511006355285645,604,
|
||||||
|
subtitles_ru_literal_casei,1,3,rg (lines),rg -n -i Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1794021129608154,604,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.19694828987121582,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.1980271339416504,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2128591537475586,,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3568108081817627,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3353869915008545,579,
|
||||||
|
subtitles_ru_literal_word,1,3,rg,rg -nw Шерлок Холмс /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3075387477874756,579,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.5629587173461914,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.5984435081481934,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.4725229740142822,41,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.170077323913574,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.064476490020752,,
|
||||||
|
subtitles_ru_no_literal,1,3,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.159156084060669,,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3924906253814697,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3874075412750244,278,
|
||||||
|
subtitles_ru_surrounding_words,1,3,rg,rg -n \w+\s+Холмс\s+\w+ /data/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.39940643310546875,278,
|
||||||
|
126
benchsuite/runs/2016-12-30-archlinux-cheetah/summary
Normal file
126
benchsuite/runs/2016-12-30-archlinux-cheetah/summary
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.093 +/- 0.005 (lines: 68)
|
||||||
|
rg (whitelist)* 0.074 +/- 0.002 (lines: 68)*
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.103 +/- 0.001 (lines: 160)
|
||||||
|
rg (whitelist)* 0.082 +/- 0.003 (lines: 160)*
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.069 +/- 0.001 (lines: 16)
|
||||||
|
rg (ignore) (mmap) 0.398 +/- 0.005 (lines: 16)
|
||||||
|
rg (whitelist)* 0.060 +/- 0.002 (lines: 16)*
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.080 +/- 0.002 (lines: 370)
|
||||||
|
rg (ignore) (mmap) 0.396 +/- 0.006 (lines: 370)
|
||||||
|
rg (whitelist)* 0.070 +/- 0.001 (lines: 370)*
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.069 +/- 0.001 (lines: 16)*
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.299 +/- 0.018 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.167 +/- 0.002 (lines: 490)
|
||||||
|
rg (whitelist) 0.290 +/- 0.014 (lines: 419)
|
||||||
|
rg (whitelist) (ASCII)* 0.153 +/- 0.001 (lines: 419)*
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.071 +/- 0.000 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.061 +/- 0.001 (lines: 1630)*
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.165 +/- 0.001 (lines: 23)*
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg* 0.167 +/- 0.001 (lines: 103)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.076 +/- 0.000 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.076 +/- 0.001 (lines: 174)
|
||||||
|
rg (whitelist) 0.067 +/- 0.001 (lines: 180)
|
||||||
|
rg (whitelist) (ASCII)* 0.067 +/- 0.004 (lines: 168)*
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.071 +/- 0.001 (lines: 6)
|
||||||
|
rg (whitelist)* 0.062 +/- 0.001 (lines: 6)*
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.333 +/- 0.033 (lines: 848)
|
||||||
|
rg* 0.263 +/- 0.048 (lines: 848)*
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 2.255 +/- 0.030 (lines: 862)*
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.177 +/- 0.035 (lines: 629)*
|
||||||
|
rg (no mmap) 0.227 +/- 0.037 (lines: 629)
|
||||||
|
rg (lines) 0.256 +/- 0.018 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.366 +/- 0.056 (lines: 642)*
|
||||||
|
rg (lines) 0.457 +/- 0.035 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII) 0.262 +/- 0.015 (lines: 629)
|
||||||
|
rg* 0.237 +/- 0.018 (lines: 629)*
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 2.072 +/- 0.059 (lines: 13)
|
||||||
|
rg (ASCII)* 1.796 +/- 0.039 (lines: 13)*
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.259 +/- 0.029 (lines: 317)
|
||||||
|
rg (ASCII)* 0.211 +/- 0.007 (lines: 317)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.317 +/- 0.026 (lines: 691)
|
||||||
|
rg* 1.240 +/- 0.083 (lines: 691)*
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
rg* 3.781 +/- 0.010 (lines: 735)*
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.264 +/- 0.016 (lines: 583)*
|
||||||
|
rg (no mmap) 0.330 +/- 0.015 (lines: 583)
|
||||||
|
rg (lines) 0.333 +/- 0.025 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg* 1.105 +/- 0.060 (lines: 604)*
|
||||||
|
rg (lines) 1.178 +/- 0.027 (lines: 604)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.203 +/- 0.009 (lines: 0)*
|
||||||
|
rg 0.333 +/- 0.025 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.545 +/- 0.065 (lines: 41)
|
||||||
|
rg (ASCII)* 3.131 +/- 0.058 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.393 +/- 0.006 (lines: 278)*
|
||||||
59
benchsuite/runs/2018-01-08-archlinux-cheetah/README
Normal file
59
benchsuite/runs/2018-01-08-archlinux-cheetah/README
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
This directory contains updated benchmarks as of 2018-01-08. They were captured
|
||||||
|
via the benchsuite script at `benchsuite/benchsuite` from the root of this
|
||||||
|
repository. The command that was run:
|
||||||
|
|
||||||
|
$ ./benchsuite \
|
||||||
|
--dir /tmp/benchsuite \
|
||||||
|
--raw runs/2018-01-08-archlinux-cheetah/raw.csv \
|
||||||
|
--warmup-iter 1 \
|
||||||
|
--bench-iter 5
|
||||||
|
|
||||||
|
These results are most directly comparable to the
|
||||||
|
`2016-09-22-archlinux-cheetah` run in the parent directory.
|
||||||
|
|
||||||
|
The versions of each tool are as follows:
|
||||||
|
|
||||||
|
$ grep -V
|
||||||
|
grep (GNU grep) 3.1
|
||||||
|
|
||||||
|
$ ag -V
|
||||||
|
ag version 2.1.0
|
||||||
|
Features:
|
||||||
|
+jit +lzma +zlib
|
||||||
|
|
||||||
|
$ sift -V
|
||||||
|
sift 0.8.0 (linux/amd64)
|
||||||
|
built from commit 2ca94717 (which seems to be 0.9.0)
|
||||||
|
|
||||||
|
$ pt --version
|
||||||
|
pt version 2.1.4
|
||||||
|
|
||||||
|
$ ucg -V
|
||||||
|
UniversalCodeGrep 0.3.3
|
||||||
|
[...]
|
||||||
|
Build info
|
||||||
|
|
||||||
|
Repo version: 0.3.3-251-g9b5a3e3
|
||||||
|
|
||||||
|
Compiler info:
|
||||||
|
Name ($(CXX)): "g++ -std=gnu++1z"
|
||||||
|
Version string: "g++ (GCC) 7.2.1 20171224"
|
||||||
|
|
||||||
|
ISA extensions in use:
|
||||||
|
sse4.2: yes
|
||||||
|
popcnt: yes
|
||||||
|
|
||||||
|
libpcre info:
|
||||||
|
Not linked against libpcre.
|
||||||
|
|
||||||
|
libpcre2-8 info:
|
||||||
|
Version: 10.30 2017-08-14
|
||||||
|
JIT support built in?: yes
|
||||||
|
JIT target architecture: x86 64bit (little endian + unaligned)
|
||||||
|
Newline style: LF
|
||||||
|
|
||||||
|
The version of ripgrep was compiled from source on commit 85d463c0, with the
|
||||||
|
simd-accel and avx-accel features enabled:
|
||||||
|
|
||||||
|
$ export RUSTFLAGS="-C target-cpu=native"
|
||||||
|
$ cargo build --release --features 'simd-accel avx-accel'
|
||||||
806
benchsuite/runs/2018-01-08-archlinux-cheetah/raw.csv
Normal file
806
benchsuite/runs/2018-01-08-archlinux-cheetah/raw.csv
Normal file
@@ -0,0 +1,806 @@
|
|||||||
|
benchmark,warmup_iter,iter,name,command,duration,lines,env
|
||||||
|
linux_alternates,1,5,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10186767578125,68,
|
||||||
|
linux_alternates,1,5,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10199356079101562,68,
|
||||||
|
linux_alternates,1,5,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09750819206237793,68,
|
||||||
|
linux_alternates,1,5,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09634733200073242,68,
|
||||||
|
linux_alternates,1,5,rg (ignore),rg -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.10117292404174805,68,
|
||||||
|
linux_alternates,1,5,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.49642109870910645,68,
|
||||||
|
linux_alternates,1,5,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.48993706703186035,68,
|
||||||
|
linux_alternates,1,5,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.4837028980255127,68,
|
||||||
|
linux_alternates,1,5,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.4773833751678467,68,
|
||||||
|
linux_alternates,1,5,ag (ignore),ag -s ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.558436393737793,68,
|
||||||
|
linux_alternates,1,5,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2605454921722412,68,LC_ALL=C
|
||||||
|
linux_alternates,1,5,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.26748204231262207,68,LC_ALL=C
|
||||||
|
linux_alternates,1,5,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.26719212532043457,68,LC_ALL=C
|
||||||
|
linux_alternates,1,5,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2719383239746094,68,LC_ALL=C
|
||||||
|
linux_alternates,1,5,git grep (ignore),git grep -E -I -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.26963257789611816,68,LC_ALL=C
|
||||||
|
linux_alternates,1,5,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.08797001838684082,68,
|
||||||
|
linux_alternates,1,5,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09073781967163086,68,
|
||||||
|
linux_alternates,1,5,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0914468765258789,68,
|
||||||
|
linux_alternates,1,5,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09071612358093262,68,
|
||||||
|
linux_alternates,1,5,rg (whitelist),rg --no-ignore -n ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.0914316177368164,68,
|
||||||
|
linux_alternates,1,5,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1372535228729248,68,
|
||||||
|
linux_alternates,1,5,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.13880419731140137,68,
|
||||||
|
linux_alternates,1,5,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.13315439224243164,68,
|
||||||
|
linux_alternates,1,5,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1367807388305664,68,
|
||||||
|
linux_alternates,1,5,ucg (whitelist),ucg --nosmart-case ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.13135552406311035,68,
|
||||||
|
linux_alternates_casei,1,5,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.12781810760498047,160,
|
||||||
|
linux_alternates_casei,1,5,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.11988544464111328,160,
|
||||||
|
linux_alternates_casei,1,5,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1205439567565918,160,
|
||||||
|
linux_alternates_casei,1,5,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.12867259979248047,160,
|
||||||
|
linux_alternates_casei,1,5,rg (ignore),rg -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.1215970516204834,160,
|
||||||
|
linux_alternates_casei,1,5,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5444357395172119,160,
|
||||||
|
linux_alternates_casei,1,5,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5511739253997803,160,
|
||||||
|
linux_alternates_casei,1,5,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5382294654846191,160,
|
||||||
|
linux_alternates_casei,1,5,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.5499558448791504,160,
|
||||||
|
linux_alternates_casei,1,5,ag (ignore),ag -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.6376545429229736,160,
|
||||||
|
linux_alternates_casei,1,5,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.9767155647277832,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,5,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.920574426651001,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,5,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.9352290630340576,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,5,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.8866012096405029,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,5,git grep (ignore),git grep -E -I -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.9189445972442627,160,LC_ALL=C
|
||||||
|
linux_alternates_casei,1,5,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09351730346679688,160,
|
||||||
|
linux_alternates_casei,1,5,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09393739700317383,160,
|
||||||
|
linux_alternates_casei,1,5,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09986448287963867,160,
|
||||||
|
linux_alternates_casei,1,5,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09596824645996094,160,
|
||||||
|
linux_alternates_casei,1,5,rg (whitelist),rg --no-ignore -n -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.09604883193969727,160,
|
||||||
|
linux_alternates_casei,1,5,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.23943114280700684,160,
|
||||||
|
linux_alternates_casei,1,5,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2587015628814697,160,
|
||||||
|
linux_alternates_casei,1,5,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2543606758117676,160,
|
||||||
|
linux_alternates_casei,1,5,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.2490406036376953,160,
|
||||||
|
linux_alternates_casei,1,5,ucg (whitelist),ucg -i ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT,0.24046540260314941,160,
|
||||||
|
linux_literal,1,5,rg (ignore),rg -n PM_RESUME,0.08253765106201172,16,
|
||||||
|
linux_literal,1,5,rg (ignore),rg -n PM_RESUME,0.08176755905151367,16,
|
||||||
|
linux_literal,1,5,rg (ignore),rg -n PM_RESUME,0.08141684532165527,16,
|
||||||
|
linux_literal,1,5,rg (ignore),rg -n PM_RESUME,0.08108830451965332,16,
|
||||||
|
linux_literal,1,5,rg (ignore),rg -n PM_RESUME,0.08082938194274902,16,
|
||||||
|
linux_literal,1,5,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.6870582103729248,16,
|
||||||
|
linux_literal,1,5,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.807842493057251,16,
|
||||||
|
linux_literal,1,5,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.8129942417144775,16,
|
||||||
|
linux_literal,1,5,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.7582321166992188,16,
|
||||||
|
linux_literal,1,5,rg (ignore) (mmap),rg -n --mmap PM_RESUME,0.6869800090789795,16,
|
||||||
|
linux_literal,1,5,ag (ignore) (mmap),ag -s PM_RESUME,0.6534101963043213,16,
|
||||||
|
linux_literal,1,5,ag (ignore) (mmap),ag -s PM_RESUME,0.6020612716674805,16,
|
||||||
|
linux_literal,1,5,ag (ignore) (mmap),ag -s PM_RESUME,0.6712157726287842,16,
|
||||||
|
linux_literal,1,5,ag (ignore) (mmap),ag -s PM_RESUME,0.6267571449279785,16,
|
||||||
|
linux_literal,1,5,ag (ignore) (mmap),ag -s PM_RESUME,0.505136251449585,16,
|
||||||
|
linux_literal,1,5,pt (ignore),pt PM_RESUME,0.21415948867797852,16,
|
||||||
|
linux_literal,1,5,pt (ignore),pt PM_RESUME,0.19318318367004395,16,
|
||||||
|
linux_literal,1,5,pt (ignore),pt PM_RESUME,0.21352124214172363,16,
|
||||||
|
linux_literal,1,5,pt (ignore),pt PM_RESUME,0.18979454040527344,16,
|
||||||
|
linux_literal,1,5,pt (ignore),pt PM_RESUME,0.16629600524902344,16,
|
||||||
|
linux_literal,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.46967077255249023,16,
|
||||||
|
linux_literal,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.46343088150024414,16,
|
||||||
|
linux_literal,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.4723978042602539,16,
|
||||||
|
linux_literal,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.4741063117980957,16,
|
||||||
|
linux_literal,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git PM_RESUME,0.4613051414489746,16,
|
||||||
|
linux_literal,1,5,git grep (ignore),git grep -I -n PM_RESUME,0.20196986198425293,16,LC_ALL=C
|
||||||
|
linux_literal,1,5,git grep (ignore),git grep -I -n PM_RESUME,0.18932533264160156,16,LC_ALL=C
|
||||||
|
linux_literal,1,5,git grep (ignore),git grep -I -n PM_RESUME,0.19396305084228516,16,LC_ALL=C
|
||||||
|
linux_literal,1,5,git grep (ignore),git grep -I -n PM_RESUME,0.1952073574066162,16,LC_ALL=C
|
||||||
|
linux_literal,1,5,git grep (ignore),git grep -I -n PM_RESUME,0.20149731636047363,16,LC_ALL=C
|
||||||
|
linux_literal,1,5,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.08270478248596191,16,
|
||||||
|
linux_literal,1,5,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.08414745330810547,16,
|
||||||
|
linux_literal,1,5,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.08627724647521973,16,
|
||||||
|
linux_literal,1,5,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.08978700637817383,16,
|
||||||
|
linux_literal,1,5,rg (whitelist),rg -n --no-ignore -tall PM_RESUME,0.0836489200592041,16,
|
||||||
|
linux_literal,1,5,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.15774202346801758,16,
|
||||||
|
linux_literal,1,5,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.16005396842956543,16,
|
||||||
|
linux_literal,1,5,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.15743708610534668,16,
|
||||||
|
linux_literal,1,5,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.16156601905822754,16,
|
||||||
|
linux_literal,1,5,ucg (whitelist),ucg --nosmart-case PM_RESUME,0.1557624340057373,16,
|
||||||
|
linux_literal_casei,1,5,rg (ignore),rg -n -i PM_RESUME,0.1028127670288086,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore),rg -n -i PM_RESUME,0.10258054733276367,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore),rg -n -i PM_RESUME,0.10902261734008789,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore),rg -n -i PM_RESUME,0.10802555084228516,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore),rg -n -i PM_RESUME,0.10153412818908691,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.7902817726135254,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.7985179424285889,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.8208649158477783,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.7937076091766357,374,
|
||||||
|
linux_literal_casei,1,5,rg (ignore) (mmap),rg -n -i --mmap PM_RESUME,0.7936429977416992,374,
|
||||||
|
linux_literal_casei,1,5,ag (ignore) (mmap),ag -i PM_RESUME,0.5215470790863037,374,
|
||||||
|
linux_literal_casei,1,5,ag (ignore) (mmap),ag -i PM_RESUME,0.46518707275390625,374,
|
||||||
|
linux_literal_casei,1,5,ag (ignore) (mmap),ag -i PM_RESUME,0.4467353820800781,374,
|
||||||
|
linux_literal_casei,1,5,ag (ignore) (mmap),ag -i PM_RESUME,0.4595184326171875,374,
|
||||||
|
linux_literal_casei,1,5,ag (ignore) (mmap),ag -i PM_RESUME,0.4531285762786865,374,
|
||||||
|
linux_literal_casei,1,5,pt (ignore),pt -i PM_RESUME,14.187762022018433,374,
|
||||||
|
linux_literal_casei,1,5,pt (ignore),pt -i PM_RESUME,14.178058385848999,374,
|
||||||
|
linux_literal_casei,1,5,pt (ignore),pt -i PM_RESUME,14.096448421478271,374,
|
||||||
|
linux_literal_casei,1,5,pt (ignore),pt -i PM_RESUME,14.190524339675903,374,
|
||||||
|
linux_literal_casei,1,5,pt (ignore),pt -i PM_RESUME,14.231573343276978,374,
|
||||||
|
linux_literal_casei,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.4668574333190918,374,
|
||||||
|
linux_literal_casei,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.46050214767456055,374,
|
||||||
|
linux_literal_casei,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.46228861808776855,374,
|
||||||
|
linux_literal_casei,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.44957947731018066,374,
|
||||||
|
linux_literal_casei,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git PM_RESUME,0.4612581729888916,374,
|
||||||
|
linux_literal_casei,1,5,git grep (ignore),git grep -I -n -i PM_RESUME,0.1932981014251709,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,5,git grep (ignore),git grep -I -n -i PM_RESUME,0.20561552047729492,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,5,git grep (ignore),git grep -I -n -i PM_RESUME,0.19516706466674805,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,5,git grep (ignore),git grep -I -n -i PM_RESUME,0.20196247100830078,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,5,git grep (ignore),git grep -I -n -i PM_RESUME,0.19236421585083008,370,LC_ALL=C
|
||||||
|
linux_literal_casei,1,5,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.09555959701538086,370,
|
||||||
|
linux_literal_casei,1,5,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.09589338302612305,370,
|
||||||
|
linux_literal_casei,1,5,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.09479856491088867,370,
|
||||||
|
linux_literal_casei,1,5,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.09741568565368652,370,
|
||||||
|
linux_literal_casei,1,5,rg (whitelist),rg -n -i --no-ignore -tall PM_RESUME,0.10127615928649902,370,
|
||||||
|
linux_literal_casei,1,5,ucg (whitelist),ucg -i PM_RESUME,0.15514039993286133,370,
|
||||||
|
linux_literal_casei,1,5,ucg (whitelist),ucg -i PM_RESUME,0.15668940544128418,370,
|
||||||
|
linux_literal_casei,1,5,ucg (whitelist),ucg -i PM_RESUME,0.15429425239562988,370,
|
||||||
|
linux_literal_casei,1,5,ucg (whitelist),ucg -i PM_RESUME,0.15332818031311035,370,
|
||||||
|
linux_literal_casei,1,5,ucg (whitelist),ucg -i PM_RESUME,0.14861536026000977,370,
|
||||||
|
linux_literal_default,1,5,rg,rg PM_RESUME,0.08931398391723633,16,
|
||||||
|
linux_literal_default,1,5,rg,rg PM_RESUME,0.08717465400695801,16,
|
||||||
|
linux_literal_default,1,5,rg,rg PM_RESUME,0.0879361629486084,16,
|
||||||
|
linux_literal_default,1,5,rg,rg PM_RESUME,0.08688950538635254,16,
|
||||||
|
linux_literal_default,1,5,rg,rg PM_RESUME,0.09138607978820801,16,
|
||||||
|
linux_literal_default,1,5,ag,ag PM_RESUME,0.5342838764190674,16,
|
||||||
|
linux_literal_default,1,5,ag,ag PM_RESUME,0.47187042236328125,16,
|
||||||
|
linux_literal_default,1,5,ag,ag PM_RESUME,0.4456596374511719,16,
|
||||||
|
linux_literal_default,1,5,ag,ag PM_RESUME,0.4507424831390381,16,
|
||||||
|
linux_literal_default,1,5,ag,ag PM_RESUME,0.44472575187683105,16,
|
||||||
|
linux_literal_default,1,5,ucg,ucg PM_RESUME,0.15556907653808594,16,
|
||||||
|
linux_literal_default,1,5,ucg,ucg PM_RESUME,0.1533644199371338,16,
|
||||||
|
linux_literal_default,1,5,ucg,ucg PM_RESUME,0.15392351150512695,16,
|
||||||
|
linux_literal_default,1,5,ucg,ucg PM_RESUME,0.1535196304321289,16,
|
||||||
|
linux_literal_default,1,5,ucg,ucg PM_RESUME,0.15589547157287598,16,
|
||||||
|
linux_literal_default,1,5,pt,pt PM_RESUME,0.2261514663696289,16,
|
||||||
|
linux_literal_default,1,5,pt,pt PM_RESUME,0.2731902599334717,16,
|
||||||
|
linux_literal_default,1,5,pt,pt PM_RESUME,0.2563004493713379,16,
|
||||||
|
linux_literal_default,1,5,pt,pt PM_RESUME,0.2575085163116455,16,
|
||||||
|
linux_literal_default,1,5,pt,pt PM_RESUME,0.1724245548248291,16,
|
||||||
|
linux_literal_default,1,5,sift,sift PM_RESUME,0.13233542442321777,16,
|
||||||
|
linux_literal_default,1,5,sift,sift PM_RESUME,0.1256580352783203,16,
|
||||||
|
linux_literal_default,1,5,sift,sift PM_RESUME,0.12435102462768555,16,
|
||||||
|
linux_literal_default,1,5,sift,sift PM_RESUME,0.1259307861328125,16,
|
||||||
|
linux_literal_default,1,5,sift,sift PM_RESUME,0.12412142753601074,16,
|
||||||
|
linux_literal_default,1,5,git grep,git grep PM_RESUME,0.1742086410522461,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,5,git grep,git grep PM_RESUME,0.16890597343444824,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,5,git grep,git grep PM_RESUME,0.16680669784545898,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,5,git grep,git grep PM_RESUME,0.16899871826171875,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_literal_default,1,5,git grep,git grep PM_RESUME,0.19794917106628418,16,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,5,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.33940672874450684,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3274960517883301,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.32681775093078613,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.32865071296691895,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore),rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.3240926265716553,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.17426586151123047,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.17265701293945312,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1703634262084961,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.17192435264587402,490,
|
||||||
|
linux_no_literal,1,5,rg (ignore) (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.1704559326171875,490,
|
||||||
|
linux_no_literal,1,5,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.8443403244018555,766,
|
||||||
|
linux_no_literal,1,5,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.6956703662872314,766,
|
||||||
|
linux_no_literal,1,5,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.6938261985778809,766,
|
||||||
|
linux_no_literal,1,5,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.695967435836792,766,
|
||||||
|
linux_no_literal,1,5,ag (ignore) (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.6945271492004395,766,
|
||||||
|
linux_no_literal,1,5,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.645716428756714,490,
|
||||||
|
linux_no_literal,1,5,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.441533088684082,490,
|
||||||
|
linux_no_literal,1,5,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.472522735595703,490,
|
||||||
|
linux_no_literal,1,5,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.42497444152832,490,
|
||||||
|
linux_no_literal,1,5,pt (ignore) (ASCII),pt -e \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},12.407486200332642,490,
|
||||||
|
linux_no_literal,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},9.091489553451538,490,
|
||||||
|
linux_no_literal,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},9.049214124679565,490,
|
||||||
|
linux_no_literal,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.879419803619385,490,
|
||||||
|
linux_no_literal,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},9.07261848449707,490,
|
||||||
|
linux_no_literal,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.918747901916504,490,
|
||||||
|
linux_no_literal,1,5,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.334321975708008,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,5,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.993232727050781,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,5,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.622304916381836,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,5,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.35973048210144,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,5,git grep (ignore),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},8.39980435371399,490,LC_ALL=en_US.UTF-8
|
||||||
|
linux_no_literal,1,5,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},2.0318400859832764,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,5,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.8587837219238281,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,5,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.873384714126587,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,5,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.8111364841461182,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,5,git grep (ignore) (ASCII),git grep -E -I -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},1.8385357856750488,490,LC_ALL=C
|
||||||
|
linux_no_literal,1,5,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.28792643547058105,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.28545212745666504,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.28576135635375977,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.29883813858032227,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist),rg -n --no-ignore -tall \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.28493285179138184,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15974783897399902,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.15943312644958496,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.160233736038208,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16201996803283691,458,
|
||||||
|
linux_no_literal,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.16033530235290527,458,
|
||||||
|
linux_no_literal,1,5,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.4639148712158203,416,
|
||||||
|
linux_no_literal,1,5,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.46042823791503906,416,
|
||||||
|
linux_no_literal,1,5,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.45925426483154297,416,
|
||||||
|
linux_no_literal,1,5,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.477064847946167,416,
|
||||||
|
linux_no_literal,1,5,ucg (whitelist) (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5},0.507554292678833,416,
|
||||||
|
linux_re_literal_suffix,1,5,rg (ignore),rg -n [A-Z]+_RESUME,0.08520364761352539,1652,
|
||||||
|
linux_re_literal_suffix,1,5,rg (ignore),rg -n [A-Z]+_RESUME,0.08203816413879395,1652,
|
||||||
|
linux_re_literal_suffix,1,5,rg (ignore),rg -n [A-Z]+_RESUME,0.08355021476745605,1652,
|
||||||
|
linux_re_literal_suffix,1,5,rg (ignore),rg -n [A-Z]+_RESUME,0.0865166187286377,1652,
|
||||||
|
linux_re_literal_suffix,1,5,rg (ignore),rg -n [A-Z]+_RESUME,0.08125448226928711,1652,
|
||||||
|
linux_re_literal_suffix,1,5,ag (ignore),ag -s [A-Z]+_RESUME,0.4846627712249756,1652,
|
||||||
|
linux_re_literal_suffix,1,5,ag (ignore),ag -s [A-Z]+_RESUME,0.48070311546325684,1652,
|
||||||
|
linux_re_literal_suffix,1,5,ag (ignore),ag -s [A-Z]+_RESUME,0.4813041687011719,1652,
|
||||||
|
linux_re_literal_suffix,1,5,ag (ignore),ag -s [A-Z]+_RESUME,0.4755582809448242,1652,
|
||||||
|
linux_re_literal_suffix,1,5,ag (ignore),ag -s [A-Z]+_RESUME,0.4926290512084961,1652,
|
||||||
|
linux_re_literal_suffix,1,5,pt (ignore),pt -e [A-Z]+_RESUME,14.124520540237427,1652,
|
||||||
|
linux_re_literal_suffix,1,5,pt (ignore),pt -e [A-Z]+_RESUME,14.151537656784058,1652,
|
||||||
|
linux_re_literal_suffix,1,5,pt (ignore),pt -e [A-Z]+_RESUME,14.157994270324707,1652,
|
||||||
|
linux_re_literal_suffix,1,5,pt (ignore),pt -e [A-Z]+_RESUME,14.102291822433472,1652,
|
||||||
|
linux_re_literal_suffix,1,5,pt (ignore),pt -e [A-Z]+_RESUME,14.103861093521118,1652,
|
||||||
|
linux_re_literal_suffix,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,4.182392835617065,1652,
|
||||||
|
linux_re_literal_suffix,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,4.190829277038574,1652,
|
||||||
|
linux_re_literal_suffix,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,3.9770240783691406,1652,
|
||||||
|
linux_re_literal_suffix,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,3.9978606700897217,1652,
|
||||||
|
linux_re_literal_suffix,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git [A-Z]+_RESUME,4.146454572677612,1652,
|
||||||
|
linux_re_literal_suffix,1,5,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.5080702304840088,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,5,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.5281260013580322,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,5,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.5350546836853027,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,5,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.5474245548248291,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,5,git grep (ignore),git grep -E -I -n [A-Z]+_RESUME,0.5256762504577637,1652,LC_ALL=C
|
||||||
|
linux_re_literal_suffix,1,5,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.07924222946166992,1630,
|
||||||
|
linux_re_literal_suffix,1,5,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.0767812728881836,1630,
|
||||||
|
linux_re_literal_suffix,1,5,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.07874488830566406,1630,
|
||||||
|
linux_re_literal_suffix,1,5,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.0804905891418457,1630,
|
||||||
|
linux_re_literal_suffix,1,5,rg (whitelist),rg -n --no-ignore -tall [A-Z]+_RESUME,0.07479119300842285,1630,
|
||||||
|
linux_re_literal_suffix,1,5,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13643193244934082,1630,
|
||||||
|
linux_re_literal_suffix,1,5,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13543128967285156,1630,
|
||||||
|
linux_re_literal_suffix,1,5,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13312768936157227,1630,
|
||||||
|
linux_re_literal_suffix,1,5,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13562273979187012,1630,
|
||||||
|
linux_re_literal_suffix,1,5,ucg (whitelist),ucg --nosmart-case [A-Z]+_RESUME,0.13236212730407715,1630,
|
||||||
|
linux_unicode_greek,1,5,rg,rg -n \p{Greek},0.17355775833129883,23,
|
||||||
|
linux_unicode_greek,1,5,rg,rg -n \p{Greek},0.1676032543182373,23,
|
||||||
|
linux_unicode_greek,1,5,rg,rg -n \p{Greek},0.1727275848388672,23,
|
||||||
|
linux_unicode_greek,1,5,rg,rg -n \p{Greek},0.17095375061035156,23,
|
||||||
|
linux_unicode_greek,1,5,rg,rg -n \p{Greek},0.17271947860717773,23,
|
||||||
|
linux_unicode_greek,1,5,pt,pt -e \p{Greek},14.14364218711853,23,
|
||||||
|
linux_unicode_greek,1,5,pt,pt -e \p{Greek},14.137334108352661,23,
|
||||||
|
linux_unicode_greek,1,5,pt,pt -e \p{Greek},14.083475351333618,23,
|
||||||
|
linux_unicode_greek,1,5,pt,pt -e \p{Greek},14.095231056213379,23,
|
||||||
|
linux_unicode_greek,1,5,pt,pt -e \p{Greek},14.151906490325928,23,
|
||||||
|
linux_unicode_greek,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.8376963138580322,23,
|
||||||
|
linux_unicode_greek,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.8271427154541016,23,
|
||||||
|
linux_unicode_greek,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.8310961723327637,23,
|
||||||
|
linux_unicode_greek,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.826141595840454,23,
|
||||||
|
linux_unicode_greek,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \p{Greek},2.805818796157837,23,
|
||||||
|
linux_unicode_greek_casei,1,5,rg,rg -n -i \p{Greek},0.16843819618225098,103,
|
||||||
|
linux_unicode_greek_casei,1,5,rg,rg -n -i \p{Greek},0.1704998016357422,103,
|
||||||
|
linux_unicode_greek_casei,1,5,rg,rg -n -i \p{Greek},0.17055058479309082,103,
|
||||||
|
linux_unicode_greek_casei,1,5,rg,rg -n -i \p{Greek},0.17064881324768066,103,
|
||||||
|
linux_unicode_greek_casei,1,5,rg,rg -n -i \p{Greek},0.1699228286743164,103,
|
||||||
|
linux_unicode_greek_casei,1,5,pt,pt -i -e \p{Greek},14.164355993270874,23,
|
||||||
|
linux_unicode_greek_casei,1,5,pt,pt -i -e \p{Greek},14.099931478500366,23,
|
||||||
|
linux_unicode_greek_casei,1,5,pt,pt -i -e \p{Greek},14.155095338821411,23,
|
||||||
|
linux_unicode_greek_casei,1,5,pt,pt -i -e \p{Greek},14.109308004379272,23,
|
||||||
|
linux_unicode_greek_casei,1,5,pt,pt -i -e \p{Greek},14.072362422943115,23,
|
||||||
|
linux_unicode_greek_casei,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.003945589065551758,,
|
||||||
|
linux_unicode_greek_casei,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.004189729690551758,,
|
||||||
|
linux_unicode_greek_casei,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.0034589767456054688,,
|
||||||
|
linux_unicode_greek_casei,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.003614187240600586,,
|
||||||
|
linux_unicode_greek_casei,1,5,sift,sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -i --git \p{Greek},0.003975629806518555,,
|
||||||
|
linux_unicode_word,1,5,rg (ignore),rg -n \wAh,0.09798526763916016,186,
|
||||||
|
linux_unicode_word,1,5,rg (ignore),rg -n \wAh,0.09575009346008301,186,
|
||||||
|
linux_unicode_word,1,5,rg (ignore),rg -n \wAh,0.10181760787963867,186,
|
||||||
|
linux_unicode_word,1,5,rg (ignore),rg -n \wAh,0.09650158882141113,186,
|
||||||
|
linux_unicode_word,1,5,rg (ignore),rg -n \wAh,0.09717488288879395,186,
|
||||||
|
linux_unicode_word,1,5,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.09417867660522461,174,
|
||||||
|
linux_unicode_word,1,5,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.09903812408447266,174,
|
||||||
|
linux_unicode_word,1,5,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.09407877922058105,174,
|
||||||
|
linux_unicode_word,1,5,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.09681963920593262,174,
|
||||||
|
linux_unicode_word,1,5,rg (ignore) (ASCII),rg -n (?-u)\wAh,0.09762454032897949,174,
|
||||||
|
linux_unicode_word,1,5,ag (ignore) (ASCII),ag -s \wAh,0.5779609680175781,174,
|
||||||
|
linux_unicode_word,1,5,ag (ignore) (ASCII),ag -s \wAh,0.635645866394043,174,
|
||||||
|
linux_unicode_word,1,5,ag (ignore) (ASCII),ag -s \wAh,0.6109263896942139,174,
|
||||||
|
linux_unicode_word,1,5,ag (ignore) (ASCII),ag -s \wAh,0.6260912418365479,174,
|
||||||
|
linux_unicode_word,1,5,ag (ignore) (ASCII),ag -s \wAh,0.6823546886444092,174,
|
||||||
|
linux_unicode_word,1,5,pt (ignore) (ASCII),pt -e \wAh,14.178487062454224,174,
|
||||||
|
linux_unicode_word,1,5,pt (ignore) (ASCII),pt -e \wAh,14.190000057220459,174,
|
||||||
|
linux_unicode_word,1,5,pt (ignore) (ASCII),pt -e \wAh,14.16363000869751,174,
|
||||||
|
linux_unicode_word,1,5,pt (ignore) (ASCII),pt -e \wAh,14.160430431365967,174,
|
||||||
|
linux_unicode_word,1,5,pt (ignore) (ASCII),pt -e \wAh,14.2189621925354,174,
|
||||||
|
linux_unicode_word,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.17629337310791,174,
|
||||||
|
linux_unicode_word,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.051238059997559,174,
|
||||||
|
linux_unicode_word,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.323853015899658,174,
|
||||||
|
linux_unicode_word,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.085661172866821,174,
|
||||||
|
linux_unicode_word,1,5,sift (ignore) (ASCII),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n --git \wAh,4.036486625671387,174,
|
||||||
|
linux_unicode_word,1,5,git grep (ignore),git grep -E -I -n \wAh,4.620476961135864,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,5,git grep (ignore),git grep -E -I -n \wAh,4.536192417144775,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,5,git grep (ignore),git grep -E -I -n \wAh,4.510494232177734,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,5,git grep (ignore),git grep -E -I -n \wAh,6.001620769500732,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,5,git grep (ignore),git grep -E -I -n \wAh,4.602652311325073,186,LC_ALL=en_US.UTF-8
|
||||||
|
linux_unicode_word,1,5,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.3785994052886963,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,5,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.4163663387298584,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,5,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.402677297592163,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,5,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.3327512741088867,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,5,git grep (ignore) (ASCII),git grep -E -I -n \wAh,1.3501760959625244,174,LC_ALL=C
|
||||||
|
linux_unicode_word,1,5,rg (whitelist),rg -n --no-ignore -tall \wAh,0.07958698272705078,180,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist),rg -n --no-ignore -tall \wAh,0.0798649787902832,180,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist),rg -n --no-ignore -tall \wAh,0.08086204528808594,180,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist),rg -n --no-ignore -tall \wAh,0.0814356803894043,180,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist),rg -n --no-ignore -tall \wAh,0.08273720741271973,180,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.08280825614929199,168,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.08074021339416504,168,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.0821676254272461,168,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.07926368713378906,168,
|
||||||
|
linux_unicode_word,1,5,rg (whitelist) (ASCII),rg -n --no-ignore -tall (?-u)\wAh,0.08405280113220215,168,
|
||||||
|
linux_unicode_word,1,5,ucg (ASCII),ucg --nosmart-case \wAh,0.1545090675354004,168,
|
||||||
|
linux_unicode_word,1,5,ucg (ASCII),ucg --nosmart-case \wAh,0.1517190933227539,168,
|
||||||
|
linux_unicode_word,1,5,ucg (ASCII),ucg --nosmart-case \wAh,0.15704965591430664,168,
|
||||||
|
linux_unicode_word,1,5,ucg (ASCII),ucg --nosmart-case \wAh,0.15523767471313477,168,
|
||||||
|
linux_unicode_word,1,5,ucg (ASCII),ucg --nosmart-case \wAh,0.1582942008972168,168,
|
||||||
|
linux_word,1,5,rg (ignore),rg -n -w PM_RESUME,0.09102368354797363,6,
|
||||||
|
linux_word,1,5,rg (ignore),rg -n -w PM_RESUME,0.08986210823059082,6,
|
||||||
|
linux_word,1,5,rg (ignore),rg -n -w PM_RESUME,0.08989477157592773,6,
|
||||||
|
linux_word,1,5,rg (ignore),rg -n -w PM_RESUME,0.0895695686340332,6,
|
||||||
|
linux_word,1,5,rg (ignore),rg -n -w PM_RESUME,0.09547114372253418,6,
|
||||||
|
linux_word,1,5,ag (ignore),ag -s -w PM_RESUME,0.4948008060455322,6,
|
||||||
|
linux_word,1,5,ag (ignore),ag -s -w PM_RESUME,0.45710110664367676,6,
|
||||||
|
linux_word,1,5,ag (ignore),ag -s -w PM_RESUME,0.44803452491760254,6,
|
||||||
|
linux_word,1,5,ag (ignore),ag -s -w PM_RESUME,0.44779396057128906,6,
|
||||||
|
linux_word,1,5,ag (ignore),ag -s -w PM_RESUME,0.4563112258911133,6,
|
||||||
|
linux_word,1,5,pt (ignore),pt -w PM_RESUME,14.233235597610474,6,
|
||||||
|
linux_word,1,5,pt (ignore),pt -w PM_RESUME,14.277648687362671,6,
|
||||||
|
linux_word,1,5,pt (ignore),pt -w PM_RESUME,14.218127727508545,6,
|
||||||
|
linux_word,1,5,pt (ignore),pt -w PM_RESUME,14.171622037887573,6,
|
||||||
|
linux_word,1,5,pt (ignore),pt -w PM_RESUME,14.214240312576294,6,
|
||||||
|
linux_word,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.1536731719970703,6,
|
||||||
|
linux_word,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.2415099143981934,6,
|
||||||
|
linux_word,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.2526626586914062,6,
|
||||||
|
linux_word,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.2590816020965576,6,
|
||||||
|
linux_word,1,5,sift (ignore),sift --binary-skip --exclude-files .* --exclude-files *.pdf -n -w --git PM_RESUME,3.222473621368408,6,
|
||||||
|
linux_word,1,5,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.16982412338256836,6,LC_ALL=C
|
||||||
|
linux_word,1,5,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.16739583015441895,6,LC_ALL=C
|
||||||
|
linux_word,1,5,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.16866540908813477,6,LC_ALL=C
|
||||||
|
linux_word,1,5,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.18207120895385742,6,LC_ALL=C
|
||||||
|
linux_word,1,5,git grep (ignore),git grep -E -I -n -w PM_RESUME,0.17716264724731445,6,LC_ALL=C
|
||||||
|
linux_word,1,5,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.07490420341491699,6,
|
||||||
|
linux_word,1,5,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.07714152336120605,6,
|
||||||
|
linux_word,1,5,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.07552146911621094,6,
|
||||||
|
linux_word,1,5,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.07651710510253906,6,
|
||||||
|
linux_word,1,5,rg (whitelist),rg -n -w --no-ignore -tall PM_RESUME,0.0757131576538086,6,
|
||||||
|
linux_word,1,5,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.1530015468597412,6,
|
||||||
|
linux_word,1,5,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.15152239799499512,6,
|
||||||
|
linux_word,1,5,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.1571195125579834,6,
|
||||||
|
linux_word,1,5,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.15993595123291016,6,
|
||||||
|
linux_word,1,5,ucg (whitelist),ucg --nosmart-case -w PM_RESUME,0.15633797645568848,6,
|
||||||
|
subtitles_en_alternate,1,5,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.33371877670288086,848,
|
||||||
|
subtitles_en_alternate,1,5,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3207988739013672,848,
|
||||||
|
subtitles_en_alternate,1,5,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3301675319671631,848,
|
||||||
|
subtitles_en_alternate,1,5,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.29731154441833496,848,
|
||||||
|
subtitles_en_alternate,1,5,rg (lines),rg -n Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2711911201477051,848,
|
||||||
|
subtitles_en_alternate,1,5,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.186570405960083,848,
|
||||||
|
subtitles_en_alternate,1,5,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.1659939289093018,848,
|
||||||
|
subtitles_en_alternate,1,5,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.187847137451172,848,
|
||||||
|
subtitles_en_alternate,1,5,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.3522064685821533,848,
|
||||||
|
subtitles_en_alternate,1,5,ag (lines),ag -s Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.316105842590332,848,
|
||||||
|
subtitles_en_alternate,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1400718688964844,848,
|
||||||
|
subtitles_en_alternate,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1492774486541748,848,
|
||||||
|
subtitles_en_alternate,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1337254047393799,848,
|
||||||
|
subtitles_en_alternate,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1037378311157227,848,
|
||||||
|
subtitles_en_alternate,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1312851905822754,848,
|
||||||
|
subtitles_en_alternate,1,5,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8294000625610352,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.808884620666504,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8134734630584717,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8405649662017822,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep (lines),grep -E -an Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.8500289916992188,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21175312995910645,848,
|
||||||
|
subtitles_en_alternate,1,5,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2118232250213623,848,
|
||||||
|
subtitles_en_alternate,1,5,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21287035942077637,848,
|
||||||
|
subtitles_en_alternate,1,5,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21167230606079102,848,
|
||||||
|
subtitles_en_alternate,1,5,rg,rg Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.28102636337280273,848,
|
||||||
|
subtitles_en_alternate,1,5,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5029187202453613,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.49977445602417,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.508340835571289,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5002548694610596,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate,1,5,grep,grep -E -a Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.629526138305664,848,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,5,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.730497360229492,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.781018018722534,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.7858059406280518,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.7127914428710938,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ag (ASCII),ag -s -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.717308759689331,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.428208351135254,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.389420509338379,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.403301954269409,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.4691550731658936,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,ucg (ASCII),ucg -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.4245004653930664,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.978189706802368,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,5,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.974303722381592,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,5,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.982886552810669,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,5,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.90018630027771,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,5,grep (ASCII),grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.0078439712524414,862,LC_ALL=C
|
||||||
|
subtitles_en_alternate_casei,1,5,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9129142761230469,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9066660404205322,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.946380615234375,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9672930240631104,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,rg,rg -n -i Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.028451919555664,862,
|
||||||
|
subtitles_en_alternate_casei,1,5,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.9427030086517334,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,5,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.938739061355591,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,5,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.921248435974121,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,5,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.9194068908691406,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_alternate_casei,1,5,grep,grep -E -ani Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,2.917184829711914,862,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal,1,5,rg,rg Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.12293672561645508,629,
|
||||||
|
subtitles_en_literal,1,5,rg,rg Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1259000301361084,629,
|
||||||
|
subtitles_en_literal,1,5,rg,rg Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.12285709381103516,629,
|
||||||
|
subtitles_en_literal,1,5,rg,rg Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.12280964851379395,629,
|
||||||
|
subtitles_en_literal,1,5,rg,rg Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1547396183013916,629,
|
||||||
|
subtitles_en_literal,1,5,rg (no mmap),rg --no-mmap Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.22011375427246094,629,
|
||||||
|
subtitles_en_literal,1,5,rg (no mmap),rg --no-mmap Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23095202445983887,629,
|
||||||
|
subtitles_en_literal,1,5,rg (no mmap),rg --no-mmap Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2577846050262451,629,
|
||||||
|
subtitles_en_literal,1,5,rg (no mmap),rg --no-mmap Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2563819885253906,629,
|
||||||
|
subtitles_en_literal,1,5,rg (no mmap),rg --no-mmap Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.24869346618652344,629,
|
||||||
|
subtitles_en_literal,1,5,pt,pt -N Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.415337324142456,629,
|
||||||
|
subtitles_en_literal,1,5,pt,pt -N Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.4208543300628662,629,
|
||||||
|
subtitles_en_literal,1,5,pt,pt -N Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.416351079940796,629,
|
||||||
|
subtitles_en_literal,1,5,pt,pt -N Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.4270708560943604,629,
|
||||||
|
subtitles_en_literal,1,5,pt,pt -N Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.4243996143341064,629,
|
||||||
|
subtitles_en_literal,1,5,sift,sift Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2245020866394043,629,
|
||||||
|
subtitles_en_literal,1,5,sift,sift Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2382345199584961,629,
|
||||||
|
subtitles_en_literal,1,5,sift,sift Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.23533034324645996,629,
|
||||||
|
subtitles_en_literal,1,5,sift,sift Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2577829360961914,629,
|
||||||
|
subtitles_en_literal,1,5,sift,sift Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2599349021911621,629,
|
||||||
|
subtitles_en_literal,1,5,grep,grep -a Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4733700752258301,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep,grep -a Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4598572254180908,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep,grep -a Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5303301811218262,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep,grep -a Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4775106906890869,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep,grep -a Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4881136417388916,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,rg (lines),rg -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20051789283752441,629,
|
||||||
|
subtitles_en_literal,1,5,rg (lines),rg -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17326998710632324,629,
|
||||||
|
subtitles_en_literal,1,5,rg (lines),rg -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.20733428001403809,629,
|
||||||
|
subtitles_en_literal,1,5,rg (lines),rg -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.189713716506958,629,
|
||||||
|
subtitles_en_literal,1,5,rg (lines),rg -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17817258834838867,629,
|
||||||
|
subtitles_en_literal,1,5,ag (lines),ag -s Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5327835083007812,629,
|
||||||
|
subtitles_en_literal,1,5,ag (lines),ag -s Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5411181449890137,629,
|
||||||
|
subtitles_en_literal,1,5,ag (lines),ag -s Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.600783109664917,629,
|
||||||
|
subtitles_en_literal,1,5,ag (lines),ag -s Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5838911533355713,629,
|
||||||
|
subtitles_en_literal,1,5,ag (lines),ag -s Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6051928997039795,629,
|
||||||
|
subtitles_en_literal,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4090385437011719,629,
|
||||||
|
subtitles_en_literal,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3816399574279785,629,
|
||||||
|
subtitles_en_literal,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.38033008575439453,629,
|
||||||
|
subtitles_en_literal,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3731727600097656,629,
|
||||||
|
subtitles_en_literal,1,5,ucg (lines),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.38796329498291016,629,
|
||||||
|
subtitles_en_literal,1,5,pt (lines),pt Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.4102630615234375,629,
|
||||||
|
subtitles_en_literal,1,5,pt (lines),pt Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.4137451648712158,629,
|
||||||
|
subtitles_en_literal,1,5,pt (lines),pt Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.4649333953857422,629,
|
||||||
|
subtitles_en_literal,1,5,pt (lines),pt Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.430387258529663,629,
|
||||||
|
subtitles_en_literal,1,5,pt (lines),pt Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.541991949081421,629,
|
||||||
|
subtitles_en_literal,1,5,sift (lines),sift -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.6231405735015869,629,
|
||||||
|
subtitles_en_literal,1,5,sift (lines),sift -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5986526012420654,629,
|
||||||
|
subtitles_en_literal,1,5,sift (lines),sift -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5821917057037354,629,
|
||||||
|
subtitles_en_literal,1,5,sift (lines),sift -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.6045489311218262,629,
|
||||||
|
subtitles_en_literal,1,5,sift (lines),sift -n Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5986905097961426,629,
|
||||||
|
subtitles_en_literal,1,5,grep (lines),grep -an Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8278565406799316,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep (lines),grep -an Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.777052640914917,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep (lines),grep -an Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7619414329528809,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep (lines),grep -an Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8248744010925293,629,LC_ALL=C
|
||||||
|
subtitles_en_literal,1,5,grep (lines),grep -an Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.824932336807251,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,5,rg,rg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.2718961238861084,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg,rg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27082157135009766,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg,rg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.27086758613586426,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg,rg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.274705171585083,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg,rg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3337059020996094,642,
|
||||||
|
subtitles_en_literal_casei,1,5,grep,grep -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9112112522125244,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,5,grep,grep -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.907888650894165,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,5,grep,grep -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.912668228149414,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,5,grep,grep -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9082865715026855,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,5,grep,grep -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.9177796840667725,642,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_casei,1,5,grep (ASCII),grep -E -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.6020669937133789,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,5,grep (ASCII),grep -E -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.568228006362915,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,5,grep (ASCII),grep -E -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5648214817047119,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,5,grep (ASCII),grep -E -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5568234920501709,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,5,grep (ASCII),grep -E -ai Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.5588953495025635,642,LC_ALL=C
|
||||||
|
subtitles_en_literal_casei,1,5,rg (lines),rg -n -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3486766815185547,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg (lines),rg -n -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.34010815620422363,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg (lines),rg -n -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.33849263191223145,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg (lines),rg -n -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3917088508605957,642,
|
||||||
|
subtitles_en_literal_casei,1,5,rg (lines),rg -n -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.39266490936279297,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ag (lines) (ASCII),ag -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5564041137695312,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ag (lines) (ASCII),ag -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5533506870269775,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ag (lines) (ASCII),ag -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6205368041992188,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ag (lines) (ASCII),ag -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5530028343200684,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ag (lines) (ASCII),ag -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.6189889907836914,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3834850788116455,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.41916346549987793,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3895289897918701,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4278140068054199,642,
|
||||||
|
subtitles_en_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.4013493061065674,642,
|
||||||
|
subtitles_en_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17953085899353027,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17679834365844727,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17448186874389648,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.21117281913757324,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Sherlock Holmes(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1848156452178955,629,
|
||||||
|
subtitles_en_literal_word,1,5,ag (ASCII),ag -sw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5236153602600098,629,
|
||||||
|
subtitles_en_literal_word,1,5,ag (ASCII),ag -sw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.52512526512146,629,
|
||||||
|
subtitles_en_literal_word,1,5,ag (ASCII),ag -sw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5218794345855713,629,
|
||||||
|
subtitles_en_literal_word,1,5,ag (ASCII),ag -sw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5384306907653809,629,
|
||||||
|
subtitles_en_literal_word,1,5,ag (ASCII),ag -sw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5150353908538818,629,
|
||||||
|
subtitles_en_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3757903575897217,629,
|
||||||
|
subtitles_en_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3744041919708252,629,
|
||||||
|
subtitles_en_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.37261366844177246,629,
|
||||||
|
subtitles_en_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.40795230865478516,629,
|
||||||
|
subtitles_en_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.3868849277496338,629,
|
||||||
|
subtitles_en_literal_word,1,5,grep (ASCII),grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8265349864959717,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,5,grep (ASCII),grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8123743534088135,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,5,grep (ASCII),grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7669925689697266,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,5,grep (ASCII),grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.766636848449707,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,5,grep (ASCII),grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7665839195251465,629,LC_ALL=C
|
||||||
|
subtitles_en_literal_word,1,5,rg,rg -nw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1879115104675293,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg,rg -nw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18082356452941895,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg,rg -nw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18497347831726074,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg,rg -nw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1769394874572754,629,
|
||||||
|
subtitles_en_literal_word,1,5,rg,rg -nw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1917715072631836,629,
|
||||||
|
subtitles_en_literal_word,1,5,grep,grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8192996978759766,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,5,grep,grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.8193323612213135,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,5,grep,grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7837738990783691,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,5,grep,grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7639024257659912,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_literal_word,1,5,grep,grep -anw Sherlock Holmes /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.7634689807891846,629,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7922985553741455,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7885758876800537,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.802325963973999,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.792595386505127,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.7909605503082275,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5903098583221436,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5982813835144043,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5926671028137207,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.5976767539978027,13,
|
||||||
|
subtitles_en_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.593153953552246,13,
|
||||||
|
subtitles_en_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.614634275436401,48,
|
||||||
|
subtitles_en_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.574857473373413,48,
|
||||||
|
subtitles_en_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.54079270362854,48,
|
||||||
|
subtitles_en_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.600660800933838,48,
|
||||||
|
subtitles_en_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,6.531627178192139,48,
|
||||||
|
subtitles_en_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.361133337020874,13,
|
||||||
|
subtitles_en_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.456786870956421,13,
|
||||||
|
subtitles_en_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.403071403503418,13,
|
||||||
|
subtitles_en_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.398236274719238,13,
|
||||||
|
subtitles_en_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,5.348573923110962,13,
|
||||||
|
subtitles_en_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.5057969093322754,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.4157862663269043,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.471182346343994,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.4590909481048584,13,LC_ALL=C
|
||||||
|
subtitles_en_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.3759689331054688,13,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,5,rg,rg -n \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18518710136413574,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg,rg -n \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18791556358337402,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg,rg -n \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18598675727844238,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg,rg -n \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18552684783935547,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg,rg -n \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.19262075424194336,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,grep,grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1321008205413818,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,5,grep,grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0709969997406006,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,5,grep,grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.1117346286773682,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,5,grep,grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0880234241485596,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,5,grep,grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0745558738708496,317,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_en_surrounding_words,1,5,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.1827528476715088,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18874144554138184,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17983436584472656,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.18831133842468262,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,rg (ASCII),rg -n (?-u)\w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,0.17810606956481934,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.5957207679748535,323,
|
||||||
|
subtitles_en_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.627211570739746,323,
|
||||||
|
subtitles_en_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.554431200027466,323,
|
||||||
|
subtitles_en_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.492656469345093,323,
|
||||||
|
subtitles_en_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,4.443558216094971,323,
|
||||||
|
subtitles_en_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.522758722305298,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.502918004989624,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.6503307819366455,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.58940052986145,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,3.569624423980713,317,
|
||||||
|
subtitles_en_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0672054290771484,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0729331970214844,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.052501916885376,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0711696147918701,317,LC_ALL=C
|
||||||
|
subtitles_en_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Holmes\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.sample.en,1.0863316059112549,317,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0312588214874268,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.063939094543457,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0000121593475342,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9842438697814941,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg (lines),rg -n Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.95733642578125,691,
|
||||||
|
subtitles_ru_alternate,1,5,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7781903743743896,691,
|
||||||
|
subtitles_ru_alternate,1,5,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.861164093017578,691,
|
||||||
|
subtitles_ru_alternate,1,5,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.8268885612487793,691,
|
||||||
|
subtitles_ru_alternate,1,5,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.8621268272399902,691,
|
||||||
|
subtitles_ru_alternate,1,5,ag (lines),ag -s Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.8216166496276855,691,
|
||||||
|
subtitles_ru_alternate,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0069098472595215,691,
|
||||||
|
subtitles_ru_alternate,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.025178909301758,691,
|
||||||
|
subtitles_ru_alternate,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0631070137023926,691,
|
||||||
|
subtitles_ru_alternate,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0902633666992188,691,
|
||||||
|
subtitles_ru_alternate,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0272655487060547,691,
|
||||||
|
subtitles_ru_alternate,1,5,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.510146617889404,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.541701793670654,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.506088733673096,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.51838755607605,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep (lines),grep -E -an Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.486810684204102,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9679937362670898,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9942011833190918,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9233448505401611,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9294781684875488,691,
|
||||||
|
subtitles_ru_alternate,1,5,rg,rg Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8729774951934814,691,
|
||||||
|
subtitles_ru_alternate,1,5,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.100147485733032,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.075790166854858,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.069685220718384,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.0526063442230225,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate,1,5,grep,grep -E -a Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.129194498062134,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,5,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7894201278686523,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7878782749176025,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.796328544616699,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.8249149322509766,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ag (ASCII),ag -s -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.7949724197387695,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.075739622116089,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.013590097427368,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.012375593185425,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.023118495941162,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,ucg (ASCII),ucg -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0641982555389404,691,
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.467320442199707,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.486851692199707,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.479818344116211,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.516186475753784,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep (ASCII),grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,7.471773862838745,691,LC_ALL=C
|
||||||
|
subtitles_ru_alternate_casei,1,5,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,11.026185274124146,735,
|
||||||
|
subtitles_ru_alternate_casei,1,5,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,11.168465614318848,735,
|
||||||
|
subtitles_ru_alternate_casei,1,5,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,11.039950370788574,735,
|
||||||
|
subtitles_ru_alternate_casei,1,5,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,11.089850425720215,735,
|
||||||
|
subtitles_ru_alternate_casei,1,5,rg,rg -n -i Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,11.112446546554565,735,
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.822641849517822,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.808355331420898,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.80171275138855,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.794351577758789,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_alternate_casei,1,5,grep,grep -E -ani Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.844403266906738,735,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal,1,5,rg,rg Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.20681476593017578,583,
|
||||||
|
subtitles_ru_literal,1,5,rg,rg Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.190568208694458,583,
|
||||||
|
subtitles_ru_literal,1,5,rg,rg Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.18462657928466797,583,
|
||||||
|
subtitles_ru_literal,1,5,rg,rg Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.1873643398284912,583,
|
||||||
|
subtitles_ru_literal,1,5,rg,rg Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.20382428169250488,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (no mmap),rg --no-mmap Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3085510730743408,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (no mmap),rg --no-mmap Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.318758487701416,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (no mmap),rg --no-mmap Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3177149295806885,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (no mmap),rg --no-mmap Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.31236958503723145,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (no mmap),rg --no-mmap Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.31880998611450195,583,
|
||||||
|
subtitles_ru_literal,1,5,pt,pt -N Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.152938365936279,583,
|
||||||
|
subtitles_ru_literal,1,5,pt,pt -N Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.124867677688599,583,
|
||||||
|
subtitles_ru_literal,1,5,pt,pt -N Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.132290363311768,583,
|
||||||
|
subtitles_ru_literal,1,5,pt,pt -N Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.158328056335449,583,
|
||||||
|
subtitles_ru_literal,1,5,pt,pt -N Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.1022467613220215,583,
|
||||||
|
subtitles_ru_literal,1,5,sift,sift Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.807113409042358,583,
|
||||||
|
subtitles_ru_literal,1,5,sift,sift Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.8178558349609375,583,
|
||||||
|
subtitles_ru_literal,1,5,sift,sift Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.925220012664795,583,
|
||||||
|
subtitles_ru_literal,1,5,sift,sift Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.861236333847046,583,
|
||||||
|
subtitles_ru_literal,1,5,sift,sift Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.763278484344482,583,
|
||||||
|
subtitles_ru_literal,1,5,grep,grep -a Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.704503059387207,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep,grep -a Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6887199878692627,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep,grep -a Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7092702388763428,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep,grep -a Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6964359283447266,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep,grep -a Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6928379535675049,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,rg (lines),rg -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2646975517272949,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (lines),rg -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.26806163787841797,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (lines),rg -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2700214385986328,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (lines),rg -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2669072151184082,583,
|
||||||
|
subtitles_ru_literal,1,5,rg (lines),rg -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2656106948852539,583,
|
||||||
|
subtitles_ru_literal,1,5,ag (lines),ag -s Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.9972407817840576,583,
|
||||||
|
subtitles_ru_literal,1,5,ag (lines),ag -s Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.906053066253662,583,
|
||||||
|
subtitles_ru_literal,1,5,ag (lines),ag -s Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.864766836166382,583,
|
||||||
|
subtitles_ru_literal,1,5,ag (lines),ag -s Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.7820546627044678,583,
|
||||||
|
subtitles_ru_literal,1,5,ag (lines),ag -s Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.7599871158599854,583,
|
||||||
|
subtitles_ru_literal,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.411653995513916,583,
|
||||||
|
subtitles_ru_literal,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.394604206085205,583,
|
||||||
|
subtitles_ru_literal,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.362853765487671,583,
|
||||||
|
subtitles_ru_literal,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.4795477390289307,583,
|
||||||
|
subtitles_ru_literal,1,5,ucg (lines),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.4428844451904297,583,
|
||||||
|
subtitles_ru_literal,1,5,pt (lines),pt Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.122563123703003,583,
|
||||||
|
subtitles_ru_literal,1,5,pt (lines),pt Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.17008900642395,583,
|
||||||
|
subtitles_ru_literal,1,5,pt (lines),pt Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.1965367794036865,583,
|
||||||
|
subtitles_ru_literal,1,5,pt (lines),pt Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.152370929718018,583,
|
||||||
|
subtitles_ru_literal,1,5,pt (lines),pt Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,5.106513738632202,583,
|
||||||
|
subtitles_ru_literal,1,5,sift (lines),sift -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.408761978149414,583,
|
||||||
|
subtitles_ru_literal,1,5,sift (lines),sift -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.423579454421997,583,
|
||||||
|
subtitles_ru_literal,1,5,sift (lines),sift -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.2807464599609375,583,
|
||||||
|
subtitles_ru_literal,1,5,sift (lines),sift -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.3771467208862305,583,
|
||||||
|
subtitles_ru_literal,1,5,sift (lines),sift -n Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.378506422042847,583,
|
||||||
|
subtitles_ru_literal,1,5,grep (lines),grep -an Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.121800422668457,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep (lines),grep -an Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1189923286437988,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep (lines),grep -an Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0678138732910156,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep (lines),grep -an Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0668041706085205,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal,1,5,grep (lines),grep -an Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0713574886322021,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,5,rg,rg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9427816867828369,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg,rg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0397350788116455,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg,rg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9732518196105957,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg,rg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9387776851654053,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg,rg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.9536802768707275,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,grep,grep -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.338641405105591,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,5,grep,grep -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.280565023422241,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,5,grep,grep -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.241750240325928,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,5,grep,grep -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.316105604171753,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,5,grep,grep -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,6.307560205459595,604,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_casei,1,5,grep (ASCII),grep -E -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7379302978515625,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,5,grep (ASCII),grep -E -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7226619720458984,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,5,grep (ASCII),grep -E -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.683293342590332,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,5,grep (ASCII),grep -E -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.714146614074707,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,5,grep (ASCII),grep -E -ai Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7654330730438232,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_casei,1,5,rg (lines),rg -n -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0237820148468018,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg (lines),rg -n -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0194151401519775,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg (lines),rg -n -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0364336967468262,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg (lines),rg -n -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.035005807876587,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,rg (lines),rg -n -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0438766479492188,604,
|
||||||
|
subtitles_ru_literal_casei,1,5,ag (lines) (ASCII),ag -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.619025468826294,,
|
||||||
|
subtitles_ru_literal_casei,1,5,ag (lines) (ASCII),ag -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.647244930267334,,
|
||||||
|
subtitles_ru_literal_casei,1,5,ag (lines) (ASCII),ag -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6785612106323242,,
|
||||||
|
subtitles_ru_literal_casei,1,5,ag (lines) (ASCII),ag -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6503715515136719,,
|
||||||
|
subtitles_ru_literal_casei,1,5,ag (lines) (ASCII),ag -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6314499378204346,,
|
||||||
|
subtitles_ru_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.8302316665649414,583,
|
||||||
|
subtitles_ru_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7719593048095703,583,
|
||||||
|
subtitles_ru_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7697594165802002,583,
|
||||||
|
subtitles_ru_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7312629222869873,583,
|
||||||
|
subtitles_ru_literal_casei,1,5,ucg (lines) (ASCII),ucg -i Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.767866849899292,583,
|
||||||
|
subtitles_ru_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.19411826133728027,,
|
||||||
|
subtitles_ru_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.18651676177978516,,
|
||||||
|
subtitles_ru_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.19614577293395996,,
|
||||||
|
subtitles_ru_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.18459081649780273,,
|
||||||
|
subtitles_ru_literal_word,1,5,rg (ASCII),rg -n (?-u:\b)Шерлок Холмс(?-u:\b) /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.1797487735748291,,
|
||||||
|
subtitles_ru_literal_word,1,5,ag (ASCII),ag -sw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6507105827331543,,
|
||||||
|
subtitles_ru_literal_word,1,5,ag (ASCII),ag -sw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6480035781860352,,
|
||||||
|
subtitles_ru_literal_word,1,5,ag (ASCII),ag -sw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.7138750553131104,,
|
||||||
|
subtitles_ru_literal_word,1,5,ag (ASCII),ag -sw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6521759033203125,,
|
||||||
|
subtitles_ru_literal_word,1,5,ag (ASCII),ag -sw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.6728894710540771,,
|
||||||
|
subtitles_ru_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.3646819591522217,583,
|
||||||
|
subtitles_ru_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.3836848735809326,583,
|
||||||
|
subtitles_ru_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.419490337371826,583,
|
||||||
|
subtitles_ru_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.363335609436035,583,
|
||||||
|
subtitles_ru_literal_word,1,5,ucg (ASCII),ucg --nosmart-case Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.488351345062256,583,
|
||||||
|
subtitles_ru_literal_word,1,5,grep (ASCII),grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.171506643295288,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,5,grep (ASCII),grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.1602776050567627,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,5,grep (ASCII),grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.084787368774414,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,5,grep (ASCII),grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0714166164398193,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,5,grep (ASCII),grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.083632469177246,583,LC_ALL=C
|
||||||
|
subtitles_ru_literal_word,1,5,rg,rg -nw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2769143581390381,579,
|
||||||
|
subtitles_ru_literal_word,1,5,rg,rg -nw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2694058418273926,579,
|
||||||
|
subtitles_ru_literal_word,1,5,rg,rg -nw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.26763367652893066,579,
|
||||||
|
subtitles_ru_literal_word,1,5,rg,rg -nw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2671318054199219,579,
|
||||||
|
subtitles_ru_literal_word,1,5,rg,rg -nw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2922348976135254,579,
|
||||||
|
subtitles_ru_literal_word,1,5,grep,grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.083528757095337,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,5,grep,grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0857081413269043,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,5,grep,grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.07025146484375,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,5,grep,grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.071930170059204,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_literal_word,1,5,grep,grep -anw Шерлок Холмс /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.0709245204925537,579,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1552906036376953,41,
|
||||||
|
subtitles_ru_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.164951801300049,41,
|
||||||
|
subtitles_ru_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.175389289855957,41,
|
||||||
|
subtitles_ru_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.1861774921417236,41,
|
||||||
|
subtitles_ru_no_literal,1,5,rg,rg -n \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,3.153625011444092,41,
|
||||||
|
subtitles_ru_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.7353317737579346,,
|
||||||
|
subtitles_ru_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.7592883110046387,,
|
||||||
|
subtitles_ru_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.7242491245269775,,
|
||||||
|
subtitles_ru_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.747089385986328,,
|
||||||
|
subtitles_ru_no_literal,1,5,rg (ASCII),rg -n (?-u)\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.732586145401001,,
|
||||||
|
subtitles_ru_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0796375274658203,,
|
||||||
|
subtitles_ru_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9670393466949463,,
|
||||||
|
subtitles_ru_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9413447380065918,,
|
||||||
|
subtitles_ru_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.916764497756958,,
|
||||||
|
subtitles_ru_no_literal,1,5,ag (ASCII),ag -s \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9110031127929688,,
|
||||||
|
subtitles_ru_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0622072219848633,,
|
||||||
|
subtitles_ru_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0975682735443115,,
|
||||||
|
subtitles_ru_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0741493701934814,,
|
||||||
|
subtitles_ru_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0423810482025146,,
|
||||||
|
subtitles_ru_no_literal,1,5,ucg (ASCII),ucg --nosmart-case \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.000764846801758,,
|
||||||
|
subtitles_ru_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6251120567321777,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.644089698791504,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6416165828704834,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6321892738342285,,LC_ALL=C
|
||||||
|
subtitles_ru_no_literal,1,5,grep (ASCII),grep -E -an \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5} /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.6264762878417969,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,5,rg,rg -n \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.29879307746887207,278,
|
||||||
|
subtitles_ru_surrounding_words,1,5,rg,rg -n \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.3226010799407959,278,
|
||||||
|
subtitles_ru_surrounding_words,1,5,rg,rg -n \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.32187771797180176,278,
|
||||||
|
subtitles_ru_surrounding_words,1,5,rg,rg -n \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.2825047969818115,278,
|
||||||
|
subtitles_ru_surrounding_words,1,5,rg,rg -n \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,0.283217191696167,278,
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep,grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3977878093719482,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep,grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4288139343261719,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep,grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4054889678955078,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep,grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.4003441333770752,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep,grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.5269148349761963,278,LC_ALL=en_US.UTF-8
|
||||||
|
subtitles_ru_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8912529945373535,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9221522808074951,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9416618347167969,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.893650770187378,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ag (ASCII),ag -s \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.8895554542541504,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0110745429992676,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.9790067672729492,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.0426392555236816,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.121723175048828,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,ucg (ASCII),ucg --nosmart-case \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,2.1247596740722656,,
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3579976558685303,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.382859468460083,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.393401861190796,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.474374532699585,,LC_ALL=C
|
||||||
|
subtitles_ru_surrounding_words,1,5,grep (ASCII),grep -E -an \w+\s+Холмс\s+\w+ /tmp/benchsuite/subtitles/OpenSubtitles2016.raw.ru,1.3835601806640625,,LC_ALL=C
|
||||||
|
235
benchsuite/runs/2018-01-08-archlinux-cheetah/summary
Normal file
235
benchsuite/runs/2018-01-08-archlinux-cheetah/summary
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
linux_alternates (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.100 +/- 0.003 (lines: 68)
|
||||||
|
ag (ignore) 0.501 +/- 0.033 (lines: 68)
|
||||||
|
git grep (ignore) 0.267 +/- 0.004 (lines: 68)
|
||||||
|
rg (whitelist)* 0.090 +/- 0.001 (lines: 68)*
|
||||||
|
ucg (whitelist) 0.135 +/- 0.003 (lines: 68)
|
||||||
|
|
||||||
|
linux_alternates_casei (pattern: ERR_SYS|PME_TURN_OFF|LINK_REQ_RST|CFG_BME_EVT)
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
rg (ignore) 0.124 +/- 0.004 (lines: 160)
|
||||||
|
ag (ignore) 0.564 +/- 0.041 (lines: 160)
|
||||||
|
git grep (ignore) 0.928 +/- 0.033 (lines: 160)
|
||||||
|
rg (whitelist)* 0.096 +/- 0.003 (lines: 160)*
|
||||||
|
ucg (whitelist) 0.248 +/- 0.008 (lines: 160)
|
||||||
|
|
||||||
|
linux_literal (pattern: PM_RESUME)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore)* 0.082 +/- 0.001 (lines: 16)*
|
||||||
|
rg (ignore) (mmap) 0.751 +/- 0.062 (lines: 16)
|
||||||
|
ag (ignore) (mmap) 0.612 +/- 0.065 (lines: 16)
|
||||||
|
pt (ignore) 0.195 +/- 0.020 (lines: 16)
|
||||||
|
sift (ignore) 0.468 +/- 0.006 (lines: 16)
|
||||||
|
git grep (ignore) 0.196 +/- 0.005 (lines: 16)
|
||||||
|
rg (whitelist) 0.085 +/- 0.003 (lines: 16)
|
||||||
|
ucg (whitelist) 0.159 +/- 0.002 (lines: 16)
|
||||||
|
|
||||||
|
linux_literal_casei (pattern: PM_RESUME)
|
||||||
|
----------------------------------------
|
||||||
|
rg (ignore) 0.105 +/- 0.003 (lines: 374)
|
||||||
|
rg (ignore) (mmap) 0.799 +/- 0.012 (lines: 374)
|
||||||
|
ag (ignore) (mmap) 0.469 +/- 0.030 (lines: 374)
|
||||||
|
pt (ignore) 14.177 +/- 0.049 (lines: 374)
|
||||||
|
sift (ignore) 0.460 +/- 0.006 (lines: 374)
|
||||||
|
git grep (ignore) 0.198 +/- 0.006 (lines: 370)
|
||||||
|
rg (whitelist)* 0.097 +/- 0.003 (lines: 370)*
|
||||||
|
ucg (whitelist) 0.154 +/- 0.003 (lines: 370)
|
||||||
|
|
||||||
|
linux_literal_default (pattern: PM_RESUME)
|
||||||
|
------------------------------------------
|
||||||
|
rg* 0.089 +/- 0.002 (lines: 16)*
|
||||||
|
ag 0.469 +/- 0.038 (lines: 16)
|
||||||
|
ucg 0.154 +/- 0.001 (lines: 16)
|
||||||
|
pt 0.237 +/- 0.040 (lines: 16)
|
||||||
|
sift 0.126 +/- 0.003 (lines: 16)
|
||||||
|
git grep 0.175 +/- 0.013 (lines: 16)
|
||||||
|
|
||||||
|
linux_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
rg (ignore) 0.329 +/- 0.006 (lines: 490)
|
||||||
|
rg (ignore) (ASCII) 0.172 +/- 0.002 (lines: 490)
|
||||||
|
ag (ignore) (ASCII) 0.725 +/- 0.067 (lines: 766)
|
||||||
|
pt (ignore) (ASCII) 12.478 +/- 0.097 (lines: 490)
|
||||||
|
sift (ignore) (ASCII) 9.002 +/- 0.096 (lines: 490)
|
||||||
|
git grep (ignore) 8.542 +/- 0.277 (lines: 490)
|
||||||
|
git grep (ignore) (ASCII) 1.883 +/- 0.087 (lines: 490)
|
||||||
|
rg (whitelist) 0.289 +/- 0.006 (lines: 458)
|
||||||
|
rg (whitelist) (ASCII)* 0.160 +/- 0.001 (lines: 458)*
|
||||||
|
ucg (whitelist) (ASCII) 0.474 +/- 0.020 (lines: 416)
|
||||||
|
|
||||||
|
linux_re_literal_suffix (pattern: [A-Z]+_RESUME)
|
||||||
|
------------------------------------------------
|
||||||
|
rg (ignore) 0.084 +/- 0.002 (lines: 1652)
|
||||||
|
ag (ignore) 0.483 +/- 0.006 (lines: 1652)
|
||||||
|
pt (ignore) 14.128 +/- 0.026 (lines: 1652)
|
||||||
|
sift (ignore) 4.099 +/- 0.103 (lines: 1652)
|
||||||
|
git grep (ignore) 0.529 +/- 0.014 (lines: 1652)
|
||||||
|
rg (whitelist)* 0.078 +/- 0.002 (lines: 1630)*
|
||||||
|
ucg (whitelist) 0.135 +/- 0.002 (lines: 1630)
|
||||||
|
|
||||||
|
linux_unicode_greek (pattern: \p{Greek})
|
||||||
|
----------------------------------------
|
||||||
|
rg* 0.172 +/- 0.002 (lines: 23)*
|
||||||
|
pt 14.122 +/- 0.031 (lines: 23)
|
||||||
|
sift 2.826 +/- 0.012 (lines: 23)
|
||||||
|
|
||||||
|
linux_unicode_greek_casei (pattern: \p{Greek})
|
||||||
|
----------------------------------------------
|
||||||
|
rg 0.170 +/- 0.001 (lines: 103)
|
||||||
|
pt 14.120 +/- 0.039 (lines: 23)
|
||||||
|
sift* 0.004 +/- 0.000 (lines: 0)*
|
||||||
|
|
||||||
|
linux_unicode_word (pattern: \wAh)
|
||||||
|
----------------------------------
|
||||||
|
rg (ignore) 0.098 +/- 0.002 (lines: 186)
|
||||||
|
rg (ignore) (ASCII) 0.096 +/- 0.002 (lines: 174)
|
||||||
|
ag (ignore) (ASCII) 0.627 +/- 0.038 (lines: 174)
|
||||||
|
pt (ignore) (ASCII) 14.182 +/- 0.024 (lines: 174)
|
||||||
|
sift (ignore) (ASCII) 4.135 +/- 0.119 (lines: 174)
|
||||||
|
git grep (ignore) 4.854 +/- 0.643 (lines: 186)
|
||||||
|
git grep (ignore) (ASCII) 1.376 +/- 0.035 (lines: 174)
|
||||||
|
rg (whitelist) 0.081 +/- 0.001 (lines: 180)*
|
||||||
|
rg (whitelist) (ASCII)* 0.082 +/- 0.002 (lines: 168)
|
||||||
|
ucg (ASCII) 0.155 +/- 0.003 (lines: 168)
|
||||||
|
|
||||||
|
linux_word (pattern: PM_RESUME)
|
||||||
|
-------------------------------
|
||||||
|
rg (ignore) 0.091 +/- 0.002 (lines: 6)
|
||||||
|
ag (ignore) 0.461 +/- 0.020 (lines: 6)
|
||||||
|
pt (ignore) 14.223 +/- 0.038 (lines: 6)
|
||||||
|
sift (ignore) 3.226 +/- 0.043 (lines: 6)
|
||||||
|
git grep (ignore) 0.173 +/- 0.006 (lines: 6)
|
||||||
|
rg (whitelist)* 0.076 +/- 0.001 (lines: 6)*
|
||||||
|
ucg (whitelist) 0.156 +/- 0.003 (lines: 6)
|
||||||
|
|
||||||
|
subtitles_en_alternate (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 0.311 +/- 0.026 (lines: 848)
|
||||||
|
ag (lines) 2.242 +/- 0.086 (lines: 848)
|
||||||
|
ucg (lines) 1.132 +/- 0.017 (lines: 848)
|
||||||
|
grep (lines) 1.828 +/- 0.017 (lines: 848)
|
||||||
|
rg* 0.226 +/- 0.031 (lines: 848)*
|
||||||
|
grep 1.528 +/- 0.057 (lines: 848)
|
||||||
|
|
||||||
|
subtitles_en_alternate_casei (pattern: Sherlock Holmes|John Watson|Irene Adler|Inspector Lestrade|Professor Moriarty)
|
||||||
|
---------------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 3.745 +/- 0.035 (lines: 862)
|
||||||
|
ucg (ASCII) 2.423 +/- 0.030 (lines: 862)
|
||||||
|
grep (ASCII) 2.969 +/- 0.040 (lines: 862)
|
||||||
|
rg* 1.952 +/- 0.049 (lines: 862)*
|
||||||
|
grep 2.928 +/- 0.012 (lines: 862)
|
||||||
|
|
||||||
|
subtitles_en_literal (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------
|
||||||
|
rg* 0.130 +/- 0.014 (lines: 629)*
|
||||||
|
rg (no mmap) 0.243 +/- 0.017 (lines: 629)
|
||||||
|
pt 1.421 +/- 0.005 (lines: 629)
|
||||||
|
sift 0.243 +/- 0.015 (lines: 629)
|
||||||
|
grep 0.486 +/- 0.027 (lines: 629)
|
||||||
|
rg (lines) 0.190 +/- 0.014 (lines: 629)
|
||||||
|
ag (lines) 1.573 +/- 0.034 (lines: 629)
|
||||||
|
ucg (lines) 0.386 +/- 0.014 (lines: 629)
|
||||||
|
pt (lines) 1.452 +/- 0.055 (lines: 629)
|
||||||
|
sift (lines) 0.601 +/- 0.015 (lines: 629)
|
||||||
|
grep (lines) 0.803 +/- 0.031 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_literal_casei (pattern: Sherlock Holmes)
|
||||||
|
-----------------------------------------------------
|
||||||
|
rg* 0.284 +/- 0.028 (lines: 642)*
|
||||||
|
grep 1.912 +/- 0.004 (lines: 642)
|
||||||
|
grep (ASCII) 0.570 +/- 0.018 (lines: 642)
|
||||||
|
rg (lines) 0.362 +/- 0.028 (lines: 642)
|
||||||
|
ag (lines) (ASCII) 1.580 +/- 0.036 (lines: 642)
|
||||||
|
ucg (lines) (ASCII) 0.404 +/- 0.019 (lines: 642)
|
||||||
|
|
||||||
|
subtitles_en_literal_word (pattern: Sherlock Holmes)
|
||||||
|
----------------------------------------------------
|
||||||
|
rg (ASCII)* 0.185 +/- 0.015 (lines: 629)
|
||||||
|
ag (ASCII) 1.525 +/- 0.009 (lines: 629)
|
||||||
|
ucg (ASCII) 0.384 +/- 0.015 (lines: 629)
|
||||||
|
grep (ASCII) 0.788 +/- 0.029 (lines: 629)
|
||||||
|
rg 0.184 +/- 0.006 (lines: 629)*
|
||||||
|
grep 0.790 +/- 0.028 (lines: 629)
|
||||||
|
|
||||||
|
subtitles_en_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 1.793 +/- 0.005 (lines: 13)
|
||||||
|
rg (ASCII)* 1.594 +/- 0.003 (lines: 13)*
|
||||||
|
ag (ASCII) 6.573 +/- 0.036 (lines: 48)
|
||||||
|
ucg (ASCII) 5.394 +/- 0.042 (lines: 13)
|
||||||
|
grep (ASCII) 3.446 +/- 0.050 (lines: 13)
|
||||||
|
|
||||||
|
subtitles_en_surrounding_words (pattern: \w+\s+Holmes\s+\w+)
|
||||||
|
------------------------------------------------------------
|
||||||
|
rg 0.187 +/- 0.003 (lines: 317)
|
||||||
|
grep 1.095 +/- 0.026 (lines: 317)
|
||||||
|
rg (ASCII)* 0.184 +/- 0.005 (lines: 317)*
|
||||||
|
ag (ASCII) 4.543 +/- 0.075 (lines: 323)
|
||||||
|
ucg (ASCII) 3.567 +/- 0.058 (lines: 317)
|
||||||
|
grep (ASCII) 1.070 +/- 0.012 (lines: 317)
|
||||||
|
|
||||||
|
subtitles_ru_alternate (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
rg (lines) 1.007 +/- 0.041 (lines: 691)
|
||||||
|
ag (lines) 3.830 +/- 0.035 (lines: 691)
|
||||||
|
ucg (lines) 2.043 +/- 0.034 (lines: 691)
|
||||||
|
grep (lines) 7.513 +/- 0.020 (lines: 691)
|
||||||
|
rg* 0.938 +/- 0.046 (lines: 691)*
|
||||||
|
grep 7.085 +/- 0.030 (lines: 691)
|
||||||
|
|
||||||
|
subtitles_ru_alternate_casei (pattern: Шерлок Холмс|Джон Уотсон|Ирен Адлер|инспектор Лестрейд|профессор Мориарти)
|
||||||
|
-----------------------------------------------------------------------------------------------------------------
|
||||||
|
ag (ASCII) 3.799 +/- 0.015 (lines: 691)
|
||||||
|
ucg (ASCII)* 2.038 +/- 0.030 (lines: 691)*
|
||||||
|
grep (ASCII) 7.484 +/- 0.019 (lines: 691)
|
||||||
|
rg 11.087 +/- 0.057 (lines: 735)
|
||||||
|
grep 6.814 +/- 0.020 (lines: 735)
|
||||||
|
|
||||||
|
subtitles_ru_literal (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------
|
||||||
|
rg* 0.195 +/- 0.010 (lines: 583)*
|
||||||
|
rg (no mmap) 0.315 +/- 0.005 (lines: 583)
|
||||||
|
pt 5.134 +/- 0.023 (lines: 583)
|
||||||
|
sift 5.835 +/- 0.061 (lines: 583)
|
||||||
|
grep 0.698 +/- 0.008 (lines: 583)
|
||||||
|
rg (lines) 0.267 +/- 0.002 (lines: 583)
|
||||||
|
ag (lines) 2.862 +/- 0.096 (lines: 583)
|
||||||
|
ucg (lines) 2.418 +/- 0.045 (lines: 583)
|
||||||
|
pt (lines) 5.150 +/- 0.036 (lines: 583)
|
||||||
|
sift (lines) 6.374 +/- 0.056 (lines: 583)
|
||||||
|
grep (lines) 1.089 +/- 0.028 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_casei (pattern: Шерлок Холмс)
|
||||||
|
--------------------------------------------------
|
||||||
|
rg 0.970 +/- 0.041 (lines: 604)
|
||||||
|
grep 6.297 +/- 0.037 (lines: 604)
|
||||||
|
grep (ASCII) 0.725 +/- 0.030 (lines: 583)
|
||||||
|
rg (lines) 1.032 +/- 0.010 (lines: 604)
|
||||||
|
ag (lines) (ASCII)* 0.645 +/- 0.022 (lines: 0)*
|
||||||
|
ucg (lines) (ASCII) 0.774 +/- 0.036 (lines: 583)
|
||||||
|
|
||||||
|
subtitles_ru_literal_word (pattern: Шерлок Холмс)
|
||||||
|
-------------------------------------------------
|
||||||
|
rg (ASCII)* 0.188 +/- 0.007 (lines: 0)*
|
||||||
|
ag (ASCII) 0.668 +/- 0.028 (lines: 0)
|
||||||
|
ucg (ASCII) 2.404 +/- 0.052 (lines: 583)
|
||||||
|
grep (ASCII) 1.114 +/- 0.048 (lines: 583)
|
||||||
|
rg 0.275 +/- 0.011 (lines: 579)
|
||||||
|
grep 1.076 +/- 0.008 (lines: 579)
|
||||||
|
|
||||||
|
subtitles_ru_no_literal (pattern: \w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5}\s+\w{5})
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
rg 3.167 +/- 0.014 (lines: 41)
|
||||||
|
rg (ASCII) 2.740 +/- 0.014 (lines: 0)
|
||||||
|
ag (ASCII) 1.963 +/- 0.069 (lines: 0)
|
||||||
|
ucg (ASCII) 2.055 +/- 0.037 (lines: 0)
|
||||||
|
grep (ASCII)* 1.634 +/- 0.009 (lines: 0)*
|
||||||
|
|
||||||
|
subtitles_ru_surrounding_words (pattern: \w+\s+Холмс\s+\w+)
|
||||||
|
-----------------------------------------------------------
|
||||||
|
rg* 0.302 +/- 0.020 (lines: 278)*
|
||||||
|
grep 1.432 +/- 0.055 (lines: 278)
|
||||||
|
ag (ASCII) 1.908 +/- 0.023 (lines: 0)
|
||||||
|
ucg (ASCII) 2.056 +/- 0.066 (lines: 0)
|
||||||
|
grep (ASCII) 1.398 +/- 0.044 (lines: 0)
|
||||||
184
build.rs
Normal file
184
build.rs
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
use std::env;
|
||||||
|
use std::fs::{self, File};
|
||||||
|
use std::io::{self, Read, Write};
|
||||||
|
use std::path::Path;
|
||||||
|
use std::process;
|
||||||
|
|
||||||
|
use clap::Shell;
|
||||||
|
|
||||||
|
use app::{RGArg, RGArgKind};
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[path = "src/app.rs"]
|
||||||
|
mod app;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
// OUT_DIR is set by Cargo and it's where any additional build artifacts
|
||||||
|
// are written.
|
||||||
|
let outdir = match env::var_os("OUT_DIR") {
|
||||||
|
Some(outdir) => outdir,
|
||||||
|
None => {
|
||||||
|
eprintln!(
|
||||||
|
"OUT_DIR environment variable not defined. \
|
||||||
|
Please file a bug: \
|
||||||
|
https://github.com/BurntSushi/ripgrep/issues/new");
|
||||||
|
process::exit(1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
fs::create_dir_all(&outdir).unwrap();
|
||||||
|
|
||||||
|
let stamp_path = Path::new(&outdir).join("ripgrep-stamp");
|
||||||
|
if let Err(err) = File::create(&stamp_path) {
|
||||||
|
panic!("failed to write {}: {}", stamp_path.display(), err);
|
||||||
|
}
|
||||||
|
if let Err(err) = generate_man_page(&outdir) {
|
||||||
|
eprintln!("failed to generate man page: {}", err);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use clap to build completion files.
|
||||||
|
let mut app = app::app();
|
||||||
|
app.gen_completions("rg", Shell::Bash, &outdir);
|
||||||
|
app.gen_completions("rg", Shell::Fish, &outdir);
|
||||||
|
app.gen_completions("rg", Shell::PowerShell, &outdir);
|
||||||
|
// Note that we do not use clap's support for zsh. Instead, zsh completions
|
||||||
|
// are manually maintained in `complete/_rg`.
|
||||||
|
|
||||||
|
// Make the current git hash available to the build.
|
||||||
|
if let Some(rev) = git_revision_hash() {
|
||||||
|
println!("cargo:rustc-env=RIPGREP_BUILD_GIT_HASH={}", rev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn git_revision_hash() -> Option<String> {
|
||||||
|
let result = process::Command::new("git")
|
||||||
|
.args(&["rev-parse", "--short=10", "HEAD"])
|
||||||
|
.output();
|
||||||
|
result.ok().and_then(|output| {
|
||||||
|
let v = String::from_utf8_lossy(&output.stdout).trim().to_string();
|
||||||
|
if v.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(v)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn generate_man_page<P: AsRef<Path>>(outdir: P) -> io::Result<()> {
|
||||||
|
// If asciidoc isn't installed, then don't do anything.
|
||||||
|
if let Err(err) = process::Command::new("a2x").output() {
|
||||||
|
eprintln!("Could not run 'a2x' binary, skipping man page generation.");
|
||||||
|
eprintln!("Error from running 'a2x': {}", err);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
// 1. Read asciidoc template.
|
||||||
|
// 2. Interpolate template with auto-generated docs.
|
||||||
|
// 3. Save interpolation to disk.
|
||||||
|
// 4. Use a2x (part of asciidoc) to convert to man page.
|
||||||
|
let outdir = outdir.as_ref();
|
||||||
|
let cwd = env::current_dir()?;
|
||||||
|
let tpl_path = cwd.join("doc").join("rg.1.txt.tpl");
|
||||||
|
let txt_path = outdir.join("rg.1.txt");
|
||||||
|
|
||||||
|
let mut tpl = String::new();
|
||||||
|
File::open(&tpl_path)?.read_to_string(&mut tpl)?;
|
||||||
|
tpl = tpl.replace("{OPTIONS}", &formatted_options()?);
|
||||||
|
|
||||||
|
let githash = git_revision_hash();
|
||||||
|
let githash = githash.as_ref().map(|x| &**x);
|
||||||
|
tpl = tpl.replace("{VERSION}", &app::long_version(githash));
|
||||||
|
|
||||||
|
File::create(&txt_path)?.write_all(tpl.as_bytes())?;
|
||||||
|
let result = process::Command::new("a2x")
|
||||||
|
.arg("--no-xmllint")
|
||||||
|
.arg("--doctype").arg("manpage")
|
||||||
|
.arg("--format").arg("manpage")
|
||||||
|
.arg(&txt_path)
|
||||||
|
.spawn()?
|
||||||
|
.wait()?;
|
||||||
|
if !result.success() {
|
||||||
|
let msg = format!("'a2x' failed with exit code {:?}", result.code());
|
||||||
|
return Err(ioerr(msg));
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn formatted_options() -> io::Result<String> {
|
||||||
|
let mut args = app::all_args_and_flags();
|
||||||
|
args.sort_by(|x1, x2| x1.name.cmp(&x2.name));
|
||||||
|
|
||||||
|
let mut formatted = vec![];
|
||||||
|
for arg in args {
|
||||||
|
if arg.hidden {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// ripgrep only has two positional arguments, and probably will only
|
||||||
|
// ever have two positional arguments, so we just hardcode them into
|
||||||
|
// the template.
|
||||||
|
if let app::RGArgKind::Positional{..} = arg.kind {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
formatted.push(formatted_arg(&arg)?);
|
||||||
|
}
|
||||||
|
Ok(formatted.join("\n\n"))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn formatted_arg(arg: &RGArg) -> io::Result<String> {
|
||||||
|
match arg.kind {
|
||||||
|
RGArgKind::Positional{..} => panic!("unexpected positional argument"),
|
||||||
|
RGArgKind::Switch { long, short, multiple } => {
|
||||||
|
let mut out = vec![];
|
||||||
|
|
||||||
|
let mut header = format!("--{}", long);
|
||||||
|
if let Some(short) = short {
|
||||||
|
header = format!("-{}, {}", short, header);
|
||||||
|
}
|
||||||
|
if multiple {
|
||||||
|
header = format!("*{}* ...::", header);
|
||||||
|
} else {
|
||||||
|
header = format!("*{}*::", header);
|
||||||
|
}
|
||||||
|
writeln!(out, "{}", header)?;
|
||||||
|
writeln!(out, "{}", formatted_doc_txt(arg)?)?;
|
||||||
|
|
||||||
|
Ok(String::from_utf8(out).unwrap())
|
||||||
|
}
|
||||||
|
RGArgKind::Flag { long, short, value_name, multiple, .. } => {
|
||||||
|
let mut out = vec![];
|
||||||
|
|
||||||
|
let mut header = format!("--{}", long);
|
||||||
|
if let Some(short) = short {
|
||||||
|
header = format!("-{}, {}", short, header);
|
||||||
|
}
|
||||||
|
if multiple {
|
||||||
|
header = format!("*{}* _{}_ ...::", header, value_name);
|
||||||
|
} else {
|
||||||
|
header = format!("*{}* _{}_::", header, value_name);
|
||||||
|
}
|
||||||
|
writeln!(out, "{}", header)?;
|
||||||
|
writeln!(out, "{}", formatted_doc_txt(arg)?)?;
|
||||||
|
|
||||||
|
Ok(String::from_utf8(out).unwrap())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn formatted_doc_txt(arg: &RGArg) -> io::Result<String> {
|
||||||
|
let paragraphs: Vec<String> = arg.doc_long
|
||||||
|
.replace("{", "{")
|
||||||
|
.replace("}", r"}")
|
||||||
|
.split("\n\n")
|
||||||
|
.map(|s| s.to_string())
|
||||||
|
.collect();
|
||||||
|
if paragraphs.is_empty() {
|
||||||
|
return Err(ioerr(format!("missing docs for --{}", arg.name)));
|
||||||
|
}
|
||||||
|
let first = format!(" {}", paragraphs[0].replace("\n", "\n "));
|
||||||
|
if paragraphs.len() == 1 {
|
||||||
|
return Ok(first);
|
||||||
|
}
|
||||||
|
Ok(format!("{}\n+\n{}", first, paragraphs[1..].join("\n+\n")))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn ioerr(msg: String) -> io::Error {
|
||||||
|
io::Error::new(io::ErrorKind::Other, msg)
|
||||||
|
}
|
||||||
59
ci/before_deploy.sh
Normal file → Executable file
59
ci/before_deploy.sh
Normal file → Executable file
@@ -1,30 +1,57 @@
|
|||||||
# `before_deploy` phase: here we package the build artifacts
|
#!/bin/bash
|
||||||
|
|
||||||
|
# package the build artifacts
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
. $(dirname $0)/utils.sh
|
. "$(dirname $0)/utils.sh"
|
||||||
|
|
||||||
# Generate artifacts for release
|
# Generate artifacts for release
|
||||||
mk_artifacts() {
|
mk_artifacts() {
|
||||||
RUSTFLAGS="-C target-feature=+ssse3" cargo build --target $TARGET --release --features simd-accel
|
CARGO="$(builder)"
|
||||||
|
if is_arm; then
|
||||||
|
"$CARGO" build --target "$TARGET" --release
|
||||||
|
else
|
||||||
|
# Technically, MUSL builds will force PCRE2 to get statically compiled,
|
||||||
|
# but we also want PCRE2 statically build for macOS binaries.
|
||||||
|
PCRE2_SYS_STATIC=1 "$CARGO" build --target "$TARGET" --release --features 'pcre2'
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mk_tarball() {
|
mk_tarball() {
|
||||||
# create a "staging" directory
|
# When cross-compiling, use the right `strip` tool on the binary.
|
||||||
local td=$(mktempd)
|
local gcc_prefix="$(gcc_prefix)"
|
||||||
local out_dir=$(pwd)
|
# Create a temporary dir that contains our staging area.
|
||||||
|
# $tmpdir/$name is what eventually ends up as the deployed archive.
|
||||||
|
local tmpdir="$(mktemp -d)"
|
||||||
|
local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
|
||||||
|
local staging="$tmpdir/$name"
|
||||||
|
mkdir -p "$staging"/{complete,doc}
|
||||||
|
# The deployment directory is where the final archive will reside.
|
||||||
|
# This path is known by the .travis.yml configuration.
|
||||||
|
local out_dir="$(pwd)/deployment"
|
||||||
|
mkdir -p "$out_dir"
|
||||||
|
# Find the correct (most recent) Cargo "out" directory. The out directory
|
||||||
|
# contains shell completion files and the man page.
|
||||||
|
local cargo_out_dir="$(cargo_out_dir "target/$TARGET")"
|
||||||
|
|
||||||
# TODO update this part to copy the artifacts that make sense for your project
|
# Copy the ripgrep binary and strip it.
|
||||||
# NOTE All Cargo build artifacts will be under the 'target/$TARGET/{debug,release}'
|
cp "target/$TARGET/release/rg" "$staging/rg"
|
||||||
cp target/$TARGET/release/xrep $td
|
"${gcc_prefix}strip" "$staging/rg"
|
||||||
|
# Copy the licenses and README.
|
||||||
|
cp {README.md,UNLICENSE,COPYING,LICENSE-MIT} "$staging/"
|
||||||
|
# Copy documentation and man page.
|
||||||
|
cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$staging/doc/"
|
||||||
|
if command -V a2x 2>&1 > /dev/null; then
|
||||||
|
# The man page should only exist if we have asciidoc installed.
|
||||||
|
cp "$cargo_out_dir/rg.1" "$staging/doc/"
|
||||||
|
fi
|
||||||
|
# Copy shell completion files.
|
||||||
|
cp "$cargo_out_dir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/"
|
||||||
|
cp complete/_rg "$staging/complete/"
|
||||||
|
|
||||||
pushd $td
|
(cd "$tmpdir" && tar czf "$out_dir/$name.tar.gz" "$name")
|
||||||
|
rm -rf "$tmpdir"
|
||||||
# release tarball will look like 'rust-everywhere-v1.2.3-x86_64-unknown-linux-gnu.tar.gz'
|
|
||||||
tar czf $out_dir/${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz *
|
|
||||||
|
|
||||||
popd
|
|
||||||
rm -r $td
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|||||||
43
ci/build_deb.sh
Executable file
43
ci/build_deb.sh
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# This script builds a binary dpkg for Debian based distros. It does not
|
||||||
|
# currently run in CI, and is instead run manually and the resulting dpkg is
|
||||||
|
# uploaded to GitHub via the web UI.
|
||||||
|
#
|
||||||
|
# Note that this requires 'cargo deb', which can be installed with
|
||||||
|
# 'cargo install cargo-deb'.
|
||||||
|
#
|
||||||
|
# This should be run from the root of the ripgrep repo.
|
||||||
|
|
||||||
|
if ! command -V cargo-deb > /dev/null 2>&1; then
|
||||||
|
echo "cargo-deb command missing" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 'cargo deb' does not seem to provide a way to specify an asset that is
|
||||||
|
# created at build time, such as ripgrep's man page. To work around this,
|
||||||
|
# we force a debug build, copy out the man page (and shell completions)
|
||||||
|
# produced from that build, put it into a predictable location and then build
|
||||||
|
# the deb, which knows where to look.
|
||||||
|
|
||||||
|
DEPLOY_DIR=deployment/deb
|
||||||
|
mkdir -p "$DEPLOY_DIR"
|
||||||
|
cargo build
|
||||||
|
|
||||||
|
# Find and copy man page.
|
||||||
|
manpage="$(find ./target/debug -name rg.1 -print0 | xargs -0 ls -t | head -n1)"
|
||||||
|
cp "$manpage" "$DEPLOY_DIR/"
|
||||||
|
|
||||||
|
# Do the same for shell completions.
|
||||||
|
compbash="$(find ./target/debug -name rg.bash -print0 | xargs -0 ls -t | head -n1)"
|
||||||
|
cp "$compbash" "$DEPLOY_DIR/"
|
||||||
|
compfish="$(find ./target/debug -name rg.fish -print0 | xargs -0 ls -t | head -n1)"
|
||||||
|
cp "$compfish" "$DEPLOY_DIR/"
|
||||||
|
compzsh="complete/_rg"
|
||||||
|
cp "$compzsh" "$DEPLOY_DIR/"
|
||||||
|
|
||||||
|
# Since we're distributing the dpkg, we don't know whether the user will have
|
||||||
|
# PCRE2 installed, so just do a static build.
|
||||||
|
PCRE2_SYS_STATIC=1 cargo deb
|
||||||
5
ci/docker/x86_64-unknown-linux-musl/Dockerfile
Normal file
5
ci/docker/x86_64-unknown-linux-musl/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
FROM rustembedded/cross:x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
libxslt1-dev asciidoc docbook-xsl xsltproc libxml2-utils
|
||||||
55
ci/install.sh
Normal file → Executable file
55
ci/install.sh
Normal file → Executable file
@@ -1,60 +1,61 @@
|
|||||||
# `install` phase: install stuff needed for the `script` phase
|
#!/bin/bash
|
||||||
|
|
||||||
|
# install stuff needed for the `script` phase
|
||||||
|
|
||||||
|
# Where rustup gets installed.
|
||||||
|
export PATH="$PATH:$HOME/.cargo/bin"
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
. $(dirname $0)/utils.sh
|
. "$(dirname $0)/utils.sh"
|
||||||
|
|
||||||
install_c_toolchain() {
|
|
||||||
case $TARGET in
|
|
||||||
aarch64-unknown-linux-gnu)
|
|
||||||
sudo apt-get install -y --no-install-recommends \
|
|
||||||
gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# For other targets, this is handled by addons.apt.packages in .travis.yml
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
install_rustup() {
|
install_rustup() {
|
||||||
# uninstall the rust toolchain installed by travis, we are going to use rustup
|
curl https://sh.rustup.rs -sSf \
|
||||||
sh ~/rust/lib/rustlib/uninstall.sh
|
| sh -s -- -y --default-toolchain="$TRAVIS_RUST_VERSION"
|
||||||
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=$TRAVIS_RUST_VERSION
|
|
||||||
|
|
||||||
rustc -V
|
rustc -V
|
||||||
cargo -V
|
cargo -V
|
||||||
}
|
}
|
||||||
|
|
||||||
install_standard_crates() {
|
install_targets() {
|
||||||
if [ $(host) != "$TARGET" ]; then
|
if [ $(host) != "$TARGET" ]; then
|
||||||
rustup target add $TARGET
|
rustup target add $TARGET
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_osx_dependencies() {
|
||||||
|
if ! is_osx; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
brew install asciidoc docbook-xsl
|
||||||
|
}
|
||||||
|
|
||||||
configure_cargo() {
|
configure_cargo() {
|
||||||
local prefix=$(gcc_prefix)
|
local prefix=$(gcc_prefix)
|
||||||
|
if [ -n "${prefix}" ]; then
|
||||||
|
local gcc_suffix=
|
||||||
|
if [ -n "$GCC_VERSION" ]; then
|
||||||
|
gcc_suffix="-$GCC_VERSION"
|
||||||
|
fi
|
||||||
|
local gcc="${prefix}gcc${gcc_suffix}"
|
||||||
|
|
||||||
if [ ! -z $prefix ]; then
|
|
||||||
# information about the cross compiler
|
# information about the cross compiler
|
||||||
${prefix}gcc -v
|
"${gcc}" -v
|
||||||
|
|
||||||
# tell cargo which linker to use for cross compilation
|
# tell cargo which linker to use for cross compilation
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
cat >>.cargo/config <<EOF
|
cat >>.cargo/config <<EOF
|
||||||
[target.$TARGET]
|
[target.$TARGET]
|
||||||
linker = "${prefix}gcc"
|
linker = "${gcc}"
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
install_c_toolchain
|
install_osx_dependencies
|
||||||
install_rustup
|
install_rustup
|
||||||
install_standard_crates
|
install_targets
|
||||||
configure_cargo
|
configure_cargo
|
||||||
|
|
||||||
# TODO if you need to install extra stuff add it here
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|||||||
89
ci/script.sh
Normal file → Executable file
89
ci/script.sh
Normal file → Executable file
@@ -1,53 +1,52 @@
|
|||||||
# `script` phase: you usually build, test and generate docs in this phase
|
#!/bin/bash
|
||||||
|
|
||||||
|
# build, test and generate docs in this phase
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
. $(dirname $0)/utils.sh
|
. "$(dirname $0)/utils.sh"
|
||||||
|
|
||||||
# NOTE Workaround for rust-lang/rust#31907 - disable doc tests when cross compiling
|
|
||||||
# This has been fixed in the nightly channel but it would take a while to reach the other channels
|
|
||||||
disable_cross_doctests() {
|
|
||||||
if [ $(host) != "$TARGET" ] && [ "$TRAVIS_RUST_VERSION" = "stable" ]; then
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
||||||
brew install gnu-sed --default-names
|
|
||||||
fi
|
|
||||||
|
|
||||||
find src -name '*.rs' -type f | xargs sed -i -e 's:\(//.\s*```\):\1 ignore,:g'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO modify this function as you see fit
|
|
||||||
# PROTIP Always pass `--target $TARGET` to cargo commands, this makes cargo output build artifacts
|
|
||||||
# to target/$TARGET/{debug,release} which can reduce the number of needed conditionals in the
|
|
||||||
# `before_deploy`/packaging phase
|
|
||||||
run_test_suite() {
|
|
||||||
case $TARGET in
|
|
||||||
# configure emulation for transparent execution of foreign binaries
|
|
||||||
aarch64-unknown-linux-gnu)
|
|
||||||
export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
|
|
||||||
;;
|
|
||||||
arm*-unknown-linux-gnueabihf)
|
|
||||||
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ ! -z "$QEMU_LD_PREFIX" ]; then
|
|
||||||
# Run tests on a single thread when using QEMU user emulation
|
|
||||||
export RUST_TEST_THREADS=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cargo build --target $TARGET --verbose
|
|
||||||
cargo test --target $TARGET
|
|
||||||
|
|
||||||
# sanity check the file type
|
|
||||||
file target/$TARGET/debug/xrep
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
disable_cross_doctests
|
CARGO="$(builder)"
|
||||||
run_test_suite
|
|
||||||
|
# Test a normal debug build.
|
||||||
|
if is_arm; then
|
||||||
|
"$CARGO" build --target "$TARGET" --verbose
|
||||||
|
else
|
||||||
|
"$CARGO" build --target "$TARGET" --verbose --all --features 'pcre2'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show the output of the most recent build.rs stderr.
|
||||||
|
set +x
|
||||||
|
stderr="$(find "target/$TARGET/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)"
|
||||||
|
if [ -s "$stderr" ]; then
|
||||||
|
echo "===== $stderr ====="
|
||||||
|
cat "$stderr"
|
||||||
|
echo "====="
|
||||||
|
fi
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# sanity check the file type
|
||||||
|
file target/"$TARGET"/debug/rg
|
||||||
|
|
||||||
|
# Check that we've generated man page and other shell completions.
|
||||||
|
outdir="$(cargo_out_dir "target/$TARGET/debug")"
|
||||||
|
file "$outdir/rg.bash"
|
||||||
|
file "$outdir/rg.fish"
|
||||||
|
file "$outdir/_rg.ps1"
|
||||||
|
file "$outdir/rg.1"
|
||||||
|
|
||||||
|
# Apparently tests don't work on arm, so just bail now. I guess we provide
|
||||||
|
# ARM releases on a best effort basis?
|
||||||
|
if is_arm; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Test that zsh completions are in sync with ripgrep's actual args.
|
||||||
|
"$(dirname "${0}")/test_complete.sh"
|
||||||
|
|
||||||
|
# Run tests for ripgrep and all sub-crates.
|
||||||
|
"$CARGO" test --target "$TARGET" --verbose --all --features 'pcre2'
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|||||||
25
ci/sha256.sh
Executable file
25
ci/sha256.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ $# != 1 ]; then
|
||||||
|
echo "Usage: $(basename $0) version" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
version="$1"
|
||||||
|
|
||||||
|
# Linux and Darwin builds.
|
||||||
|
for arch in i686 x86_64; do
|
||||||
|
for target in apple-darwin unknown-linux-musl; do
|
||||||
|
url="https://github.com/BurntSushi/ripgrep/releases/download/$version/ripgrep-$version-$arch-$target.tar.gz"
|
||||||
|
sha=$(curl -sfSL "$url" | sha256sum)
|
||||||
|
echo "$version-$arch-$target $sha"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Source.
|
||||||
|
for ext in zip tar.gz; do
|
||||||
|
url="https://github.com/BurntSushi/ripgrep/archive/$version.$ext"
|
||||||
|
sha=$(curl -sfSL "$url" | sha256sum)
|
||||||
|
echo "source.$ext $sha"
|
||||||
|
done
|
||||||
97
ci/test_complete.sh
Executable file
97
ci/test_complete.sh
Executable file
@@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
emulate zsh -o extended_glob -o no_function_argzero -o no_unset
|
||||||
|
|
||||||
|
##
|
||||||
|
# Compares options in `rg --help` output to options in zsh completion function
|
||||||
|
|
||||||
|
get_comp_args() {
|
||||||
|
# Technically there are many options that the completion system sets that
|
||||||
|
# our function may rely on, but we'll trust that we've got it mostly right
|
||||||
|
setopt local_options unset
|
||||||
|
|
||||||
|
# Our completion function recognises a special variable which tells it to
|
||||||
|
# dump the _arguments specs and then just return. But do this in a sub-shell
|
||||||
|
# anyway to avoid any weirdness
|
||||||
|
( _RG_COMPLETE_LIST_ARGS=1 source $1 )
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
local diff
|
||||||
|
local rg="${0:a:h}/../target/${TARGET:-}/release/rg"
|
||||||
|
local _rg="${0:a:h}/../complete/_rg"
|
||||||
|
local -a help_args comp_args
|
||||||
|
|
||||||
|
[[ -e $rg ]] || rg=${rg/%\/release\/rg/\/debug\/rg}
|
||||||
|
|
||||||
|
rg=${rg:a}
|
||||||
|
_rg=${_rg:a}
|
||||||
|
|
||||||
|
[[ -e $rg ]] || {
|
||||||
|
print -r >&2 "File not found: $rg"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
[[ -e $_rg ]] || {
|
||||||
|
print -r >&2 "File not found: $_rg"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
print -rl - 'Comparing options:' "-$rg" "+$_rg"
|
||||||
|
|
||||||
|
# 'Parse' options out of the `--help` output. To prevent false positives we
|
||||||
|
# only look at lines where the first non-white-space character is `-`, or
|
||||||
|
# where a long option starting with certain letters (see `_rg`) is found.
|
||||||
|
# Occasionally we may have to handle some manually, however
|
||||||
|
help_args=( ${(f)"$(
|
||||||
|
$rg --help |
|
||||||
|
$rg -i -- '^\s+--?[a-z0-9]|--[imnp]' |
|
||||||
|
$rg -ior '$1' -- $'[\t /\"\'`.,](-[a-z0-9]|--[a-z0-9-]+)\\b' |
|
||||||
|
$rg -v -- --print0 | # False positives
|
||||||
|
sort -u
|
||||||
|
)"} )
|
||||||
|
|
||||||
|
# 'Parse' options out of the completion function
|
||||||
|
comp_args=( ${(f)"$( get_comp_args $_rg )"} )
|
||||||
|
|
||||||
|
# Note that we currently exclude hidden (!...) options; matching these
|
||||||
|
# properly against the `--help` output could be irritating
|
||||||
|
comp_args=( ${comp_args#\(*\)} ) # Strip excluded options
|
||||||
|
comp_args=( ${comp_args#\*} ) # Strip repetition indicator
|
||||||
|
comp_args=( ${comp_args%%-[:[]*} ) # Strip everything after -optname-
|
||||||
|
comp_args=( ${comp_args%%[:+=[]*} ) # Strip everything after other optspecs
|
||||||
|
comp_args=( ${comp_args##[^-]*} ) # Remove non-options
|
||||||
|
comp_args=( ${(f)"$( print -rl - $comp_args | sort -u )"} )
|
||||||
|
|
||||||
|
(( $#help_args )) || {
|
||||||
|
print -r >&2 'Failed to get help_args'
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
(( $#comp_args )) || {
|
||||||
|
print -r >&2 'Failed to get comp_args'
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
diff="$(
|
||||||
|
if diff --help 2>&1 | grep -qF -- '--label'; then
|
||||||
|
diff -U2 \
|
||||||
|
--label '`rg --help`' \
|
||||||
|
--label '`_rg`' \
|
||||||
|
=( print -rl - $help_args ) =( print -rl - $comp_args )
|
||||||
|
else
|
||||||
|
diff -U2 \
|
||||||
|
-L '`rg --help`' \
|
||||||
|
-L '`_rg`' \
|
||||||
|
=( print -rl - $help_args ) =( print -rl - $comp_args )
|
||||||
|
fi
|
||||||
|
)"
|
||||||
|
|
||||||
|
(( $#diff )) && {
|
||||||
|
printf >&2 '%s\n' 'zsh completion options differ from `--help` options:'
|
||||||
|
printf >&2 '%s\n' $diff
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
printf 'OK\n'
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
113
ci/utils.sh
113
ci/utils.sh
@@ -1,5 +1,19 @@
|
|||||||
mktempd() {
|
#!/bin/bash
|
||||||
echo $(mktemp -d 2>/dev/null || mktemp -d -t tmp)
|
|
||||||
|
# Various utility functions used through CI.
|
||||||
|
|
||||||
|
# Finds Cargo's `OUT_DIR` directory from the most recent build.
|
||||||
|
#
|
||||||
|
# This requires one parameter corresponding to the target directory
|
||||||
|
# to search for the build output.
|
||||||
|
cargo_out_dir() {
|
||||||
|
# This works by finding the most recent stamp file, which is produced by
|
||||||
|
# every ripgrep build.
|
||||||
|
target_dir="$1"
|
||||||
|
find "$target_dir" -name ripgrep-stamp -print0 \
|
||||||
|
| xargs -0 ls -t \
|
||||||
|
| head -n1 \
|
||||||
|
| xargs dirname
|
||||||
}
|
}
|
||||||
|
|
||||||
host() {
|
host() {
|
||||||
@@ -13,37 +27,12 @@ host() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
gcc_prefix() {
|
|
||||||
case "$TARGET" in
|
|
||||||
aarch64-unknown-linux-gnu)
|
|
||||||
echo aarch64-linux-gnu-
|
|
||||||
;;
|
|
||||||
arm*-gnueabihf)
|
|
||||||
echo arm-linux-gnueabihf-
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
dobin() {
|
|
||||||
[ -z $MAKE_DEB ] && die 'dobin: $MAKE_DEB not set'
|
|
||||||
[ $# -lt 1 ] && die "dobin: at least one argument needed"
|
|
||||||
|
|
||||||
local f prefix=$(gcc_prefix)
|
|
||||||
for f in "$@"; do
|
|
||||||
install -m0755 $f $dtd/debian/usr/bin/
|
|
||||||
${prefix}strip -s $dtd/debian/usr/bin/$(basename $f)
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
architecture() {
|
architecture() {
|
||||||
case $1 in
|
case "$TARGET" in
|
||||||
x86_64-unknown-linux-gnu|x86_64-unknown-linux-musl)
|
x86_64-*)
|
||||||
echo amd64
|
echo amd64
|
||||||
;;
|
;;
|
||||||
i686-unknown-linux-gnu|i686-unknown-linux-musl)
|
i686-*|i586-*|i386-*)
|
||||||
echo i386
|
echo i386
|
||||||
;;
|
;;
|
||||||
arm*-unknown-linux-gnueabihf)
|
arm*-unknown-linux-gnueabihf)
|
||||||
@@ -54,3 +43,67 @@ architecture() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gcc_prefix() {
|
||||||
|
case "$(architecture)" in
|
||||||
|
armhf)
|
||||||
|
echo arm-linux-gnueabihf-
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
is_musl() {
|
||||||
|
case "$TARGET" in
|
||||||
|
*-musl) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
is_x86() {
|
||||||
|
case "$(architecture)" in
|
||||||
|
amd64|i386) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
is_x86_64() {
|
||||||
|
case "$(architecture)" in
|
||||||
|
amd64) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
is_arm() {
|
||||||
|
case "$(architecture)" in
|
||||||
|
armhf) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
is_linux() {
|
||||||
|
case "$TRAVIS_OS_NAME" in
|
||||||
|
linux) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
is_osx() {
|
||||||
|
case "$TRAVIS_OS_NAME" in
|
||||||
|
osx) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
builder() {
|
||||||
|
if is_musl && is_x86_64; then
|
||||||
|
# cargo install cross
|
||||||
|
# To work around https://github.com/rust-embedded/cross/issues/357
|
||||||
|
cargo install --git https://github.com/rust-embedded/cross --force
|
||||||
|
echo "cross"
|
||||||
|
else
|
||||||
|
echo "cargo"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
4
compile
4
compile
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
export RUSTFLAGS="-C target-feature=+ssse3"
|
|
||||||
cargo build --release --features simd-accel
|
|
||||||
612
complete/_rg
Normal file
612
complete/_rg
Normal file
@@ -0,0 +1,612 @@
|
|||||||
|
#compdef rg
|
||||||
|
|
||||||
|
##
|
||||||
|
# zsh completion function for ripgrep
|
||||||
|
#
|
||||||
|
# Run ci/test_complete.sh after building to ensure that the options supported by
|
||||||
|
# this function stay in synch with the `rg` binary.
|
||||||
|
#
|
||||||
|
# For convenience, a completion reference guide is included at the bottom of
|
||||||
|
# this file.
|
||||||
|
#
|
||||||
|
# Originally based on code from the zsh-users project — see copyright notice
|
||||||
|
# below.
|
||||||
|
|
||||||
|
_rg() {
|
||||||
|
local curcontext=$curcontext no='!' descr ret=1
|
||||||
|
local -a context line state state_descr args tmp suf
|
||||||
|
local -A opt_args
|
||||||
|
|
||||||
|
# ripgrep has many options which negate the effect of a more common one — for
|
||||||
|
# example, `--no-column` to negate `--column`, and `--messages` to negate
|
||||||
|
# `--no-messages`. There are so many of these, and they're so infrequently
|
||||||
|
# used, that some users will probably find it irritating if they're completed
|
||||||
|
# indiscriminately, so let's not do that unless either the current prefix
|
||||||
|
# matches one of those negation options or the user has the `complete-all`
|
||||||
|
# style set. Note that this prefix check has to be updated manually to account
|
||||||
|
# for all of the potential negation options listed below!
|
||||||
|
if
|
||||||
|
# We also want to list all of these options during testing
|
||||||
|
[[ $_RG_COMPLETE_LIST_ARGS == (1|t*|y*) ]] ||
|
||||||
|
# (--[imnp]* => --ignore*, --messages, --no-*, --pcre2-unicode)
|
||||||
|
[[ $PREFIX$SUFFIX == --[imnp]* ]] ||
|
||||||
|
zstyle -t ":complete:$curcontext:*" complete-all
|
||||||
|
then
|
||||||
|
no=
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We make heavy use of argument groups here to prevent the option specs from
|
||||||
|
# growing unwieldy. These aren't supported in zsh <5.4, though, so we'll strip
|
||||||
|
# them out below if necessary. This makes the exclusions inaccurate on those
|
||||||
|
# older versions, but oh well — it's not that big a deal
|
||||||
|
args=(
|
||||||
|
+ '(exclusive)' # Misc. fully exclusive options
|
||||||
|
'(: * -)'{-h,--help}'[display help information]'
|
||||||
|
'(: * -)'{-V,--version}'[display version information]'
|
||||||
|
'(: * -)'--pcre2-version'[print the version of PCRE2 used by ripgrep, if available]'
|
||||||
|
|
||||||
|
+ '(buffered)' # buffering options
|
||||||
|
'--line-buffered[force line buffering]'
|
||||||
|
$no"--no-line-buffered[don't force line buffering]"
|
||||||
|
'--block-buffered[force block buffering]'
|
||||||
|
$no"--no-block-buffered[don't force block buffering]"
|
||||||
|
|
||||||
|
+ '(case)' # Case-sensitivity options
|
||||||
|
{-i,--ignore-case}'[search case-insensitively]'
|
||||||
|
{-s,--case-sensitive}'[search case-sensitively]'
|
||||||
|
{-S,--smart-case}'[search case-insensitively if pattern is all lowercase]'
|
||||||
|
|
||||||
|
+ '(context-a)' # Context (after) options
|
||||||
|
'(context-c)'{-A+,--after-context=}'[specify lines to show after each match]:number of lines'
|
||||||
|
|
||||||
|
+ '(context-b)' # Context (before) options
|
||||||
|
'(context-c)'{-B+,--before-context=}'[specify lines to show before each match]:number of lines'
|
||||||
|
|
||||||
|
+ '(context-c)' # Context (combined) options
|
||||||
|
'(context-a context-b)'{-C+,--context=}'[specify lines to show before and after each match]:number of lines'
|
||||||
|
|
||||||
|
+ '(column)' # Column options
|
||||||
|
'--column[show column numbers for matches]'
|
||||||
|
$no"--no-column[don't show column numbers for matches]"
|
||||||
|
|
||||||
|
+ '(count)' # Counting options
|
||||||
|
{-c,--count}'[only show count of matching lines for each file]'
|
||||||
|
'--count-matches[only show count of individual matches for each file]'
|
||||||
|
|
||||||
|
+ '(encoding)' # Encoding options
|
||||||
|
{-E+,--encoding=}'[specify text encoding of files to search]: :_rg_encodings'
|
||||||
|
$no'--no-encoding[use default text encoding]'
|
||||||
|
|
||||||
|
+ file # File-input options
|
||||||
|
'(1)*'{-f+,--file=}'[specify file containing patterns to search for]: :_files'
|
||||||
|
|
||||||
|
+ '(file-match)' # Files with/without match options
|
||||||
|
'(stats)'{-l,--files-with-matches}'[only show names of files with matches]'
|
||||||
|
'(stats)--files-without-match[only show names of files without matches]'
|
||||||
|
|
||||||
|
+ '(file-name)' # File-name options
|
||||||
|
{-H,--with-filename}'[show file name for matches]'
|
||||||
|
{-I,--no-filename}"[don't show file name for matches]"
|
||||||
|
|
||||||
|
+ '(file-system)' # File system options
|
||||||
|
"--one-file-system[don't descend into directories on other file systems]"
|
||||||
|
$no'--no-one-file-system[descend into directories on other file systems]'
|
||||||
|
|
||||||
|
+ '(fixed)' # Fixed-string options
|
||||||
|
{-F,--fixed-strings}'[treat pattern as literal string instead of regular expression]'
|
||||||
|
$no"--no-fixed-strings[don't treat pattern as literal string]"
|
||||||
|
|
||||||
|
+ '(follow)' # Symlink-following options
|
||||||
|
{-L,--follow}'[follow symlinks]'
|
||||||
|
$no"--no-follow[don't follow symlinks]"
|
||||||
|
|
||||||
|
+ glob # File-glob options
|
||||||
|
'*'{-g+,--glob=}'[include/exclude files matching specified glob]:glob'
|
||||||
|
'*--iglob=[include/exclude files matching specified case-insensitive glob]:glob'
|
||||||
|
|
||||||
|
+ '(glob-case-insensitive)' # File-glob case sensitivity options
|
||||||
|
'--glob-case-insensitive[treat -g/--glob patterns case insensitively]'
|
||||||
|
$no'--no-glob-case-insensitive[treat -g/--glob patterns case sensitively]'
|
||||||
|
|
||||||
|
+ '(heading)' # Heading options
|
||||||
|
'(pretty-vimgrep)--heading[show matches grouped by file name]'
|
||||||
|
"(pretty-vimgrep)--no-heading[don't show matches grouped by file name]"
|
||||||
|
|
||||||
|
+ '(hidden)' # Hidden-file options
|
||||||
|
'--hidden[search hidden files and directories]'
|
||||||
|
$no"--no-hidden[don't search hidden files and directories]"
|
||||||
|
|
||||||
|
+ '(hybrid)' # hybrid regex options
|
||||||
|
'--auto-hybrid-regex[dynamically use PCRE2 if necessary]'
|
||||||
|
$no"--no-auto-hybrid-regex[don't dynamically use PCRE2 if necessary]"
|
||||||
|
|
||||||
|
+ '(ignore)' # Ignore-file options
|
||||||
|
"(--no-ignore-global --no-ignore-parent --no-ignore-vcs --no-ignore-dot)--no-ignore[don't respect ignore files]"
|
||||||
|
$no'(--ignore-global --ignore-parent --ignore-vcs --ignore-dot)--ignore[respect ignore files]'
|
||||||
|
|
||||||
|
+ '(ignore-file-case-insensitive)' # Ignore-file case sensitivity options
|
||||||
|
'--ignore-file-case-insensitive[process ignore files case insensitively]'
|
||||||
|
$no'--no-ignore-file-case-insensitive[process ignore files case sensitively]'
|
||||||
|
|
||||||
|
+ '(ignore-global)' # Global ignore-file options
|
||||||
|
"--no-ignore-global[don't respect global ignore files]"
|
||||||
|
$no'--ignore-global[respect global ignore files]'
|
||||||
|
|
||||||
|
+ '(ignore-parent)' # Parent ignore-file options
|
||||||
|
"--no-ignore-parent[don't respect ignore files in parent directories]"
|
||||||
|
$no'--ignore-parent[respect ignore files in parent directories]'
|
||||||
|
|
||||||
|
+ '(ignore-vcs)' # VCS ignore-file options
|
||||||
|
"--no-ignore-vcs[don't respect version control ignore files]"
|
||||||
|
$no'--ignore-vcs[respect version control ignore files]'
|
||||||
|
|
||||||
|
+ '(ignore-dot)' # .ignore-file options
|
||||||
|
"--no-ignore-dot[don't respect .ignore files]"
|
||||||
|
$no'--ignore-dot[respect .ignore files]'
|
||||||
|
|
||||||
|
+ '(json)' # JSON options
|
||||||
|
'--json[output results in JSON Lines format]'
|
||||||
|
$no"--no-json[don't output results in JSON Lines format]"
|
||||||
|
|
||||||
|
+ '(line-number)' # Line-number options
|
||||||
|
{-n,--line-number}'[show line numbers for matches]'
|
||||||
|
{-N,--no-line-number}"[don't show line numbers for matches]"
|
||||||
|
|
||||||
|
+ '(line-terminator)' # Line-terminator options
|
||||||
|
'--crlf[use CRLF as line terminator]'
|
||||||
|
$no"--no-crlf[don't use CRLF as line terminator]"
|
||||||
|
'(text)--null-data[use NUL as line terminator]'
|
||||||
|
|
||||||
|
+ '(max-columns-preview)' # max column preview options
|
||||||
|
'--max-columns-preview[show preview for long lines (with -M)]'
|
||||||
|
$no"--no-max-columns-preview[don't show preview for long lines (with -M)]"
|
||||||
|
|
||||||
|
+ '(max-depth)' # Directory-depth options
|
||||||
|
'--max-depth=[specify max number of directories to descend]:number of directories'
|
||||||
|
'!--maxdepth=:number of directories'
|
||||||
|
|
||||||
|
+ '(messages)' # Error-message options
|
||||||
|
'(--no-ignore-messages)--no-messages[suppress some error messages]'
|
||||||
|
$no"--messages[don't suppress error messages affected by --no-messages]"
|
||||||
|
|
||||||
|
+ '(messages-ignore)' # Ignore-error message options
|
||||||
|
"--no-ignore-messages[don't show ignore-file parse error messages]"
|
||||||
|
$no'--ignore-messages[show ignore-file parse error messages]'
|
||||||
|
|
||||||
|
+ '(mmap)' # mmap options
|
||||||
|
'--mmap[search using memory maps when possible]'
|
||||||
|
"--no-mmap[don't search using memory maps]"
|
||||||
|
|
||||||
|
+ '(multiline)' # Multiline options
|
||||||
|
{-U,--multiline}'[permit matching across multiple lines]'
|
||||||
|
$no'(multiline-dotall)--no-multiline[restrict matches to at most one line each]'
|
||||||
|
|
||||||
|
+ '(multiline-dotall)' # Multiline DOTALL options
|
||||||
|
'(--no-multiline)--multiline-dotall[allow "." to match newline (with -U)]'
|
||||||
|
$no"(--no-multiline)--no-multiline-dotall[don't allow \".\" to match newline (with -U)]"
|
||||||
|
|
||||||
|
+ '(only)' # Only-match options
|
||||||
|
{-o,--only-matching}'[show only matching part of each line]'
|
||||||
|
|
||||||
|
+ '(passthru)' # Pass-through options
|
||||||
|
'(--vimgrep)--passthru[show both matching and non-matching lines]'
|
||||||
|
'!(--vimgrep)--passthrough'
|
||||||
|
|
||||||
|
+ '(pcre2)' # PCRE2 options
|
||||||
|
{-P,--pcre2}'[enable matching with PCRE2]'
|
||||||
|
$no'(pcre2-unicode)--no-pcre2[disable matching with PCRE2]'
|
||||||
|
|
||||||
|
+ '(pcre2-unicode)' # PCRE2 Unicode options
|
||||||
|
$no'(--no-pcre2 --no-pcre2-unicode)--pcre2-unicode[enable PCRE2 Unicode mode (with -P)]'
|
||||||
|
'(--no-pcre2 --pcre2-unicode)--no-pcre2-unicode[disable PCRE2 Unicode mode (with -P)]'
|
||||||
|
|
||||||
|
+ '(pre)' # Preprocessing options
|
||||||
|
'(-z --search-zip)--pre=[specify preprocessor utility]:preprocessor utility:_command_names -e'
|
||||||
|
$no'--no-pre[disable preprocessor utility]'
|
||||||
|
|
||||||
|
+ pre-glob # Preprocessing glob options
|
||||||
|
'*--pre-glob[include/exclude files for preprocessing with --pre]'
|
||||||
|
|
||||||
|
+ '(pretty-vimgrep)' # Pretty/vimgrep display options
|
||||||
|
'(heading)'{-p,--pretty}'[alias for --color=always --heading -n]'
|
||||||
|
'(heading passthru)--vimgrep[show results in vim-compatible format]'
|
||||||
|
|
||||||
|
+ regexp # Explicit pattern options
|
||||||
|
'(1 file)*'{-e+,--regexp=}'[specify pattern]:pattern'
|
||||||
|
|
||||||
|
+ '(replace)' # Replacement options
|
||||||
|
{-r+,--replace=}'[specify string used to replace matches]:replace string'
|
||||||
|
|
||||||
|
+ '(sort)' # File-sorting options
|
||||||
|
'(threads)--sort=[sort results in ascending order (disables parallelism)]:sort method:((
|
||||||
|
none\:"no sorting"
|
||||||
|
path\:"sort by file path"
|
||||||
|
modified\:"sort by last modified time"
|
||||||
|
accessed\:"sort by last accessed time"
|
||||||
|
created\:"sort by creation time"
|
||||||
|
))'
|
||||||
|
'(threads)--sortr=[sort results in descending order (disables parallelism)]:sort method:((
|
||||||
|
none\:"no sorting"
|
||||||
|
path\:"sort by file path"
|
||||||
|
modified\:"sort by last modified time"
|
||||||
|
accessed\:"sort by last accessed time"
|
||||||
|
created\:"sort by creation time"
|
||||||
|
))'
|
||||||
|
'!(threads)--sort-files[sort results by file path (disables parallelism)]'
|
||||||
|
|
||||||
|
+ '(stats)' # Statistics options
|
||||||
|
'(--files file-match)--stats[show search statistics]'
|
||||||
|
$no"--no-stats[don't show search statistics]"
|
||||||
|
|
||||||
|
+ '(text)' # Binary-search options
|
||||||
|
{-a,--text}'[search binary files as if they were text]'
|
||||||
|
"--binary[search binary files, don't print binary data]"
|
||||||
|
$no"--no-binary[don't search binary files]"
|
||||||
|
$no"(--null-data)--no-text[don't search binary files as if they were text]"
|
||||||
|
|
||||||
|
+ '(threads)' # Thread-count options
|
||||||
|
'(sort)'{-j+,--threads=}'[specify approximate number of threads to use]:number of threads'
|
||||||
|
|
||||||
|
+ '(trim)' # Trim options
|
||||||
|
'--trim[trim any ASCII whitespace prefix from each line]'
|
||||||
|
$no"--no-trim[don't trim ASCII whitespace prefix from each line]"
|
||||||
|
|
||||||
|
+ type # Type options
|
||||||
|
'*'{-t+,--type=}'[only search files matching specified type]: :_rg_types'
|
||||||
|
'*--type-add=[add new glob for specified file type]: :->typespec'
|
||||||
|
'*--type-clear=[clear globs previously defined for specified file type]: :_rg_types'
|
||||||
|
# This should actually be exclusive with everything but other type options
|
||||||
|
'(: *)--type-list[show all supported file types and their associated globs]'
|
||||||
|
'*'{-T+,--type-not=}"[don't search files matching specified file type]: :_rg_types"
|
||||||
|
|
||||||
|
+ '(word-line)' # Whole-word/line match options
|
||||||
|
{-w,--word-regexp}'[only show matches surrounded by word boundaries]'
|
||||||
|
{-x,--line-regexp}'[only show matches surrounded by line boundaries]'
|
||||||
|
|
||||||
|
+ '(zip)' # Compression options
|
||||||
|
'(--pre)'{-z,--search-zip}'[search in compressed files]'
|
||||||
|
$no"--no-search-zip[don't search in compressed files]"
|
||||||
|
|
||||||
|
+ misc # Other options — no need to separate these at the moment
|
||||||
|
'(-b --byte-offset)'{-b,--byte-offset}'[show 0-based byte offset for each matching line]'
|
||||||
|
'--color=[specify when to use colors in output]:when:((
|
||||||
|
never\:"never use colors"
|
||||||
|
auto\:"use colors or not based on stdout, TERM, etc."
|
||||||
|
always\:"always use colors"
|
||||||
|
ansi\:"always use ANSI colors (even on Windows)"
|
||||||
|
))'
|
||||||
|
'*--colors=[specify color and style settings]: :->colorspec'
|
||||||
|
'--context-separator=[specify string used to separate non-continuous context lines in output]:separator'
|
||||||
|
'--debug[show debug messages]'
|
||||||
|
'--dfa-size-limit=[specify upper size limit of generated DFA]:DFA size (bytes)'
|
||||||
|
"(1 stats)--files[show each file that would be searched (but don't search)]"
|
||||||
|
'*--ignore-file=[specify additional ignore file]:ignore file:_files'
|
||||||
|
'(-v --invert-match)'{-v,--invert-match}'[invert matching]'
|
||||||
|
'(-M --max-columns)'{-M+,--max-columns=}'[specify max length of lines to print]:number of bytes'
|
||||||
|
'(-m --max-count)'{-m+,--max-count=}'[specify max number of matches per file]:number of matches'
|
||||||
|
'--max-filesize=[specify size above which files should be ignored]:file size (bytes)'
|
||||||
|
"--no-config[don't load configuration files]"
|
||||||
|
'(-0 --null)'{-0,--null}'[print NUL byte after file names]'
|
||||||
|
'--path-separator=[specify path separator to use when printing file names]:separator'
|
||||||
|
'(-q --quiet)'{-q,--quiet}'[suppress normal output]'
|
||||||
|
'--regex-size-limit=[specify upper size limit of compiled regex]:regex size (bytes)'
|
||||||
|
'*'{-u,--unrestricted}'[reduce level of "smart" searching]'
|
||||||
|
|
||||||
|
+ operand # Operands
|
||||||
|
'(--files --type-list file regexp)1: :_guard "^-*" pattern'
|
||||||
|
'(--type-list)*: :_files'
|
||||||
|
)
|
||||||
|
|
||||||
|
# This is used with test_complete.sh to verify that there are no options
|
||||||
|
# listed in the help output that aren't also defined here
|
||||||
|
[[ $_RG_COMPLETE_LIST_ARGS == (1|t*|y*) ]] && {
|
||||||
|
print -rl - $args
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Strip out argument groups where unsupported (see above)
|
||||||
|
[[ $ZSH_VERSION == (4|5.<0-3>)(.*)# ]] &&
|
||||||
|
args=( ${(@)args:#(#i)(+|[a-z0-9][a-z0-9_-]#|\([a-z0-9][a-z0-9_-]#\))} )
|
||||||
|
|
||||||
|
_arguments -C -s -S : $args && ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
colorspec)
|
||||||
|
if [[ ${IPREFIX#--*=}$PREFIX == [^:]# ]]; then
|
||||||
|
suf=( -qS: )
|
||||||
|
tmp=(
|
||||||
|
'column:specify coloring for column numbers'
|
||||||
|
'line:specify coloring for line numbers'
|
||||||
|
'match:specify coloring for match text'
|
||||||
|
'path:specify coloring for file names'
|
||||||
|
)
|
||||||
|
descr='color/style type'
|
||||||
|
elif [[ ${IPREFIX#--*=}$PREFIX == (column|line|match|path):[^:]# ]]; then
|
||||||
|
suf=( -qS: )
|
||||||
|
tmp=(
|
||||||
|
'none:clear color/style for type'
|
||||||
|
'bg:specify background color'
|
||||||
|
'fg:specify foreground color'
|
||||||
|
'style:specify text style'
|
||||||
|
)
|
||||||
|
descr='color/style attribute'
|
||||||
|
elif [[ ${IPREFIX#--*=}$PREFIX == [^:]##:(bg|fg):[^:]# ]]; then
|
||||||
|
tmp=( black blue green red cyan magenta yellow white )
|
||||||
|
descr='color name or r,g,b'
|
||||||
|
elif [[ ${IPREFIX#--*=}$PREFIX == [^:]##:style:[^:]# ]]; then
|
||||||
|
tmp=( {,no}bold {,no}intense {,no}underline )
|
||||||
|
descr='style name'
|
||||||
|
else
|
||||||
|
_message -e colorspec 'no more arguments'
|
||||||
|
fi
|
||||||
|
|
||||||
|
(( $#tmp )) && {
|
||||||
|
compset -P '*:'
|
||||||
|
_describe -t colorspec $descr tmp $suf && ret=0
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
|
||||||
|
typespec)
|
||||||
|
if compset -P '[^:]##:include:'; then
|
||||||
|
_sequence -s , _rg_types && ret=0
|
||||||
|
# @todo This bit in particular could be better, but it's a little
|
||||||
|
# complex, and attempting to solve it seems to run us up against a crash
|
||||||
|
# bug — zsh # 40362
|
||||||
|
elif compset -P '[^:]##:'; then
|
||||||
|
_message 'glob or include directive' && ret=1
|
||||||
|
elif [[ ! -prefix *:* ]]; then
|
||||||
|
_rg_types -qS : && ret=0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
# Complete encodings
|
||||||
|
_rg_encodings() {
|
||||||
|
local -a expl
|
||||||
|
local -aU _encodings
|
||||||
|
|
||||||
|
# This is impossible to read, but these encodings rarely if ever change, so it
|
||||||
|
# probably doesn't matter. They are derived from the list given here:
|
||||||
|
# https://encoding.spec.whatwg.org/#concept-encoding-get
|
||||||
|
_encodings=(
|
||||||
|
{{,us-}ascii,arabic,chinese,cyrillic,greek{,8},hebrew,korean}
|
||||||
|
logical visual mac {,cs}macintosh x-mac-{cyrillic,roman,ukrainian}
|
||||||
|
866 ibm{819,866} csibm866
|
||||||
|
big5{,-hkscs} {cn-,cs}big5 x-x-big5
|
||||||
|
cp{819,866,125{0..8}} x-cp125{0..8}
|
||||||
|
csiso2022{jp,kr} csiso8859{6,8}{e,i}
|
||||||
|
csisolatin{{1..6},9} csisolatin{arabic,cyrillic,greek,hebrew}
|
||||||
|
ecma-{114,118} asmo-708 elot_928 sun_eu_greek
|
||||||
|
euc-{jp,kr} x-euc-jp cseuckr cseucpkdfmtjapanese
|
||||||
|
{,x-}gbk csiso58gb231280 gb18030 {,cs}gb2312 gb_2312{,-80} hz-gb-2312
|
||||||
|
iso-2022-{cn,cn-ext,jp,kr}
|
||||||
|
iso8859{,-}{{1..11},13,14,15}
|
||||||
|
iso-8859-{{1..11},{6,8}-{e,i},13,14,15,16} iso_8859-{{1..9},15}
|
||||||
|
iso_8859-{1,2,6,7}:1987 iso_8859-{3,4,5,8}:1988 iso_8859-9:1989
|
||||||
|
iso-ir-{58,100,101,109,110,126,127,138,144,148,149,157}
|
||||||
|
koi{,8,8-r,8-ru,8-u,8_r} cskoi8r
|
||||||
|
ks_c_5601-{1987,1989} ksc{,_}5691 csksc56011987
|
||||||
|
latin{1..6} l{{1..6},9}
|
||||||
|
shift{-,_}jis csshiftjis {,x-}sjis ms_kanji ms932
|
||||||
|
utf{,-}8 utf-16{,be,le} unicode-1-1-utf-8
|
||||||
|
windows-{31j,874,949,125{0..8}} dos-874 tis-620 ansi_x3.4-1968
|
||||||
|
x-user-defined auto none
|
||||||
|
)
|
||||||
|
|
||||||
|
_wanted encodings expl encoding compadd -a "$@" - _encodings
|
||||||
|
}
|
||||||
|
|
||||||
|
# Complete file types
|
||||||
|
_rg_types() {
|
||||||
|
local -a expl
|
||||||
|
local -aU _types
|
||||||
|
|
||||||
|
_types=( ${(@)${(f)"$( _call_program types rg --type-list )"}%%:*} )
|
||||||
|
|
||||||
|
_wanted types expl 'file type' compadd -a "$@" - _types
|
||||||
|
}
|
||||||
|
|
||||||
|
_rg "$@"
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# ZSH COMPLETION REFERENCE
|
||||||
|
#
|
||||||
|
# For the convenience of developers who aren't especially familiar with zsh
|
||||||
|
# completion functions, a brief reference guide follows. This is in no way
|
||||||
|
# comprehensive; it covers just enough of the basic structure, syntax, and
|
||||||
|
# conventions to help someone make simple changes like adding new options. For
|
||||||
|
# more complete documentation regarding zsh completion functions, please see the
|
||||||
|
# following:
|
||||||
|
#
|
||||||
|
# * http://zsh.sourceforge.net/Doc/Release/Completion-System.html
|
||||||
|
# * https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide
|
||||||
|
#
|
||||||
|
# OVERVIEW
|
||||||
|
#
|
||||||
|
# Most zsh completion functions are defined in terms of `_arguments`, which is a
|
||||||
|
# shell function that takes a series of argument specifications. The specs for
|
||||||
|
# `rg` are stored in an array, which is common for more complex functions; the
|
||||||
|
# elements of the array are passed to `_arguments` on invocation.
|
||||||
|
#
|
||||||
|
# ARGUMENT-SPECIFICATION SYNTAX
|
||||||
|
#
|
||||||
|
# The following is a contrived example of the argument specs for a simple tool:
|
||||||
|
#
|
||||||
|
# '(: * -)'{-h,--help}'[display help information]'
|
||||||
|
# '(-q -v --quiet --verbose)'{-q,--quiet}'[decrease output verbosity]'
|
||||||
|
# '!(-q -v --quiet --verbose)--silent'
|
||||||
|
# '(-q -v --quiet --verbose)'{-v,--verbose}'[increase output verbosity]'
|
||||||
|
# '--color=[specify when to use colors]:when:(always never auto)'
|
||||||
|
# '*:example file:_files'
|
||||||
|
#
|
||||||
|
# Although there may appear to be six specs here, there are actually nine; we
|
||||||
|
# use brace expansion to combine specs for options that go by multiple names,
|
||||||
|
# like `-q` and `--quiet`. This is customary, and ties in with the fact that zsh
|
||||||
|
# merges completion possibilities together when they have the same description.
|
||||||
|
#
|
||||||
|
# The first line defines the option `-h`/`--help`. With most tools, it isn't
|
||||||
|
# useful to complete anything after `--help` because it effectively overrides
|
||||||
|
# all others; the `(: * -)` at the beginning of the spec tells zsh not to
|
||||||
|
# complete any other operands (`:` and `*`) or options (`-`) after this one has
|
||||||
|
# been used. The `[...]` at the end associates a description with `-h`/`--help`;
|
||||||
|
# as mentioned, zsh will see the identical descriptions and merge these options
|
||||||
|
# together when offering completion possibilities.
|
||||||
|
#
|
||||||
|
# The next line defines `-q`/`--quiet`. Here we don't want to suppress further
|
||||||
|
# completions entirely, but we don't want to offer `-q` if `--quiet` has been
|
||||||
|
# given (since they do the same thing), nor do we want to offer `-v` (since it
|
||||||
|
# doesn't make sense to be quiet and verbose at the same time). We don't need to
|
||||||
|
# tell zsh not to offer `--quiet` a second time, since that's the default
|
||||||
|
# behaviour, but since this line expands to two specs describing `-q` *and*
|
||||||
|
# `--quiet` we do need to explicitly list all of them here.
|
||||||
|
#
|
||||||
|
# The next line defines a hidden option `--silent` — maybe it's a deprecated
|
||||||
|
# synonym for `--quiet`. The leading `!` indicates that zsh shouldn't offer this
|
||||||
|
# option during completion. The benefit of providing a spec for an option that
|
||||||
|
# shouldn't be completed is that, if someone *does* use it, we can correctly
|
||||||
|
# suppress completion of other options afterwards.
|
||||||
|
#
|
||||||
|
# The next line defines `-v`/`--verbose`; this works just like `-q`/`--quiet`.
|
||||||
|
#
|
||||||
|
# The next line defines `--color`. In this example, `--color` doesn't have a
|
||||||
|
# corresponding short option, so we don't need to use brace expansion. Further,
|
||||||
|
# there are no other options it's exclusive with (just itself), so we don't need
|
||||||
|
# to define those at the beginning. However, it does take a mandatory argument.
|
||||||
|
# The `=` at the end of `--color=` indicates that the argument may appear either
|
||||||
|
# like `--color always` or like `--color=always`; this is how most GNU-style
|
||||||
|
# command-line tools work. The corresponding short option would normally use `+`
|
||||||
|
# — for example, `-c+` would allow either `-c always` or `-calways`. For this
|
||||||
|
# option, the arguments are known ahead of time, so we can simply list them in
|
||||||
|
# parentheses at the end (`when` is used as the description for the argument).
|
||||||
|
#
|
||||||
|
# The last line defines an operand (a non-option argument). In this example, the
|
||||||
|
# operand can be used any number of times (the leading `*`), and it should be a
|
||||||
|
# file path, so we tell zsh to call the `_files` function to complete it. The
|
||||||
|
# `example file` in the middle is the description to use for this operand; we
|
||||||
|
# could use a space instead to accept the default provided by `_files`.
|
||||||
|
#
|
||||||
|
# GROUPING ARGUMENT SPECIFICATIONS
|
||||||
|
#
|
||||||
|
# Newer versions of zsh support grouping argument specs together. All specs
|
||||||
|
# following a `+` and then a group name are considered to be members of the
|
||||||
|
# named group. Grouping is useful mostly for organisational purposes; it makes
|
||||||
|
# the relationship between different options more obvious, and makes it easier
|
||||||
|
# to specify exclusions.
|
||||||
|
#
|
||||||
|
# We could rewrite our example above using grouping as follows:
|
||||||
|
#
|
||||||
|
# '(: * -)'{-h,--help}'[display help information]'
|
||||||
|
# '--color=[specify when to use colors]:when:(always never auto)'
|
||||||
|
# '*:example file:_files'
|
||||||
|
# + '(verbosity)'
|
||||||
|
# {-q,--quiet}'[decrease output verbosity]'
|
||||||
|
# '!--silent'
|
||||||
|
# {-v,--verbose}'[increase output verbosity]'
|
||||||
|
#
|
||||||
|
# Here we take advantage of a useful feature of spec grouping — when the group
|
||||||
|
# name is surrounded by parentheses, as in `(verbosity)`, it tells zsh that all
|
||||||
|
# of the options in that group are exclusive with each other. As a result, we
|
||||||
|
# don't need to manually list out the exclusions at the beginning of each
|
||||||
|
# option.
|
||||||
|
#
|
||||||
|
# Groups can also be referred to by name in other argument specs; for example:
|
||||||
|
#
|
||||||
|
# '(xyz)--aaa' '*: :_files'
|
||||||
|
# + xyz --xxx --yyy --zzz
|
||||||
|
#
|
||||||
|
# Here we use the group name `xyz` to tell zsh that `--xxx`, `--yyy`, and
|
||||||
|
# `--zzz` are not to be completed after `--aaa`. This makes the exclusion list
|
||||||
|
# much more compact and reusable.
|
||||||
|
#
|
||||||
|
# CONVENTIONS
|
||||||
|
#
|
||||||
|
# zsh completion functions generally adhere to the following conventions:
|
||||||
|
#
|
||||||
|
# * Use two spaces for indentation
|
||||||
|
# * Combine specs for options with different names using brace expansion
|
||||||
|
# * In combined specs, list the short option first (as in `{-a,--text}`)
|
||||||
|
# * Use `+` or `=` as described above for options that take arguments
|
||||||
|
# * Provide a description for all options, option-arguments, and operands
|
||||||
|
# * Capitalise/punctuate argument descriptions as phrases, not complete
|
||||||
|
# sentences — 'display help information', never 'Display help information.'
|
||||||
|
# (but still capitalise acronyms and proper names)
|
||||||
|
# * Write argument descriptions as verb phrases — 'display x', 'enable y',
|
||||||
|
# 'use z'
|
||||||
|
# * Word descriptions to make it clear when an option expects an argument;
|
||||||
|
# usually this is done with the word 'specify', as in 'specify x' or
|
||||||
|
# 'use specified x')
|
||||||
|
# * Write argument descriptions as tersely as possible — for example, articles
|
||||||
|
# like 'a' and 'the' should be omitted unless it would be confusing
|
||||||
|
#
|
||||||
|
# Other conventions currently used by this function:
|
||||||
|
#
|
||||||
|
# * Order argument specs alphabetically by group name, then option name
|
||||||
|
# * Group options that are directly related, mutually exclusive, or frequently
|
||||||
|
# referenced by other argument specs
|
||||||
|
# * Use only characters in the set [a-z0-9_-] in group names
|
||||||
|
# * Order exclusion lists as follows: short options, long options, groups
|
||||||
|
# * Use American English in descriptions
|
||||||
|
# * Use 'don't' in descriptions instead of 'do not'
|
||||||
|
# * Word descriptions for related options as similarly as possible. For example,
|
||||||
|
# `--foo[enable foo]` and `--no-foo[disable foo]`, or `--foo[use foo]` and
|
||||||
|
# `--no-foo[don't use foo]`
|
||||||
|
# * Word descriptions to make it clear when an option only makes sense with
|
||||||
|
# another option, usually by adding '(with -x)' to the end
|
||||||
|
# * Don't quote strings or variables unnecessarily. When quotes are required,
|
||||||
|
# prefer single-quotes to double-quotes
|
||||||
|
# * Prefix option specs with `$no` when the option serves only to negate the
|
||||||
|
# behaviour of another option that must be provided explicitly by the user.
|
||||||
|
# This prevents rarely used options from cluttering up the completion menu
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of the zsh-users nor the
|
||||||
|
# names of its contributors may be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||||
|
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# Completion script for ripgrep
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * arcizan <ghostrevery@gmail.com>
|
||||||
|
# * MaskRay <i@maskray.me>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# coding: utf-8-unix
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# sh-indentation: 2
|
||||||
|
# sh-basic-offset: 2
|
||||||
|
# End:
|
||||||
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
11
ctags.rust
11
ctags.rust
@@ -1,11 +0,0 @@
|
|||||||
--langdef=Rust
|
|
||||||
--langmap=Rust:.rs
|
|
||||||
--regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
|
|
||||||
--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/
|
|
||||||
--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/
|
|
||||||
229
doc/rg.1.txt.tpl
Normal file
229
doc/rg.1.txt.tpl
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
rg(1)
|
||||||
|
=====
|
||||||
|
|
||||||
|
Name
|
||||||
|
----
|
||||||
|
rg - recursively search current directory for lines matching a pattern
|
||||||
|
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
--------
|
||||||
|
*rg* [_OPTIONS_] _PATTERN_ [_PATH_...]
|
||||||
|
|
||||||
|
*rg* [_OPTIONS_] *-e* _PATTERN_... [_PATH_...]
|
||||||
|
|
||||||
|
*rg* [_OPTIONS_] *-f* _PATTERNFILE_... [_PATH_...]
|
||||||
|
|
||||||
|
*rg* [_OPTIONS_] *--files* [_PATH_...]
|
||||||
|
|
||||||
|
*rg* [_OPTIONS_] *--type-list*
|
||||||
|
|
||||||
|
*command* | *rg* [_OPTIONS_] _PATTERN_
|
||||||
|
|
||||||
|
*rg* [_OPTIONS_] *--help*
|
||||||
|
|
||||||
|
*rg* [_OPTIONS_] *--version*
|
||||||
|
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
ripgrep (rg) recursively searches your current directory for a regex pattern.
|
||||||
|
By default, ripgrep will respect your .gitignore and automatically skip hidden
|
||||||
|
files/directories and binary files.
|
||||||
|
|
||||||
|
ripgrep's default regex engine uses finite automata and guarantees linear
|
||||||
|
time searching. Because of this, features like backreferences and arbitrary
|
||||||
|
look-around are not supported. However, if ripgrep is built with PCRE2, then
|
||||||
|
the *--pcre2* flag can be used to enable backreferences and look-around.
|
||||||
|
|
||||||
|
ripgrep supports configuration files. Set *RIPGREP_CONFIG_PATH* to a
|
||||||
|
configuration file. The file can specify one shell argument per line. Lines
|
||||||
|
starting with *#* are ignored. For more details, see the man page or the
|
||||||
|
*README*.
|
||||||
|
|
||||||
|
Tip: to disable all smart filtering and make ripgrep behave a bit more like
|
||||||
|
classical grep, use *rg -uuu*.
|
||||||
|
|
||||||
|
|
||||||
|
REGEX SYNTAX
|
||||||
|
------------
|
||||||
|
ripgrep uses Rust's regex engine by default, which documents its syntax:
|
||||||
|
https://docs.rs/regex/*/regex/#syntax
|
||||||
|
|
||||||
|
ripgrep uses byte-oriented regexes, which has some additional documentation:
|
||||||
|
https://docs.rs/regex/*/regex/bytes/index.html#syntax
|
||||||
|
|
||||||
|
To a first approximation, ripgrep uses Perl-like regexes without look-around or
|
||||||
|
backreferences. This makes them very similar to the "extended" (ERE) regular
|
||||||
|
expressions supported by *egrep*, but with a few additional features like
|
||||||
|
Unicode character classes.
|
||||||
|
|
||||||
|
If you're using ripgrep with the *--pcre2* flag, then please consult
|
||||||
|
https://www.pcre.org or the PCRE2 man pages for documentation on the supported
|
||||||
|
syntax.
|
||||||
|
|
||||||
|
|
||||||
|
POSITIONAL ARGUMENTS
|
||||||
|
--------------------
|
||||||
|
_PATTERN_::
|
||||||
|
A regular expression used for searching. To match a pattern beginning with a
|
||||||
|
dash, use the -e/--regexp option.
|
||||||
|
|
||||||
|
_PATH_::
|
||||||
|
A file or directory to search. Directories are searched recursively. Paths
|
||||||
|
specified explicitly on the command line override glob and ignore rules.
|
||||||
|
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
Note that for many options, there exist flags to disable them. In some cases,
|
||||||
|
those flags are not listed in a first class way below. For example, the
|
||||||
|
*--column* flag (listed below) enables column numbers in ripgrep's output, but
|
||||||
|
the *--no-column* flag (not listed below) disables them. The reverse can also
|
||||||
|
exist. For example, the *--no-ignore* flag (listed below) disables ripgrep's
|
||||||
|
*gitignore* logic, but the *--ignore* flag (not listed below) enables it. These
|
||||||
|
flags are useful for overriding a ripgrep configuration file on the command
|
||||||
|
line. Each flag's documentation notes whether an inverted flag exists. In all
|
||||||
|
cases, the flag specified last takes precedence.
|
||||||
|
|
||||||
|
{OPTIONS}
|
||||||
|
|
||||||
|
|
||||||
|
EXIT STATUS
|
||||||
|
-----------
|
||||||
|
If ripgrep finds a match, then the exit status of the program is 0. If no match
|
||||||
|
could be found, then the exit status is 1. If an error occurred, then the exit
|
||||||
|
status is always 2 unless ripgrep was run with the *--quiet* flag and a match
|
||||||
|
was found. In summary:
|
||||||
|
|
||||||
|
* `0` exit status occurs only when at least one match was found, and if
|
||||||
|
no error occurred, unless *--quiet* was given.
|
||||||
|
* `1` exit status occurs only when no match was found and no error occurred.
|
||||||
|
* `2` exit status occurs when an error occurred. This is true for both
|
||||||
|
catastrophic errors (e.g., a regex syntax error) and for soft errors (e.g.,
|
||||||
|
unable to read a file).
|
||||||
|
|
||||||
|
|
||||||
|
CONFIGURATION FILES
|
||||||
|
-------------------
|
||||||
|
ripgrep supports reading configuration files that change ripgrep's default
|
||||||
|
behavior. The format of the configuration file is an "rc" style and is very
|
||||||
|
simple. It is defined by two rules:
|
||||||
|
|
||||||
|
1. Every line is a shell argument, after trimming whitespace.
|
||||||
|
2. Lines starting with *#* (optionally preceded by any amount of
|
||||||
|
whitespace) are ignored.
|
||||||
|
|
||||||
|
ripgrep will look for a single configuration file if and only if the
|
||||||
|
*RIPGREP_CONFIG_PATH* environment variable is set and is non-empty.
|
||||||
|
ripgrep will parse shell arguments from this file on startup and will
|
||||||
|
behave as if the arguments in this file were prepended to any explicit
|
||||||
|
arguments given to ripgrep on the command line.
|
||||||
|
|
||||||
|
For example, if your ripgreprc file contained a single line:
|
||||||
|
|
||||||
|
--smart-case
|
||||||
|
|
||||||
|
then the following command
|
||||||
|
|
||||||
|
RIPGREP_CONFIG_PATH=wherever/.ripgreprc rg foo
|
||||||
|
|
||||||
|
would behave identically to the following command
|
||||||
|
|
||||||
|
rg --smart-case foo
|
||||||
|
|
||||||
|
another example is adding types
|
||||||
|
|
||||||
|
--type-add
|
||||||
|
web:*.{html,css,js}*
|
||||||
|
|
||||||
|
would behave identically to the following command
|
||||||
|
|
||||||
|
rg --type-add 'web:*.{html,css,js}*' foo
|
||||||
|
|
||||||
|
same with using globs
|
||||||
|
|
||||||
|
--glob=!.git
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
--glob
|
||||||
|
!.git
|
||||||
|
|
||||||
|
would behave identically to the following command
|
||||||
|
|
||||||
|
rg --glob '!.git' foo
|
||||||
|
|
||||||
|
ripgrep also provides a flag, *--no-config*, that when present will suppress
|
||||||
|
any and all support for configuration. This includes any future support
|
||||||
|
for auto-loading configuration files from pre-determined paths.
|
||||||
|
|
||||||
|
Conflicts between configuration files and explicit arguments are handled
|
||||||
|
exactly like conflicts in the same command line invocation. That is,
|
||||||
|
this command:
|
||||||
|
|
||||||
|
RIPGREP_CONFIG_PATH=wherever/.ripgreprc rg foo --case-sensitive
|
||||||
|
|
||||||
|
is exactly equivalent to
|
||||||
|
|
||||||
|
rg --smart-case foo --case-sensitive
|
||||||
|
|
||||||
|
in which case, the *--case-sensitive* flag would override the *--smart-case*
|
||||||
|
flag.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL COMPLETION
|
||||||
|
----------------
|
||||||
|
Shell completion files are included in the release tarball for Bash, Fish, Zsh
|
||||||
|
and PowerShell.
|
||||||
|
|
||||||
|
For *bash*, move *rg.bash* to *$XDG_CONFIG_HOME/bash_completion*
|
||||||
|
or */etc/bash_completion.d/*.
|
||||||
|
|
||||||
|
For *fish*, move *rg.fish* to *$HOME/.config/fish/completions*.
|
||||||
|
|
||||||
|
For *zsh*, move *_rg* to one of your *$fpath* directories.
|
||||||
|
|
||||||
|
|
||||||
|
CAVEATS
|
||||||
|
-------
|
||||||
|
ripgrep may abort unexpectedly when using default settings if it searches a
|
||||||
|
file that is simultaneously truncated. This behavior can be avoided by passing
|
||||||
|
the *--no-mmap* flag which will forcefully disable the use of memory maps in
|
||||||
|
all cases.
|
||||||
|
|
||||||
|
ripgrep may use a large amount of memory depending on a few factors. Firstly,
|
||||||
|
if ripgrep uses parallelism for search (the default), then the entire output
|
||||||
|
for each individual file is buffered into memory in order to prevent
|
||||||
|
interleaving matches in the output. To avoid this, you can disable parallelism
|
||||||
|
with the *-j1* flag. Secondly, ripgrep always needs to have at least a single
|
||||||
|
line in memory in order to execute a search. A file with a very long line can
|
||||||
|
thus cause ripgrep to use a lot of memory. Generally, this only occurs when
|
||||||
|
searching binary data with the *-a* flag enabled. (When the *-a* flag isn't
|
||||||
|
enabled, ripgrep will replace all NUL bytes with line terminators, which
|
||||||
|
typically prevents exorbitant memory usage.) Thirdly, when ripgrep searches
|
||||||
|
a large file using a memory map, the process will report its resident memory
|
||||||
|
usage as the size of the file. However, this does not mean ripgrep actually
|
||||||
|
needed to use that much memory; the operating system will generally handle this
|
||||||
|
for you.
|
||||||
|
|
||||||
|
|
||||||
|
VERSION
|
||||||
|
-------
|
||||||
|
{VERSION}
|
||||||
|
|
||||||
|
|
||||||
|
HOMEPAGE
|
||||||
|
--------
|
||||||
|
https://github.com/BurntSushi/ripgrep
|
||||||
|
|
||||||
|
Please report bugs and feature requests in the issue tracker. Please do your
|
||||||
|
best to provide a reproducible test case for bugs. This should include the
|
||||||
|
corpus being searched, the *rg* command, the actual output and the expected
|
||||||
|
output. Please also include the output of running the same *rg* command but
|
||||||
|
with the *--debug* flag.
|
||||||
|
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Andrew Gallant <jamslam@gmail.com>
|
||||||
3
globset/COPYING
Normal file
3
globset/COPYING
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
This project is dual-licensed under the Unlicense and MIT licenses.
|
||||||
|
|
||||||
|
You may use this code under the terms of either license.
|
||||||
32
globset/Cargo.toml
Normal file
32
globset/Cargo.toml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
[package]
|
||||||
|
name = "globset"
|
||||||
|
version = "0.4.4" #:version
|
||||||
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
|
description = """
|
||||||
|
Cross platform single glob and glob set matching. Glob set matching is the
|
||||||
|
process of matching one or more glob patterns against a single candidate path
|
||||||
|
simultaneously, and returning all of the globs that matched.
|
||||||
|
"""
|
||||||
|
documentation = "https://docs.rs/globset"
|
||||||
|
homepage = "https://github.com/BurntSushi/ripgrep/tree/master/globset"
|
||||||
|
repository = "https://github.com/BurntSushi/ripgrep/tree/master/globset"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["regex", "glob", "multiple", "set", "pattern"]
|
||||||
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "globset"
|
||||||
|
bench = false
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
aho-corasick = "0.7.3"
|
||||||
|
bstr = { version = "0.2.0", default-features = false, features = ["std"] }
|
||||||
|
fnv = "1.0.6"
|
||||||
|
log = "0.4.5"
|
||||||
|
regex = "1.1.5"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
glob = "0.3.0"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
simd-accel = []
|
||||||
21
globset/LICENSE-MIT
Normal file
21
globset/LICENSE-MIT
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Andrew Gallant
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
122
globset/README.md
Normal file
122
globset/README.md
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
globset
|
||||||
|
=======
|
||||||
|
Cross platform single glob and glob set matching. Glob set matching is the
|
||||||
|
process of matching one or more glob patterns against a single candidate path
|
||||||
|
simultaneously, and returning all of the globs that matched.
|
||||||
|
|
||||||
|
[](https://travis-ci.org/BurntSushi/ripgrep)
|
||||||
|
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||||
|
[](https://crates.io/crates/globset)
|
||||||
|
|
||||||
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
[https://docs.rs/globset](https://docs.rs/globset)
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Add this to your `Cargo.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
globset = "0.3"
|
||||||
|
```
|
||||||
|
|
||||||
|
and this to your crate root:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
extern crate globset;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example: one glob
|
||||||
|
|
||||||
|
This example shows how to match a single glob against a single file path.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use globset::Glob;
|
||||||
|
|
||||||
|
let glob = Glob::new("*.rs")?.compile_matcher();
|
||||||
|
|
||||||
|
assert!(glob.is_match("foo.rs"));
|
||||||
|
assert!(glob.is_match("foo/bar.rs"));
|
||||||
|
assert!(!glob.is_match("Cargo.toml"));
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example: configuring a glob matcher
|
||||||
|
|
||||||
|
This example shows how to use a `GlobBuilder` to configure aspects of match
|
||||||
|
semantics. In this example, we prevent wildcards from matching path separators.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use globset::GlobBuilder;
|
||||||
|
|
||||||
|
let glob = GlobBuilder::new("*.rs")
|
||||||
|
.literal_separator(true).build()?.compile_matcher();
|
||||||
|
|
||||||
|
assert!(glob.is_match("foo.rs"));
|
||||||
|
assert!(!glob.is_match("foo/bar.rs")); // no longer matches
|
||||||
|
assert!(!glob.is_match("Cargo.toml"));
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example: match multiple globs at once
|
||||||
|
|
||||||
|
This example shows how to match multiple glob patterns at once.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use globset::{Glob, GlobSetBuilder};
|
||||||
|
|
||||||
|
let mut builder = GlobSetBuilder::new();
|
||||||
|
// A GlobBuilder can be used to configure each glob's match semantics
|
||||||
|
// independently.
|
||||||
|
builder.add(Glob::new("*.rs")?);
|
||||||
|
builder.add(Glob::new("src/lib.rs")?);
|
||||||
|
builder.add(Glob::new("src/**/foo.rs")?);
|
||||||
|
let set = builder.build()?;
|
||||||
|
|
||||||
|
assert_eq!(set.matches("src/bar/baz/foo.rs"), vec![0, 2]);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Performance
|
||||||
|
|
||||||
|
This crate implements globs by converting them to regular expressions, and
|
||||||
|
executing them with the
|
||||||
|
[`regex`](https://github.com/rust-lang-nursery/regex)
|
||||||
|
crate.
|
||||||
|
|
||||||
|
For single glob matching, performance of this crate should be roughly on par
|
||||||
|
with the performance of the
|
||||||
|
[`glob`](https://github.com/rust-lang-nursery/glob)
|
||||||
|
crate. (`*_regex` correspond to benchmarks for this library while `*_glob`
|
||||||
|
correspond to benchmarks for the `glob` library.)
|
||||||
|
Optimizations in the `regex` crate may propel this library past `glob`,
|
||||||
|
particularly when matching longer paths.
|
||||||
|
|
||||||
|
```
|
||||||
|
test ext_glob ... bench: 425 ns/iter (+/- 21)
|
||||||
|
test ext_regex ... bench: 175 ns/iter (+/- 10)
|
||||||
|
test long_glob ... bench: 182 ns/iter (+/- 11)
|
||||||
|
test long_regex ... bench: 173 ns/iter (+/- 10)
|
||||||
|
test short_glob ... bench: 69 ns/iter (+/- 4)
|
||||||
|
test short_regex ... bench: 83 ns/iter (+/- 2)
|
||||||
|
```
|
||||||
|
|
||||||
|
The primary performance advantage of this crate is when matching multiple
|
||||||
|
globs against a single path. With the `glob` crate, one must match each glob
|
||||||
|
synchronously, one after the other. In this crate, many can be matched
|
||||||
|
simultaneously. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
test many_short_glob ... bench: 1,063 ns/iter (+/- 47)
|
||||||
|
test many_short_regex_set ... bench: 186 ns/iter (+/- 11)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Comparison with the [`glob`](https://github.com/rust-lang-nursery/glob) crate
|
||||||
|
|
||||||
|
* Supports alternate "or" globs, e.g., `*.{foo,bar}`.
|
||||||
|
* Can match non-UTF-8 file paths correctly.
|
||||||
|
* Supports matching multiple globs at once.
|
||||||
|
* Doesn't provide a recursive directory iterator of matching file paths,
|
||||||
|
although I believe this crate should grow one eventually.
|
||||||
|
* Supports case insensitive and require-literal-separator match options, but
|
||||||
|
**doesn't** support the require-literal-leading-dot option.
|
||||||
24
globset/UNLICENSE
Normal file
24
globset/UNLICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
@@ -1,37 +1,57 @@
|
|||||||
|
/*!
|
||||||
|
This module benchmarks the glob implementation. For benchmarks on the ripgrep
|
||||||
|
tool itself, see the benchsuite directory.
|
||||||
|
*/
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
extern crate glob;
|
extern crate glob;
|
||||||
|
extern crate globset;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
||||||
|
use std::ffi::OsStr;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
|
use globset::{Candidate, Glob, GlobMatcher, GlobSet, GlobSetBuilder};
|
||||||
|
|
||||||
|
const EXT: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt";
|
||||||
|
const EXT_PAT: &'static str = "*.txt";
|
||||||
|
|
||||||
const SHORT: &'static str = "some/needle.txt";
|
const SHORT: &'static str = "some/needle.txt";
|
||||||
const SHORT_PAT: &'static str = "some/**/needle.txt";
|
const SHORT_PAT: &'static str = "some/**/needle.txt";
|
||||||
|
|
||||||
const LONG: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt";
|
const LONG: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt";
|
||||||
const LONG_PAT: &'static str = "some/**/needle.txt";
|
const LONG_PAT: &'static str = "some/**/needle.txt";
|
||||||
|
|
||||||
#[allow(dead_code, unused_variables)]
|
|
||||||
#[path = "../src/glob.rs"]
|
|
||||||
mod reglob;
|
|
||||||
|
|
||||||
fn new_glob(pat: &str) -> glob::Pattern {
|
fn new_glob(pat: &str) -> glob::Pattern {
|
||||||
glob::Pattern::new(pat).unwrap()
|
glob::Pattern::new(pat).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_reglob(pat: &str) -> reglob::Set {
|
fn new_reglob(pat: &str) -> GlobMatcher {
|
||||||
let mut builder = reglob::SetBuilder::new();
|
Glob::new(pat).unwrap().compile_matcher()
|
||||||
builder.add(pat).unwrap();
|
}
|
||||||
|
|
||||||
|
fn new_reglob_many(pats: &[&str]) -> GlobSet {
|
||||||
|
let mut builder = GlobSetBuilder::new();
|
||||||
|
for pat in pats {
|
||||||
|
builder.add(Glob::new(pat).unwrap());
|
||||||
|
}
|
||||||
builder.build().unwrap()
|
builder.build().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_reglob_many(pats: &[&str]) -> reglob::Set {
|
#[bench]
|
||||||
let mut builder = reglob::SetBuilder::new();
|
fn ext_glob(b: &mut test::Bencher) {
|
||||||
for pat in pats {
|
let pat = new_glob(EXT_PAT);
|
||||||
builder.add(pat).unwrap();
|
b.iter(|| assert!(pat.matches(EXT)));
|
||||||
}
|
}
|
||||||
builder.build().unwrap()
|
|
||||||
|
#[bench]
|
||||||
|
fn ext_regex(b: &mut test::Bencher) {
|
||||||
|
let set = new_reglob(EXT_PAT);
|
||||||
|
let cand = Candidate::new(EXT);
|
||||||
|
b.iter(|| assert!(set.is_match_candidate(&cand)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
@@ -43,7 +63,8 @@ fn short_glob(b: &mut test::Bencher) {
|
|||||||
#[bench]
|
#[bench]
|
||||||
fn short_regex(b: &mut test::Bencher) {
|
fn short_regex(b: &mut test::Bencher) {
|
||||||
let set = new_reglob(SHORT_PAT);
|
let set = new_reglob(SHORT_PAT);
|
||||||
b.iter(|| assert!(set.is_match(SHORT)));
|
let cand = Candidate::new(SHORT);
|
||||||
|
b.iter(|| assert!(set.is_match_candidate(&cand)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
@@ -55,7 +76,8 @@ fn long_glob(b: &mut test::Bencher) {
|
|||||||
#[bench]
|
#[bench]
|
||||||
fn long_regex(b: &mut test::Bencher) {
|
fn long_regex(b: &mut test::Bencher) {
|
||||||
let set = new_reglob(LONG_PAT);
|
let set = new_reglob(LONG_PAT);
|
||||||
b.iter(|| assert!(set.is_match(LONG)));
|
let cand = Candidate::new(LONG);
|
||||||
|
b.iter(|| assert!(set.is_match_candidate(&cand)));
|
||||||
}
|
}
|
||||||
|
|
||||||
const MANY_SHORT_GLOBS: &'static [&'static str] = &[
|
const MANY_SHORT_GLOBS: &'static [&'static str] = &[
|
||||||
@@ -97,26 +119,3 @@ fn many_short_regex_set(b: &mut test::Bencher) {
|
|||||||
let set = new_reglob_many(MANY_SHORT_GLOBS);
|
let set = new_reglob_many(MANY_SHORT_GLOBS);
|
||||||
b.iter(|| assert_eq!(2, set.matches(MANY_SHORT_SEARCH).iter().count()));
|
b.iter(|| assert_eq!(2, set.matches(MANY_SHORT_SEARCH).iter().count()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the fastest on my system (beating many_glob by about 2x). This
|
|
||||||
// suggests that a RegexSet needs quite a few regexes (or a larger haystack)
|
|
||||||
// in order for it to scale.
|
|
||||||
//
|
|
||||||
// TODO(burntsushi): come up with a benchmark that uses more complex patterns
|
|
||||||
// or a longer haystack.
|
|
||||||
#[bench]
|
|
||||||
fn many_short_regex_pattern(b: &mut test::Bencher) {
|
|
||||||
let pats: Vec<_> = MANY_SHORT_GLOBS.iter().map(|&s| {
|
|
||||||
let pat = reglob::Pattern::new(s).unwrap();
|
|
||||||
regex::Regex::new(&pat.to_regex()).unwrap()
|
|
||||||
}).collect();
|
|
||||||
b.iter(|| {
|
|
||||||
let mut count = 0;
|
|
||||||
for pat in &pats {
|
|
||||||
if pat.is_match(MANY_SHORT_SEARCH) {
|
|
||||||
count += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assert_eq!(2, count);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
1497
globset/src/glob.rs
Normal file
1497
globset/src/glob.rs
Normal file
File diff suppressed because it is too large
Load Diff
871
globset/src/lib.rs
Normal file
871
globset/src/lib.rs
Normal file
@@ -0,0 +1,871 @@
|
|||||||
|
/*!
|
||||||
|
The globset crate provides cross platform single glob and glob set matching.
|
||||||
|
|
||||||
|
Glob set matching is the process of matching one or more glob patterns against
|
||||||
|
a single candidate path simultaneously, and returning all of the globs that
|
||||||
|
matched. For example, given this set of globs:
|
||||||
|
|
||||||
|
```ignore
|
||||||
|
*.rs
|
||||||
|
src/lib.rs
|
||||||
|
src/**/foo.rs
|
||||||
|
```
|
||||||
|
|
||||||
|
and a path `src/bar/baz/foo.rs`, then the set would report the first and third
|
||||||
|
globs as matching.
|
||||||
|
|
||||||
|
# Example: one glob
|
||||||
|
|
||||||
|
This example shows how to match a single glob against a single file path.
|
||||||
|
|
||||||
|
```
|
||||||
|
# fn example() -> Result<(), globset::Error> {
|
||||||
|
use globset::Glob;
|
||||||
|
|
||||||
|
let glob = Glob::new("*.rs")?.compile_matcher();
|
||||||
|
|
||||||
|
assert!(glob.is_match("foo.rs"));
|
||||||
|
assert!(glob.is_match("foo/bar.rs"));
|
||||||
|
assert!(!glob.is_match("Cargo.toml"));
|
||||||
|
# Ok(()) } example().unwrap();
|
||||||
|
```
|
||||||
|
|
||||||
|
# Example: configuring a glob matcher
|
||||||
|
|
||||||
|
This example shows how to use a `GlobBuilder` to configure aspects of match
|
||||||
|
semantics. In this example, we prevent wildcards from matching path separators.
|
||||||
|
|
||||||
|
```
|
||||||
|
# fn example() -> Result<(), globset::Error> {
|
||||||
|
use globset::GlobBuilder;
|
||||||
|
|
||||||
|
let glob = GlobBuilder::new("*.rs")
|
||||||
|
.literal_separator(true).build()?.compile_matcher();
|
||||||
|
|
||||||
|
assert!(glob.is_match("foo.rs"));
|
||||||
|
assert!(!glob.is_match("foo/bar.rs")); // no longer matches
|
||||||
|
assert!(!glob.is_match("Cargo.toml"));
|
||||||
|
# Ok(()) } example().unwrap();
|
||||||
|
```
|
||||||
|
|
||||||
|
# Example: match multiple globs at once
|
||||||
|
|
||||||
|
This example shows how to match multiple glob patterns at once.
|
||||||
|
|
||||||
|
```
|
||||||
|
# fn example() -> Result<(), globset::Error> {
|
||||||
|
use globset::{Glob, GlobSetBuilder};
|
||||||
|
|
||||||
|
let mut builder = GlobSetBuilder::new();
|
||||||
|
// A GlobBuilder can be used to configure each glob's match semantics
|
||||||
|
// independently.
|
||||||
|
builder.add(Glob::new("*.rs")?);
|
||||||
|
builder.add(Glob::new("src/lib.rs")?);
|
||||||
|
builder.add(Glob::new("src/**/foo.rs")?);
|
||||||
|
let set = builder.build()?;
|
||||||
|
|
||||||
|
assert_eq!(set.matches("src/bar/baz/foo.rs"), vec![0, 2]);
|
||||||
|
# Ok(()) } example().unwrap();
|
||||||
|
```
|
||||||
|
|
||||||
|
# Syntax
|
||||||
|
|
||||||
|
Standard Unix-style glob syntax is supported:
|
||||||
|
|
||||||
|
* `?` matches any single character. (If the `literal_separator` option is
|
||||||
|
enabled, then `?` can never match a path separator.)
|
||||||
|
* `*` matches zero or more characters. (If the `literal_separator` option is
|
||||||
|
enabled, then `*` can never match a path separator.)
|
||||||
|
* `**` recursively matches directories but are only legal in three situations.
|
||||||
|
First, if the glob starts with <code>\*\*/</code>, then it matches
|
||||||
|
all directories. For example, <code>\*\*/foo</code> matches `foo`
|
||||||
|
and `bar/foo` but not `foo/bar`. Secondly, if the glob ends with
|
||||||
|
<code>/\*\*</code>, then it matches all sub-entries. For example,
|
||||||
|
<code>foo/\*\*</code> matches `foo/a` and `foo/a/b`, but not `foo`.
|
||||||
|
Thirdly, if the glob contains <code>/\*\*/</code> anywhere within
|
||||||
|
the pattern, then it matches zero or more directories. Using `**` anywhere
|
||||||
|
else is illegal (N.B. the glob `**` is allowed and means "match everything").
|
||||||
|
* `{a,b}` matches `a` or `b` where `a` and `b` are arbitrary glob patterns.
|
||||||
|
(N.B. Nesting `{...}` is not currently allowed.)
|
||||||
|
* `[ab]` matches `a` or `b` where `a` and `b` are characters. Use
|
||||||
|
`[!ab]` to match any character except for `a` and `b`.
|
||||||
|
* Metacharacters such as `*` and `?` can be escaped with character class
|
||||||
|
notation. e.g., `[*]` matches `*`.
|
||||||
|
* When backslash escapes are enabled, a backslash (`\`) will escape all meta
|
||||||
|
characters in a glob. If it precedes a non-meta character, then the slash is
|
||||||
|
ignored. A `\\` will match a literal `\\`. Note that this mode is only
|
||||||
|
enabled on Unix platforms by default, but can be enabled on any platform
|
||||||
|
via the `backslash_escape` setting on `Glob`.
|
||||||
|
|
||||||
|
A `GlobBuilder` can be used to prevent wildcards from matching path separators,
|
||||||
|
or to enable case insensitive matching.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
|
extern crate aho_corasick;
|
||||||
|
extern crate bstr;
|
||||||
|
extern crate fnv;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate log;
|
||||||
|
extern crate regex;
|
||||||
|
|
||||||
|
use std::borrow::Cow;
|
||||||
|
use std::collections::{BTreeMap, HashMap};
|
||||||
|
use std::error::Error as StdError;
|
||||||
|
use std::fmt;
|
||||||
|
use std::hash;
|
||||||
|
use std::path::Path;
|
||||||
|
use std::str;
|
||||||
|
|
||||||
|
use aho_corasick::AhoCorasick;
|
||||||
|
use bstr::{B, ByteSlice, ByteVec};
|
||||||
|
use regex::bytes::{Regex, RegexBuilder, RegexSet};
|
||||||
|
|
||||||
|
use pathutil::{file_name, file_name_ext, normalize_path};
|
||||||
|
use glob::MatchStrategy;
|
||||||
|
pub use glob::{Glob, GlobBuilder, GlobMatcher};
|
||||||
|
|
||||||
|
mod glob;
|
||||||
|
mod pathutil;
|
||||||
|
|
||||||
|
/// Represents an error that can occur when parsing a glob pattern.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct Error {
|
||||||
|
/// The original glob provided by the caller.
|
||||||
|
glob: Option<String>,
|
||||||
|
/// The kind of error.
|
||||||
|
kind: ErrorKind,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The kind of error that can occur when parsing a glob pattern.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub enum ErrorKind {
|
||||||
|
/// **DEPRECATED**.
|
||||||
|
///
|
||||||
|
/// This error used to occur for consistency with git's glob specification,
|
||||||
|
/// but the specification now accepts all uses of `**`. When `**` does not
|
||||||
|
/// appear adjacent to a path separator or at the beginning/end of a glob,
|
||||||
|
/// it is now treated as two consecutive `*` patterns. As such, this error
|
||||||
|
/// is no longer used.
|
||||||
|
InvalidRecursive,
|
||||||
|
/// Occurs when a character class (e.g., `[abc]`) is not closed.
|
||||||
|
UnclosedClass,
|
||||||
|
/// Occurs when a range in a character (e.g., `[a-z]`) is invalid. For
|
||||||
|
/// example, if the range starts with a lexicographically larger character
|
||||||
|
/// than it ends with.
|
||||||
|
InvalidRange(char, char),
|
||||||
|
/// Occurs when a `}` is found without a matching `{`.
|
||||||
|
UnopenedAlternates,
|
||||||
|
/// Occurs when a `{` is found without a matching `}`.
|
||||||
|
UnclosedAlternates,
|
||||||
|
/// Occurs when an alternating group is nested inside another alternating
|
||||||
|
/// group, e.g., `{{a,b},{c,d}}`.
|
||||||
|
NestedAlternates,
|
||||||
|
/// Occurs when an unescaped '\' is found at the end of a glob.
|
||||||
|
DanglingEscape,
|
||||||
|
/// An error associated with parsing or compiling a regex.
|
||||||
|
Regex(String),
|
||||||
|
/// Hints that destructuring should not be exhaustive.
|
||||||
|
///
|
||||||
|
/// This enum may grow additional variants, so this makes sure clients
|
||||||
|
/// don't count on exhaustive matching. (Otherwise, adding a new variant
|
||||||
|
/// could break existing code.)
|
||||||
|
#[doc(hidden)]
|
||||||
|
__Nonexhaustive,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StdError for Error {
|
||||||
|
fn description(&self) -> &str {
|
||||||
|
self.kind.description()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Error {
|
||||||
|
/// Return the glob that caused this error, if one exists.
|
||||||
|
pub fn glob(&self) -> Option<&str> {
|
||||||
|
self.glob.as_ref().map(|s| &**s)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the kind of this error.
|
||||||
|
pub fn kind(&self) -> &ErrorKind {
|
||||||
|
&self.kind
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ErrorKind {
|
||||||
|
fn description(&self) -> &str {
|
||||||
|
match *self {
|
||||||
|
ErrorKind::InvalidRecursive => {
|
||||||
|
"invalid use of **; must be one path component"
|
||||||
|
}
|
||||||
|
ErrorKind::UnclosedClass => {
|
||||||
|
"unclosed character class; missing ']'"
|
||||||
|
}
|
||||||
|
ErrorKind::InvalidRange(_, _) => {
|
||||||
|
"invalid character range"
|
||||||
|
}
|
||||||
|
ErrorKind::UnopenedAlternates => {
|
||||||
|
"unopened alternate group; missing '{' \
|
||||||
|
(maybe escape '}' with '[}]'?)"
|
||||||
|
}
|
||||||
|
ErrorKind::UnclosedAlternates => {
|
||||||
|
"unclosed alternate group; missing '}' \
|
||||||
|
(maybe escape '{' with '[{]'?)"
|
||||||
|
}
|
||||||
|
ErrorKind::NestedAlternates => {
|
||||||
|
"nested alternate groups are not allowed"
|
||||||
|
}
|
||||||
|
ErrorKind::DanglingEscape => {
|
||||||
|
"dangling '\\'"
|
||||||
|
}
|
||||||
|
ErrorKind::Regex(ref err) => err,
|
||||||
|
ErrorKind::__Nonexhaustive => unreachable!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for Error {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match self.glob {
|
||||||
|
None => self.kind.fmt(f),
|
||||||
|
Some(ref glob) => {
|
||||||
|
write!(f, "error parsing glob '{}': {}", glob, self.kind)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for ErrorKind {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match *self {
|
||||||
|
ErrorKind::InvalidRecursive
|
||||||
|
| ErrorKind::UnclosedClass
|
||||||
|
| ErrorKind::UnopenedAlternates
|
||||||
|
| ErrorKind::UnclosedAlternates
|
||||||
|
| ErrorKind::NestedAlternates
|
||||||
|
| ErrorKind::DanglingEscape
|
||||||
|
| ErrorKind::Regex(_) => {
|
||||||
|
write!(f, "{}", self.description())
|
||||||
|
}
|
||||||
|
ErrorKind::InvalidRange(s, e) => {
|
||||||
|
write!(f, "invalid range; '{}' > '{}'", s, e)
|
||||||
|
}
|
||||||
|
ErrorKind::__Nonexhaustive => unreachable!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn new_regex(pat: &str) -> Result<Regex, Error> {
|
||||||
|
RegexBuilder::new(pat)
|
||||||
|
.dot_matches_new_line(true)
|
||||||
|
.size_limit(10 * (1 << 20))
|
||||||
|
.dfa_size_limit(10 * (1 << 20))
|
||||||
|
.build()
|
||||||
|
.map_err(|err| {
|
||||||
|
Error {
|
||||||
|
glob: Some(pat.to_string()),
|
||||||
|
kind: ErrorKind::Regex(err.to_string()),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn new_regex_set<I, S>(pats: I) -> Result<RegexSet, Error>
|
||||||
|
where S: AsRef<str>, I: IntoIterator<Item=S> {
|
||||||
|
RegexSet::new(pats).map_err(|err| {
|
||||||
|
Error {
|
||||||
|
glob: None,
|
||||||
|
kind: ErrorKind::Regex(err.to_string()),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
type Fnv = hash::BuildHasherDefault<fnv::FnvHasher>;
|
||||||
|
|
||||||
|
/// GlobSet represents a group of globs that can be matched together in a
|
||||||
|
/// single pass.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct GlobSet {
|
||||||
|
len: usize,
|
||||||
|
strats: Vec<GlobSetMatchStrategy>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl GlobSet {
|
||||||
|
/// Create an empty `GlobSet`. An empty set matches nothing.
|
||||||
|
#[inline]
|
||||||
|
pub fn empty() -> GlobSet {
|
||||||
|
GlobSet {
|
||||||
|
len: 0,
|
||||||
|
strats: vec![],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if this set is empty, and therefore matches nothing.
|
||||||
|
#[inline]
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.len == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the number of globs in this set.
|
||||||
|
#[inline]
|
||||||
|
pub fn len(&self) -> usize {
|
||||||
|
self.len
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if any glob in this set matches the path given.
|
||||||
|
pub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool {
|
||||||
|
self.is_match_candidate(&Candidate::new(path.as_ref()))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if any glob in this set matches the path given.
|
||||||
|
///
|
||||||
|
/// This takes a Candidate as input, which can be used to amortize the
|
||||||
|
/// cost of preparing a path for matching.
|
||||||
|
pub fn is_match_candidate(&self, path: &Candidate) -> bool {
|
||||||
|
if self.is_empty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for strat in &self.strats {
|
||||||
|
if strat.is_match(path) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the sequence number of every glob pattern that matches the
|
||||||
|
/// given path.
|
||||||
|
pub fn matches<P: AsRef<Path>>(&self, path: P) -> Vec<usize> {
|
||||||
|
self.matches_candidate(&Candidate::new(path.as_ref()))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the sequence number of every glob pattern that matches the
|
||||||
|
/// given path.
|
||||||
|
///
|
||||||
|
/// This takes a Candidate as input, which can be used to amortize the
|
||||||
|
/// cost of preparing a path for matching.
|
||||||
|
pub fn matches_candidate(&self, path: &Candidate) -> Vec<usize> {
|
||||||
|
let mut into = vec![];
|
||||||
|
if self.is_empty() {
|
||||||
|
return into;
|
||||||
|
}
|
||||||
|
self.matches_candidate_into(path, &mut into);
|
||||||
|
into
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Adds the sequence number of every glob pattern that matches the given
|
||||||
|
/// path to the vec given.
|
||||||
|
///
|
||||||
|
/// `into` is is cleared before matching begins, and contains the set of
|
||||||
|
/// sequence numbers (in ascending order) after matching ends. If no globs
|
||||||
|
/// were matched, then `into` will be empty.
|
||||||
|
pub fn matches_into<P: AsRef<Path>>(
|
||||||
|
&self,
|
||||||
|
path: P,
|
||||||
|
into: &mut Vec<usize>,
|
||||||
|
) {
|
||||||
|
self.matches_candidate_into(&Candidate::new(path.as_ref()), into);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Adds the sequence number of every glob pattern that matches the given
|
||||||
|
/// path to the vec given.
|
||||||
|
///
|
||||||
|
/// `into` is is cleared before matching begins, and contains the set of
|
||||||
|
/// sequence numbers (in ascending order) after matching ends. If no globs
|
||||||
|
/// were matched, then `into` will be empty.
|
||||||
|
///
|
||||||
|
/// This takes a Candidate as input, which can be used to amortize the
|
||||||
|
/// cost of preparing a path for matching.
|
||||||
|
pub fn matches_candidate_into(
|
||||||
|
&self,
|
||||||
|
path: &Candidate,
|
||||||
|
into: &mut Vec<usize>,
|
||||||
|
) {
|
||||||
|
into.clear();
|
||||||
|
if self.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for strat in &self.strats {
|
||||||
|
strat.matches_into(path, into);
|
||||||
|
}
|
||||||
|
into.sort();
|
||||||
|
into.dedup();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn new(pats: &[Glob]) -> Result<GlobSet, Error> {
|
||||||
|
if pats.is_empty() {
|
||||||
|
return Ok(GlobSet { len: 0, strats: vec![] });
|
||||||
|
}
|
||||||
|
let mut lits = LiteralStrategy::new();
|
||||||
|
let mut base_lits = BasenameLiteralStrategy::new();
|
||||||
|
let mut exts = ExtensionStrategy::new();
|
||||||
|
let mut prefixes = MultiStrategyBuilder::new();
|
||||||
|
let mut suffixes = MultiStrategyBuilder::new();
|
||||||
|
let mut required_exts = RequiredExtensionStrategyBuilder::new();
|
||||||
|
let mut regexes = MultiStrategyBuilder::new();
|
||||||
|
for (i, p) in pats.iter().enumerate() {
|
||||||
|
match MatchStrategy::new(p) {
|
||||||
|
MatchStrategy::Literal(lit) => {
|
||||||
|
lits.add(i, lit);
|
||||||
|
}
|
||||||
|
MatchStrategy::BasenameLiteral(lit) => {
|
||||||
|
base_lits.add(i, lit);
|
||||||
|
}
|
||||||
|
MatchStrategy::Extension(ext) => {
|
||||||
|
exts.add(i, ext);
|
||||||
|
}
|
||||||
|
MatchStrategy::Prefix(prefix) => {
|
||||||
|
prefixes.add(i, prefix);
|
||||||
|
}
|
||||||
|
MatchStrategy::Suffix { suffix, component } => {
|
||||||
|
if component {
|
||||||
|
lits.add(i, suffix[1..].to_string());
|
||||||
|
}
|
||||||
|
suffixes.add(i, suffix);
|
||||||
|
}
|
||||||
|
MatchStrategy::RequiredExtension(ext) => {
|
||||||
|
required_exts.add(i, ext, p.regex().to_owned());
|
||||||
|
}
|
||||||
|
MatchStrategy::Regex => {
|
||||||
|
debug!("glob converted to regex: {:?}", p);
|
||||||
|
regexes.add(i, p.regex().to_owned());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
debug!("built glob set; {} literals, {} basenames, {} extensions, \
|
||||||
|
{} prefixes, {} suffixes, {} required extensions, {} regexes",
|
||||||
|
lits.0.len(), base_lits.0.len(), exts.0.len(),
|
||||||
|
prefixes.literals.len(), suffixes.literals.len(),
|
||||||
|
required_exts.0.len(), regexes.literals.len());
|
||||||
|
Ok(GlobSet {
|
||||||
|
len: pats.len(),
|
||||||
|
strats: vec![
|
||||||
|
GlobSetMatchStrategy::Extension(exts),
|
||||||
|
GlobSetMatchStrategy::BasenameLiteral(base_lits),
|
||||||
|
GlobSetMatchStrategy::Literal(lits),
|
||||||
|
GlobSetMatchStrategy::Suffix(suffixes.suffix()),
|
||||||
|
GlobSetMatchStrategy::Prefix(prefixes.prefix()),
|
||||||
|
GlobSetMatchStrategy::RequiredExtension(
|
||||||
|
required_exts.build()?),
|
||||||
|
GlobSetMatchStrategy::Regex(regexes.regex_set()?),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// GlobSetBuilder builds a group of patterns that can be used to
|
||||||
|
/// simultaneously match a file path.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct GlobSetBuilder {
|
||||||
|
pats: Vec<Glob>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl GlobSetBuilder {
|
||||||
|
/// Create a new GlobSetBuilder. A GlobSetBuilder can be used to add new
|
||||||
|
/// patterns. Once all patterns have been added, `build` should be called
|
||||||
|
/// to produce a `GlobSet`, which can then be used for matching.
|
||||||
|
pub fn new() -> GlobSetBuilder {
|
||||||
|
GlobSetBuilder { pats: vec![] }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Builds a new matcher from all of the glob patterns added so far.
|
||||||
|
///
|
||||||
|
/// Once a matcher is built, no new patterns can be added to it.
|
||||||
|
pub fn build(&self) -> Result<GlobSet, Error> {
|
||||||
|
GlobSet::new(&self.pats)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add a new pattern to this set.
|
||||||
|
pub fn add(&mut self, pat: Glob) -> &mut GlobSetBuilder {
|
||||||
|
self.pats.push(pat);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A candidate path for matching.
|
||||||
|
///
|
||||||
|
/// All glob matching in this crate operates on `Candidate` values.
|
||||||
|
/// Constructing candidates has a very small cost associated with it, so
|
||||||
|
/// callers may find it beneficial to amortize that cost when matching a single
|
||||||
|
/// path against multiple globs or sets of globs.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct Candidate<'a> {
|
||||||
|
path: Cow<'a, [u8]>,
|
||||||
|
basename: Cow<'a, [u8]>,
|
||||||
|
ext: Cow<'a, [u8]>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Candidate<'a> {
|
||||||
|
/// Create a new candidate for matching from the given path.
|
||||||
|
pub fn new<P: AsRef<Path> + ?Sized>(path: &'a P) -> Candidate<'a> {
|
||||||
|
let path = normalize_path(Vec::from_path_lossy(path.as_ref()));
|
||||||
|
let basename = file_name(&path).unwrap_or(Cow::Borrowed(B("")));
|
||||||
|
let ext = file_name_ext(&basename).unwrap_or(Cow::Borrowed(B("")));
|
||||||
|
Candidate {
|
||||||
|
path: path,
|
||||||
|
basename: basename,
|
||||||
|
ext: ext,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn path_prefix(&self, max: usize) -> &[u8] {
|
||||||
|
if self.path.len() <= max {
|
||||||
|
&*self.path
|
||||||
|
} else {
|
||||||
|
&self.path[..max]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn path_suffix(&self, max: usize) -> &[u8] {
|
||||||
|
if self.path.len() <= max {
|
||||||
|
&*self.path
|
||||||
|
} else {
|
||||||
|
&self.path[self.path.len() - max..]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
enum GlobSetMatchStrategy {
|
||||||
|
Literal(LiteralStrategy),
|
||||||
|
BasenameLiteral(BasenameLiteralStrategy),
|
||||||
|
Extension(ExtensionStrategy),
|
||||||
|
Prefix(PrefixStrategy),
|
||||||
|
Suffix(SuffixStrategy),
|
||||||
|
RequiredExtension(RequiredExtensionStrategy),
|
||||||
|
Regex(RegexSetStrategy),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl GlobSetMatchStrategy {
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
use self::GlobSetMatchStrategy::*;
|
||||||
|
match *self {
|
||||||
|
Literal(ref s) => s.is_match(candidate),
|
||||||
|
BasenameLiteral(ref s) => s.is_match(candidate),
|
||||||
|
Extension(ref s) => s.is_match(candidate),
|
||||||
|
Prefix(ref s) => s.is_match(candidate),
|
||||||
|
Suffix(ref s) => s.is_match(candidate),
|
||||||
|
RequiredExtension(ref s) => s.is_match(candidate),
|
||||||
|
Regex(ref s) => s.is_match(candidate),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
use self::GlobSetMatchStrategy::*;
|
||||||
|
match *self {
|
||||||
|
Literal(ref s) => s.matches_into(candidate, matches),
|
||||||
|
BasenameLiteral(ref s) => s.matches_into(candidate, matches),
|
||||||
|
Extension(ref s) => s.matches_into(candidate, matches),
|
||||||
|
Prefix(ref s) => s.matches_into(candidate, matches),
|
||||||
|
Suffix(ref s) => s.matches_into(candidate, matches),
|
||||||
|
RequiredExtension(ref s) => s.matches_into(candidate, matches),
|
||||||
|
Regex(ref s) => s.matches_into(candidate, matches),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct LiteralStrategy(BTreeMap<Vec<u8>, Vec<usize>>);
|
||||||
|
|
||||||
|
impl LiteralStrategy {
|
||||||
|
fn new() -> LiteralStrategy {
|
||||||
|
LiteralStrategy(BTreeMap::new())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn add(&mut self, global_index: usize, lit: String) {
|
||||||
|
self.0.entry(lit.into_bytes()).or_insert(vec![]).push(global_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
self.0.contains_key(candidate.path.as_bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
if let Some(hits) = self.0.get(candidate.path.as_bytes()) {
|
||||||
|
matches.extend(hits);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct BasenameLiteralStrategy(BTreeMap<Vec<u8>, Vec<usize>>);
|
||||||
|
|
||||||
|
impl BasenameLiteralStrategy {
|
||||||
|
fn new() -> BasenameLiteralStrategy {
|
||||||
|
BasenameLiteralStrategy(BTreeMap::new())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn add(&mut self, global_index: usize, lit: String) {
|
||||||
|
self.0.entry(lit.into_bytes()).or_insert(vec![]).push(global_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
if candidate.basename.is_empty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.0.contains_key(candidate.basename.as_bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
if candidate.basename.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if let Some(hits) = self.0.get(candidate.basename.as_bytes()) {
|
||||||
|
matches.extend(hits);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct ExtensionStrategy(HashMap<Vec<u8>, Vec<usize>, Fnv>);
|
||||||
|
|
||||||
|
impl ExtensionStrategy {
|
||||||
|
fn new() -> ExtensionStrategy {
|
||||||
|
ExtensionStrategy(HashMap::with_hasher(Fnv::default()))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn add(&mut self, global_index: usize, ext: String) {
|
||||||
|
self.0.entry(ext.into_bytes()).or_insert(vec![]).push(global_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
if candidate.ext.is_empty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.0.contains_key(candidate.ext.as_bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
if candidate.ext.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if let Some(hits) = self.0.get(candidate.ext.as_bytes()) {
|
||||||
|
matches.extend(hits);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct PrefixStrategy {
|
||||||
|
matcher: AhoCorasick,
|
||||||
|
map: Vec<usize>,
|
||||||
|
longest: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PrefixStrategy {
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
let path = candidate.path_prefix(self.longest);
|
||||||
|
for m in self.matcher.find_overlapping_iter(path) {
|
||||||
|
if m.start() == 0 {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
let path = candidate.path_prefix(self.longest);
|
||||||
|
for m in self.matcher.find_overlapping_iter(path) {
|
||||||
|
if m.start() == 0 {
|
||||||
|
matches.push(self.map[m.pattern()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct SuffixStrategy {
|
||||||
|
matcher: AhoCorasick,
|
||||||
|
map: Vec<usize>,
|
||||||
|
longest: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl SuffixStrategy {
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
let path = candidate.path_suffix(self.longest);
|
||||||
|
for m in self.matcher.find_overlapping_iter(path) {
|
||||||
|
if m.end() == path.len() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
let path = candidate.path_suffix(self.longest);
|
||||||
|
for m in self.matcher.find_overlapping_iter(path) {
|
||||||
|
if m.end() == path.len() {
|
||||||
|
matches.push(self.map[m.pattern()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct RequiredExtensionStrategy(HashMap<Vec<u8>, Vec<(usize, Regex)>, Fnv>);
|
||||||
|
|
||||||
|
impl RequiredExtensionStrategy {
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
if candidate.ext.is_empty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
match self.0.get(candidate.ext.as_bytes()) {
|
||||||
|
None => false,
|
||||||
|
Some(regexes) => {
|
||||||
|
for &(_, ref re) in regexes {
|
||||||
|
if re.is_match(candidate.path.as_bytes()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
if candidate.ext.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if let Some(regexes) = self.0.get(candidate.ext.as_bytes()) {
|
||||||
|
for &(global_index, ref re) in regexes {
|
||||||
|
if re.is_match(candidate.path.as_bytes()) {
|
||||||
|
matches.push(global_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct RegexSetStrategy {
|
||||||
|
matcher: RegexSet,
|
||||||
|
map: Vec<usize>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RegexSetStrategy {
|
||||||
|
fn is_match(&self, candidate: &Candidate) -> bool {
|
||||||
|
self.matcher.is_match(candidate.path.as_bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
|
||||||
|
for i in self.matcher.matches(candidate.path.as_bytes()) {
|
||||||
|
matches.push(self.map[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct MultiStrategyBuilder {
|
||||||
|
literals: Vec<String>,
|
||||||
|
map: Vec<usize>,
|
||||||
|
longest: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MultiStrategyBuilder {
|
||||||
|
fn new() -> MultiStrategyBuilder {
|
||||||
|
MultiStrategyBuilder {
|
||||||
|
literals: vec![],
|
||||||
|
map: vec![],
|
||||||
|
longest: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn add(&mut self, global_index: usize, literal: String) {
|
||||||
|
if literal.len() > self.longest {
|
||||||
|
self.longest = literal.len();
|
||||||
|
}
|
||||||
|
self.map.push(global_index);
|
||||||
|
self.literals.push(literal);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn prefix(self) -> PrefixStrategy {
|
||||||
|
PrefixStrategy {
|
||||||
|
matcher: AhoCorasick::new_auto_configured(&self.literals),
|
||||||
|
map: self.map,
|
||||||
|
longest: self.longest,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn suffix(self) -> SuffixStrategy {
|
||||||
|
SuffixStrategy {
|
||||||
|
matcher: AhoCorasick::new_auto_configured(&self.literals),
|
||||||
|
map: self.map,
|
||||||
|
longest: self.longest,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn regex_set(self) -> Result<RegexSetStrategy, Error> {
|
||||||
|
Ok(RegexSetStrategy {
|
||||||
|
matcher: new_regex_set(self.literals)?,
|
||||||
|
map: self.map,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct RequiredExtensionStrategyBuilder(
|
||||||
|
HashMap<Vec<u8>, Vec<(usize, String)>>,
|
||||||
|
);
|
||||||
|
|
||||||
|
impl RequiredExtensionStrategyBuilder {
|
||||||
|
fn new() -> RequiredExtensionStrategyBuilder {
|
||||||
|
RequiredExtensionStrategyBuilder(HashMap::new())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn add(&mut self, global_index: usize, ext: String, regex: String) {
|
||||||
|
self.0
|
||||||
|
.entry(ext.into_bytes())
|
||||||
|
.or_insert(vec![])
|
||||||
|
.push((global_index, regex));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn build(self) -> Result<RequiredExtensionStrategy, Error> {
|
||||||
|
let mut exts = HashMap::with_hasher(Fnv::default());
|
||||||
|
for (ext, regexes) in self.0.into_iter() {
|
||||||
|
exts.insert(ext.clone(), vec![]);
|
||||||
|
for (global_index, regex) in regexes {
|
||||||
|
let compiled = new_regex(®ex)?;
|
||||||
|
exts.get_mut(&ext).unwrap().push((global_index, compiled));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(RequiredExtensionStrategy(exts))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::GlobSetBuilder;
|
||||||
|
use glob::Glob;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn set_works() {
|
||||||
|
let mut builder = GlobSetBuilder::new();
|
||||||
|
builder.add(Glob::new("src/**/*.rs").unwrap());
|
||||||
|
builder.add(Glob::new("*.c").unwrap());
|
||||||
|
builder.add(Glob::new("src/lib.rs").unwrap());
|
||||||
|
let set = builder.build().unwrap();
|
||||||
|
|
||||||
|
assert!(set.is_match("foo.c"));
|
||||||
|
assert!(set.is_match("src/foo.c"));
|
||||||
|
assert!(!set.is_match("foo.rs"));
|
||||||
|
assert!(!set.is_match("tests/foo.rs"));
|
||||||
|
assert!(set.is_match("src/foo.rs"));
|
||||||
|
assert!(set.is_match("src/grep/src/main.rs"));
|
||||||
|
|
||||||
|
let matches = set.matches("src/lib.rs");
|
||||||
|
assert_eq!(2, matches.len());
|
||||||
|
assert_eq!(0, matches[0]);
|
||||||
|
assert_eq!(2, matches[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn empty_set_works() {
|
||||||
|
let set = GlobSetBuilder::new().build().unwrap();
|
||||||
|
assert!(!set.is_match(""));
|
||||||
|
assert!(!set.is_match("a"));
|
||||||
|
}
|
||||||
|
}
|
||||||
129
globset/src/pathutil.rs
Normal file
129
globset/src/pathutil.rs
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
use bstr::{ByteSlice, ByteVec};
|
||||||
|
|
||||||
|
/// The final component of the path, if it is a normal file.
|
||||||
|
///
|
||||||
|
/// If the path terminates in ., .., or consists solely of a root of prefix,
|
||||||
|
/// file_name will return None.
|
||||||
|
pub fn file_name<'a>(path: &Cow<'a, [u8]>) -> Option<Cow<'a, [u8]>> {
|
||||||
|
if path.is_empty() {
|
||||||
|
return None;
|
||||||
|
} else if path.last_byte() == Some(b'.') {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
let last_slash = path.rfind_byte(b'/').map(|i| i + 1).unwrap_or(0);
|
||||||
|
Some(match *path {
|
||||||
|
Cow::Borrowed(path) => Cow::Borrowed(&path[last_slash..]),
|
||||||
|
Cow::Owned(ref path) => {
|
||||||
|
let mut path = path.clone();
|
||||||
|
path.drain_bytes(..last_slash);
|
||||||
|
Cow::Owned(path)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return a file extension given a path's file name.
|
||||||
|
///
|
||||||
|
/// Note that this does NOT match the semantics of std::path::Path::extension.
|
||||||
|
/// Namely, the extension includes the `.` and matching is otherwise more
|
||||||
|
/// liberal. Specifically, the extenion is:
|
||||||
|
///
|
||||||
|
/// * None, if the file name given is empty;
|
||||||
|
/// * None, if there is no embedded `.`;
|
||||||
|
/// * Otherwise, the portion of the file name starting with the final `.`.
|
||||||
|
///
|
||||||
|
/// e.g., A file name of `.rs` has an extension `.rs`.
|
||||||
|
///
|
||||||
|
/// N.B. This is done to make certain glob match optimizations easier. Namely,
|
||||||
|
/// a pattern like `*.rs` is obviously trying to match files with a `rs`
|
||||||
|
/// extension, but it also matches files like `.rs`, which doesn't have an
|
||||||
|
/// extension according to std::path::Path::extension.
|
||||||
|
pub fn file_name_ext<'a>(name: &Cow<'a, [u8]>) -> Option<Cow<'a, [u8]>> {
|
||||||
|
if name.is_empty() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
let last_dot_at = match name.rfind_byte(b'.') {
|
||||||
|
None => return None,
|
||||||
|
Some(i) => i,
|
||||||
|
};
|
||||||
|
Some(match *name {
|
||||||
|
Cow::Borrowed(name) => Cow::Borrowed(&name[last_dot_at..]),
|
||||||
|
Cow::Owned(ref name) => {
|
||||||
|
let mut name = name.clone();
|
||||||
|
name.drain_bytes(..last_dot_at);
|
||||||
|
Cow::Owned(name)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Normalizes a path to use `/` as a separator everywhere, even on platforms
|
||||||
|
/// that recognize other characters as separators.
|
||||||
|
#[cfg(unix)]
|
||||||
|
pub fn normalize_path(path: Cow<[u8]>) -> Cow<[u8]> {
|
||||||
|
// UNIX only uses /, so we're good.
|
||||||
|
path
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Normalizes a path to use `/` as a separator everywhere, even on platforms
|
||||||
|
/// that recognize other characters as separators.
|
||||||
|
#[cfg(not(unix))]
|
||||||
|
pub fn normalize_path(mut path: Cow<[u8]>) -> Cow<[u8]> {
|
||||||
|
use std::path::is_separator;
|
||||||
|
|
||||||
|
for i in 0..path.len() {
|
||||||
|
if path[i] == b'/' || !is_separator(path[i] as char) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
path.to_mut()[i] = b'/';
|
||||||
|
}
|
||||||
|
path
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
use bstr::{B, ByteVec};
|
||||||
|
|
||||||
|
use super::{file_name_ext, normalize_path};
|
||||||
|
|
||||||
|
macro_rules! ext {
|
||||||
|
($name:ident, $file_name:expr, $ext:expr) => {
|
||||||
|
#[test]
|
||||||
|
fn $name() {
|
||||||
|
let bs = Vec::from($file_name);
|
||||||
|
let got = file_name_ext(&Cow::Owned(bs));
|
||||||
|
assert_eq!($ext.map(|s| Cow::Borrowed(B(s))), got);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
ext!(ext1, "foo.rs", Some(".rs"));
|
||||||
|
ext!(ext2, ".rs", Some(".rs"));
|
||||||
|
ext!(ext3, "..rs", Some(".rs"));
|
||||||
|
ext!(ext4, "", None::<&str>);
|
||||||
|
ext!(ext5, "foo", None::<&str>);
|
||||||
|
|
||||||
|
macro_rules! normalize {
|
||||||
|
($name:ident, $path:expr, $expected:expr) => {
|
||||||
|
#[test]
|
||||||
|
fn $name() {
|
||||||
|
let bs = Vec::from_slice($path);
|
||||||
|
let got = normalize_path(Cow::Owned(bs));
|
||||||
|
assert_eq!($expected.to_vec(), got.into_owned());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
normalize!(normal1, b"foo", b"foo");
|
||||||
|
normalize!(normal2, b"foo/bar", b"foo/bar");
|
||||||
|
#[cfg(unix)]
|
||||||
|
normalize!(normal3, b"foo\\bar", b"foo\\bar");
|
||||||
|
#[cfg(not(unix))]
|
||||||
|
normalize!(normal3, b"foo\\bar", b"foo/bar");
|
||||||
|
#[cfg(unix)]
|
||||||
|
normalize!(normal4, b"foo\\bar/baz", b"foo\\bar/baz");
|
||||||
|
#[cfg(not(unix))]
|
||||||
|
normalize!(normal4, b"foo\\bar/baz", b"foo/bar/baz");
|
||||||
|
}
|
||||||
26
grep-cli/Cargo.toml
Normal file
26
grep-cli/Cargo.toml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[package]
|
||||||
|
name = "grep-cli"
|
||||||
|
version = "0.1.3" #:version
|
||||||
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
|
description = """
|
||||||
|
Utilities for search oriented command line applications.
|
||||||
|
"""
|
||||||
|
documentation = "https://docs.rs/grep-cli"
|
||||||
|
homepage = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
repository = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["regex", "grep", "cli", "utility", "util"]
|
||||||
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
atty = "0.2.11"
|
||||||
|
bstr = "0.2.0"
|
||||||
|
globset = { version = "0.4.3", path = "../globset" }
|
||||||
|
lazy_static = "1.1.0"
|
||||||
|
log = "0.4.5"
|
||||||
|
regex = "1.1"
|
||||||
|
same-file = "1.0.4"
|
||||||
|
termcolor = "1.0.4"
|
||||||
|
|
||||||
|
[target.'cfg(windows)'.dependencies.winapi-util]
|
||||||
|
version = "0.1.1"
|
||||||
21
grep-cli/LICENSE-MIT
Normal file
21
grep-cli/LICENSE-MIT
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Andrew Gallant
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
38
grep-cli/README.md
Normal file
38
grep-cli/README.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
grep-cli
|
||||||
|
--------
|
||||||
|
A utility library that provides common routines desired in search oriented
|
||||||
|
command line applications. This includes, but is not limited to, parsing hex
|
||||||
|
escapes, detecting whether stdin is readable and more. To the extent possible,
|
||||||
|
this crate strives for compatibility across Windows, macOS and Linux.
|
||||||
|
|
||||||
|
[](https://travis-ci.org/BurntSushi/ripgrep)
|
||||||
|
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||||
|
[](https://crates.io/crates/grep-cli)
|
||||||
|
|
||||||
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
[https://docs.rs/grep-cli](https://docs.rs/grep-cli)
|
||||||
|
|
||||||
|
**NOTE:** You probably don't want to use this crate directly. Instead, you
|
||||||
|
should prefer the facade defined in the
|
||||||
|
[`grep`](https://docs.rs/grep)
|
||||||
|
crate.
|
||||||
|
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Add this to your `Cargo.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
grep-cli = "0.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
and this to your crate root:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
extern crate grep_cli;
|
||||||
|
```
|
||||||
24
grep-cli/UNLICENSE
Normal file
24
grep-cli/UNLICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
382
grep-cli/src/decompress.rs
Normal file
382
grep-cli/src/decompress.rs
Normal file
@@ -0,0 +1,382 @@
|
|||||||
|
use std::ffi::{OsStr, OsString};
|
||||||
|
use std::fs::File;
|
||||||
|
use std::io;
|
||||||
|
use std::path::Path;
|
||||||
|
use std::process::Command;
|
||||||
|
|
||||||
|
use globset::{Glob, GlobSet, GlobSetBuilder};
|
||||||
|
|
||||||
|
use process::{CommandError, CommandReader, CommandReaderBuilder};
|
||||||
|
|
||||||
|
/// A builder for a matcher that determines which files get decompressed.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct DecompressionMatcherBuilder {
|
||||||
|
/// The commands for each matching glob.
|
||||||
|
commands: Vec<DecompressionCommand>,
|
||||||
|
/// Whether to include the default matching rules.
|
||||||
|
defaults: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A representation of a single command for decompressing data
|
||||||
|
/// out-of-proccess.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct DecompressionCommand {
|
||||||
|
/// The glob that matches this command.
|
||||||
|
glob: String,
|
||||||
|
/// The command or binary name.
|
||||||
|
bin: OsString,
|
||||||
|
/// The arguments to invoke with the command.
|
||||||
|
args: Vec<OsString>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for DecompressionMatcherBuilder {
|
||||||
|
fn default() -> DecompressionMatcherBuilder {
|
||||||
|
DecompressionMatcherBuilder::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DecompressionMatcherBuilder {
|
||||||
|
/// Create a new builder for configuring a decompression matcher.
|
||||||
|
pub fn new() -> DecompressionMatcherBuilder {
|
||||||
|
DecompressionMatcherBuilder {
|
||||||
|
commands: vec![],
|
||||||
|
defaults: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Build a matcher for determining how to decompress files.
|
||||||
|
///
|
||||||
|
/// If there was a problem compiling the matcher, then an error is
|
||||||
|
/// returned.
|
||||||
|
pub fn build(&self) -> Result<DecompressionMatcher, CommandError> {
|
||||||
|
let defaults =
|
||||||
|
if !self.defaults {
|
||||||
|
vec![]
|
||||||
|
} else {
|
||||||
|
default_decompression_commands()
|
||||||
|
};
|
||||||
|
let mut glob_builder = GlobSetBuilder::new();
|
||||||
|
let mut commands = vec![];
|
||||||
|
for decomp_cmd in defaults.iter().chain(&self.commands) {
|
||||||
|
let glob = Glob::new(&decomp_cmd.glob).map_err(|err| {
|
||||||
|
CommandError::io(io::Error::new(io::ErrorKind::Other, err))
|
||||||
|
})?;
|
||||||
|
glob_builder.add(glob);
|
||||||
|
commands.push(decomp_cmd.clone());
|
||||||
|
}
|
||||||
|
let globs = glob_builder.build().map_err(|err| {
|
||||||
|
CommandError::io(io::Error::new(io::ErrorKind::Other, err))
|
||||||
|
})?;
|
||||||
|
Ok(DecompressionMatcher { globs, commands })
|
||||||
|
}
|
||||||
|
|
||||||
|
/// When enabled, the default matching rules will be compiled into this
|
||||||
|
/// matcher before any other associations. When disabled, only the
|
||||||
|
/// rules explicitly given to this builder will be used.
|
||||||
|
///
|
||||||
|
/// This is enabled by default.
|
||||||
|
pub fn defaults(&mut self, yes: bool) -> &mut DecompressionMatcherBuilder {
|
||||||
|
self.defaults = yes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Associates a glob with a command to decompress files matching the glob.
|
||||||
|
///
|
||||||
|
/// If multiple globs match the same file, then the most recently added
|
||||||
|
/// glob takes precedence.
|
||||||
|
///
|
||||||
|
/// The syntax for the glob is documented in the
|
||||||
|
/// [`globset` crate](https://docs.rs/globset/#syntax).
|
||||||
|
pub fn associate<P, I, A>(
|
||||||
|
&mut self,
|
||||||
|
glob: &str,
|
||||||
|
program: P,
|
||||||
|
args: I,
|
||||||
|
) -> &mut DecompressionMatcherBuilder
|
||||||
|
where P: AsRef<OsStr>,
|
||||||
|
I: IntoIterator<Item=A>,
|
||||||
|
A: AsRef<OsStr>,
|
||||||
|
{
|
||||||
|
|
||||||
|
let glob = glob.to_string();
|
||||||
|
let bin = program.as_ref().to_os_string();
|
||||||
|
let args = args
|
||||||
|
.into_iter()
|
||||||
|
.map(|a| a.as_ref().to_os_string())
|
||||||
|
.collect();
|
||||||
|
self.commands.push(DecompressionCommand { glob, bin, args });
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A matcher for determining how to decompress files.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct DecompressionMatcher {
|
||||||
|
/// The set of globs to match. Each glob has a corresponding entry in
|
||||||
|
/// `commands`. When a glob matches, the corresponding command should be
|
||||||
|
/// used to perform out-of-process decompression.
|
||||||
|
globs: GlobSet,
|
||||||
|
/// The commands for each matching glob.
|
||||||
|
commands: Vec<DecompressionCommand>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for DecompressionMatcher {
|
||||||
|
fn default() -> DecompressionMatcher {
|
||||||
|
DecompressionMatcher::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DecompressionMatcher {
|
||||||
|
/// Create a new matcher with default rules.
|
||||||
|
///
|
||||||
|
/// To add more matching rules, build a matcher with
|
||||||
|
/// [`DecompressionMatcherBuilder`](struct.DecompressionMatcherBuilder.html).
|
||||||
|
pub fn new() -> DecompressionMatcher {
|
||||||
|
DecompressionMatcherBuilder::new()
|
||||||
|
.build()
|
||||||
|
.expect("built-in matching rules should always compile")
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return a pre-built command based on the given file path that can
|
||||||
|
/// decompress its contents. If no such decompressor is known, then this
|
||||||
|
/// returns `None`.
|
||||||
|
///
|
||||||
|
/// If there are multiple possible commands matching the given path, then
|
||||||
|
/// the command added last takes precedence.
|
||||||
|
pub fn command<P: AsRef<Path>>(&self, path: P) -> Option<Command> {
|
||||||
|
for i in self.globs.matches(path).into_iter().rev() {
|
||||||
|
let decomp_cmd = &self.commands[i];
|
||||||
|
let mut cmd = Command::new(&decomp_cmd.bin);
|
||||||
|
cmd.args(&decomp_cmd.args);
|
||||||
|
return Some(cmd);
|
||||||
|
}
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if and only if the given file path has at least one
|
||||||
|
/// matching command to perform decompression on.
|
||||||
|
pub fn has_command<P: AsRef<Path>>(&self, path: P) -> bool {
|
||||||
|
self.globs.is_match(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Configures and builds a streaming reader for decompressing data.
|
||||||
|
#[derive(Clone, Debug, Default)]
|
||||||
|
pub struct DecompressionReaderBuilder {
|
||||||
|
matcher: DecompressionMatcher,
|
||||||
|
command_builder: CommandReaderBuilder,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DecompressionReaderBuilder {
|
||||||
|
/// Create a new builder with the default configuration.
|
||||||
|
pub fn new() -> DecompressionReaderBuilder {
|
||||||
|
DecompressionReaderBuilder::default()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Build a new streaming reader for decompressing data.
|
||||||
|
///
|
||||||
|
/// If decompression is done out-of-process and if there was a problem
|
||||||
|
/// spawning the process, then its error is logged at the debug level and a
|
||||||
|
/// passthru reader is returned that does no decompression. This behavior
|
||||||
|
/// typically occurs when the given file path matches a decompression
|
||||||
|
/// command, but is executing in an environment where the decompression
|
||||||
|
/// command is not available.
|
||||||
|
///
|
||||||
|
/// If the given file path could not be matched with a decompression
|
||||||
|
/// strategy, then a passthru reader is returned that does no
|
||||||
|
/// decompression.
|
||||||
|
pub fn build<P: AsRef<Path>>(
|
||||||
|
&self,
|
||||||
|
path: P,
|
||||||
|
) -> Result<DecompressionReader, CommandError> {
|
||||||
|
let path = path.as_ref();
|
||||||
|
let mut cmd = match self.matcher.command(path) {
|
||||||
|
None => return DecompressionReader::new_passthru(path),
|
||||||
|
Some(cmd) => cmd,
|
||||||
|
};
|
||||||
|
cmd.arg(path);
|
||||||
|
|
||||||
|
match self.command_builder.build(&mut cmd) {
|
||||||
|
Ok(cmd_reader) => Ok(DecompressionReader { rdr: Ok(cmd_reader) }),
|
||||||
|
Err(err) => {
|
||||||
|
debug!(
|
||||||
|
"{}: error spawning command '{:?}': {} \
|
||||||
|
(falling back to uncompressed reader)",
|
||||||
|
path.display(),
|
||||||
|
cmd,
|
||||||
|
err,
|
||||||
|
);
|
||||||
|
DecompressionReader::new_passthru(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Set the matcher to use to look up the decompression command for each
|
||||||
|
/// file path.
|
||||||
|
///
|
||||||
|
/// A set of sensible rules is enabled by default. Setting this will
|
||||||
|
/// completely replace the current rules.
|
||||||
|
pub fn matcher(
|
||||||
|
&mut self,
|
||||||
|
matcher: DecompressionMatcher,
|
||||||
|
) -> &mut DecompressionReaderBuilder {
|
||||||
|
self.matcher = matcher;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get the underlying matcher currently used by this builder.
|
||||||
|
pub fn get_matcher(&self) -> &DecompressionMatcher {
|
||||||
|
&self.matcher
|
||||||
|
}
|
||||||
|
|
||||||
|
/// When enabled, the reader will asynchronously read the contents of the
|
||||||
|
/// command's stderr output. When disabled, stderr is only read after the
|
||||||
|
/// stdout stream has been exhausted (or if the process quits with an error
|
||||||
|
/// code).
|
||||||
|
///
|
||||||
|
/// Note that when enabled, this may require launching an additional
|
||||||
|
/// thread in order to read stderr. This is done so that the process being
|
||||||
|
/// executed is never blocked from writing to stdout or stderr. If this is
|
||||||
|
/// disabled, then it is possible for the process to fill up the stderr
|
||||||
|
/// buffer and deadlock.
|
||||||
|
///
|
||||||
|
/// This is enabled by default.
|
||||||
|
pub fn async_stderr(
|
||||||
|
&mut self,
|
||||||
|
yes: bool,
|
||||||
|
) -> &mut DecompressionReaderBuilder {
|
||||||
|
self.command_builder.async_stderr(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A streaming reader for decompressing the contents of a file.
|
||||||
|
///
|
||||||
|
/// The purpose of this reader is to provide a seamless way to decompress the
|
||||||
|
/// contents of file using existing tools in the current environment. This is
|
||||||
|
/// meant to be an alternative to using decompression libraries in favor of the
|
||||||
|
/// simplicity and portability of using external commands such as `gzip` and
|
||||||
|
/// `xz`. This does impose the overhead of spawning a process, so other means
|
||||||
|
/// for performing decompression should be sought if this overhead isn't
|
||||||
|
/// acceptable.
|
||||||
|
///
|
||||||
|
/// A decompression reader comes with a default set of matching rules that are
|
||||||
|
/// meant to associate file paths with the corresponding command to use to
|
||||||
|
/// decompress them. For example, a glob like `*.gz` matches gzip compressed
|
||||||
|
/// files with the command `gzip -d -c`. If a file path does not match any
|
||||||
|
/// existing rules, or if it matches a rule whose command does not exist in the
|
||||||
|
/// current environment, then the decompression reader passes through the
|
||||||
|
/// contents of the underlying file without doing any decompression.
|
||||||
|
///
|
||||||
|
/// The default matching rules are probably good enough for most cases, and if
|
||||||
|
/// they require revision, pull requests are welcome. In cases where they must
|
||||||
|
/// be changed or extended, they can be customized through the use of
|
||||||
|
/// [`DecompressionMatcherBuilder`](struct.DecompressionMatcherBuilder.html)
|
||||||
|
/// and
|
||||||
|
/// [`DecompressionReaderBuilder`](struct.DecompressionReaderBuilder.html).
|
||||||
|
///
|
||||||
|
/// By default, this reader will asynchronously read the processes' stderr.
|
||||||
|
/// This prevents subtle deadlocking bugs for noisy processes that write a lot
|
||||||
|
/// to stderr. Currently, the entire contents of stderr is read on to the heap.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// This example shows how to read the decompressed contents of a file without
|
||||||
|
/// needing to explicitly choose the decompression command to run.
|
||||||
|
///
|
||||||
|
/// Note that if you need to decompress multiple files, it is better to use
|
||||||
|
/// `DecompressionReaderBuilder`, which will amortize the cost of compiling the
|
||||||
|
/// matcher.
|
||||||
|
///
|
||||||
|
/// ```no_run
|
||||||
|
/// use std::io::Read;
|
||||||
|
/// use std::process::Command;
|
||||||
|
/// use grep_cli::DecompressionReader;
|
||||||
|
///
|
||||||
|
/// # fn example() -> Result<(), Box<::std::error::Error>> {
|
||||||
|
/// let mut rdr = DecompressionReader::new("/usr/share/man/man1/ls.1.gz")?;
|
||||||
|
/// let mut contents = vec![];
|
||||||
|
/// rdr.read_to_end(&mut contents)?;
|
||||||
|
/// # Ok(()) }
|
||||||
|
/// ```
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct DecompressionReader {
|
||||||
|
rdr: Result<CommandReader, File>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DecompressionReader {
|
||||||
|
/// Build a new streaming reader for decompressing data.
|
||||||
|
///
|
||||||
|
/// If decompression is done out-of-process and if there was a problem
|
||||||
|
/// spawning the process, then its error is returned.
|
||||||
|
///
|
||||||
|
/// If the given file path could not be matched with a decompression
|
||||||
|
/// strategy, then a passthru reader is returned that does no
|
||||||
|
/// decompression.
|
||||||
|
///
|
||||||
|
/// This uses the default matching rules for determining how to decompress
|
||||||
|
/// the given file. To change those matching rules, use
|
||||||
|
/// [`DecompressionReaderBuilder`](struct.DecompressionReaderBuilder.html)
|
||||||
|
/// and
|
||||||
|
/// [`DecompressionMatcherBuilder`](struct.DecompressionMatcherBuilder.html).
|
||||||
|
///
|
||||||
|
/// When creating readers for many paths. it is better to use the builder
|
||||||
|
/// since it will amortize the cost of constructing the matcher.
|
||||||
|
pub fn new<P: AsRef<Path>>(
|
||||||
|
path: P,
|
||||||
|
) -> Result<DecompressionReader, CommandError> {
|
||||||
|
DecompressionReaderBuilder::new().build(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Creates a new "passthru" decompression reader that reads from the file
|
||||||
|
/// corresponding to the given path without doing decompression and without
|
||||||
|
/// executing another process.
|
||||||
|
fn new_passthru(path: &Path) -> Result<DecompressionReader, CommandError> {
|
||||||
|
let file = File::open(path)?;
|
||||||
|
Ok(DecompressionReader { rdr: Err(file) })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl io::Read for DecompressionReader {
|
||||||
|
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||||
|
match self.rdr {
|
||||||
|
Ok(ref mut rdr) => rdr.read(buf),
|
||||||
|
Err(ref mut rdr) => rdr.read(buf),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn default_decompression_commands() -> Vec<DecompressionCommand> {
|
||||||
|
const ARGS_GZIP: &[&str] = &["gzip", "-d", "-c"];
|
||||||
|
const ARGS_BZIP: &[&str] = &["bzip2", "-d", "-c"];
|
||||||
|
const ARGS_XZ: &[&str] = &["xz", "-d", "-c"];
|
||||||
|
const ARGS_LZ4: &[&str] = &["lz4", "-d", "-c"];
|
||||||
|
const ARGS_LZMA: &[&str] = &["xz", "--format=lzma", "-d", "-c"];
|
||||||
|
const ARGS_BROTLI: &[&str] = &["brotli", "-d", "-c"];
|
||||||
|
const ARGS_ZSTD: &[&str] = &["zstd", "-q", "-d", "-c"];
|
||||||
|
|
||||||
|
fn cmd(glob: &str, args: &[&str]) -> DecompressionCommand {
|
||||||
|
DecompressionCommand {
|
||||||
|
glob: glob.to_string(),
|
||||||
|
bin: OsStr::new(&args[0]).to_os_string(),
|
||||||
|
args: args
|
||||||
|
.iter()
|
||||||
|
.skip(1)
|
||||||
|
.map(|s| OsStr::new(s).to_os_string())
|
||||||
|
.collect(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vec![
|
||||||
|
cmd("*.gz", ARGS_GZIP),
|
||||||
|
cmd("*.tgz", ARGS_GZIP),
|
||||||
|
cmd("*.bz2", ARGS_BZIP),
|
||||||
|
cmd("*.tbz2", ARGS_BZIP),
|
||||||
|
cmd("*.xz", ARGS_XZ),
|
||||||
|
cmd("*.txz", ARGS_XZ),
|
||||||
|
cmd("*.lz4", ARGS_LZ4),
|
||||||
|
cmd("*.lzma", ARGS_LZMA),
|
||||||
|
cmd("*.br", ARGS_BROTLI),
|
||||||
|
cmd("*.zst", ARGS_ZSTD),
|
||||||
|
cmd("*.zstd", ARGS_ZSTD),
|
||||||
|
]
|
||||||
|
}
|
||||||
262
grep-cli/src/escape.rs
Normal file
262
grep-cli/src/escape.rs
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
use std::ffi::OsStr;
|
||||||
|
use std::str;
|
||||||
|
|
||||||
|
use bstr::{ByteSlice, ByteVec};
|
||||||
|
|
||||||
|
/// A single state in the state machine used by `unescape`.
|
||||||
|
#[derive(Clone, Copy, Eq, PartialEq)]
|
||||||
|
enum State {
|
||||||
|
/// The state after seeing a `\`.
|
||||||
|
Escape,
|
||||||
|
/// The state after seeing a `\x`.
|
||||||
|
HexFirst,
|
||||||
|
/// The state after seeing a `\x[0-9A-Fa-f]`.
|
||||||
|
HexSecond(char),
|
||||||
|
/// Default state.
|
||||||
|
Literal,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Escapes arbitrary bytes into a human readable string.
|
||||||
|
///
|
||||||
|
/// This converts `\t`, `\r` and `\n` into their escaped forms. It also
|
||||||
|
/// converts the non-printable subset of ASCII in addition to invalid UTF-8
|
||||||
|
/// bytes to hexadecimal escape sequences. Everything else is left as is.
|
||||||
|
///
|
||||||
|
/// The dual of this routine is [`unescape`](fn.unescape.html).
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// This example shows how to convert a byte string that contains a `\n` and
|
||||||
|
/// invalid UTF-8 bytes into a `String`.
|
||||||
|
///
|
||||||
|
/// Pay special attention to the use of raw strings. That is, `r"\n"` is
|
||||||
|
/// equivalent to `"\\n"`.
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// use grep_cli::escape;
|
||||||
|
///
|
||||||
|
/// assert_eq!(r"foo\nbar\xFFbaz", escape(b"foo\nbar\xFFbaz"));
|
||||||
|
/// ```
|
||||||
|
pub fn escape(bytes: &[u8]) -> String {
|
||||||
|
let mut escaped = String::new();
|
||||||
|
for (s, e, ch) in bytes.char_indices() {
|
||||||
|
if ch == '\u{FFFD}' {
|
||||||
|
for b in bytes[s..e].bytes() {
|
||||||
|
escape_byte(b, &mut escaped);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
escape_char(ch, &mut escaped);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
escaped
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Escapes an OS string into a human readable string.
|
||||||
|
///
|
||||||
|
/// This is like [`escape`](fn.escape.html), but accepts an OS string.
|
||||||
|
pub fn escape_os(string: &OsStr) -> String {
|
||||||
|
escape(Vec::from_os_str_lossy(string).as_bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Unescapes a string.
|
||||||
|
///
|
||||||
|
/// It supports a limited set of escape sequences:
|
||||||
|
///
|
||||||
|
/// * `\t`, `\r` and `\n` are mapped to their corresponding ASCII bytes.
|
||||||
|
/// * `\xZZ` hexadecimal escapes are mapped to their byte.
|
||||||
|
///
|
||||||
|
/// Everything else is left as is, including non-hexadecimal escapes like
|
||||||
|
/// `\xGG`.
|
||||||
|
///
|
||||||
|
/// This is useful when it is desirable for a command line argument to be
|
||||||
|
/// capable of specifying arbitrary bytes or otherwise make it easier to
|
||||||
|
/// specify non-printable characters.
|
||||||
|
///
|
||||||
|
/// The dual of this routine is [`escape`](fn.escape.html).
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// This example shows how to convert an escaped string (which is valid UTF-8)
|
||||||
|
/// into a corresponding sequence of bytes. Each escape sequence is mapped to
|
||||||
|
/// its bytes, which may include invalid UTF-8.
|
||||||
|
///
|
||||||
|
/// Pay special attention to the use of raw strings. That is, `r"\n"` is
|
||||||
|
/// equivalent to `"\\n"`.
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// use grep_cli::unescape;
|
||||||
|
///
|
||||||
|
/// assert_eq!(&b"foo\nbar\xFFbaz"[..], &*unescape(r"foo\nbar\xFFbaz"));
|
||||||
|
/// ```
|
||||||
|
pub fn unescape(s: &str) -> Vec<u8> {
|
||||||
|
use self::State::*;
|
||||||
|
|
||||||
|
let mut bytes = vec![];
|
||||||
|
let mut state = Literal;
|
||||||
|
for c in s.chars() {
|
||||||
|
match state {
|
||||||
|
Escape => {
|
||||||
|
match c {
|
||||||
|
'\\' => { bytes.push(b'\\'); state = Literal; }
|
||||||
|
'n' => { bytes.push(b'\n'); state = Literal; }
|
||||||
|
'r' => { bytes.push(b'\r'); state = Literal; }
|
||||||
|
't' => { bytes.push(b'\t'); state = Literal; }
|
||||||
|
'x' => { state = HexFirst; }
|
||||||
|
c => {
|
||||||
|
bytes.extend(format!(r"\{}", c).into_bytes());
|
||||||
|
state = Literal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HexFirst => {
|
||||||
|
match c {
|
||||||
|
'0'..='9' | 'A'..='F' | 'a'..='f' => {
|
||||||
|
state = HexSecond(c);
|
||||||
|
}
|
||||||
|
c => {
|
||||||
|
bytes.extend(format!(r"\x{}", c).into_bytes());
|
||||||
|
state = Literal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HexSecond(first) => {
|
||||||
|
match c {
|
||||||
|
'0'..='9' | 'A'..='F' | 'a'..='f' => {
|
||||||
|
let ordinal = format!("{}{}", first, c);
|
||||||
|
let byte = u8::from_str_radix(&ordinal, 16).unwrap();
|
||||||
|
bytes.push(byte);
|
||||||
|
state = Literal;
|
||||||
|
}
|
||||||
|
c => {
|
||||||
|
let original = format!(r"\x{}{}", first, c);
|
||||||
|
bytes.extend(original.into_bytes());
|
||||||
|
state = Literal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Literal => {
|
||||||
|
match c {
|
||||||
|
'\\' => { state = Escape; }
|
||||||
|
c => { bytes.extend(c.to_string().as_bytes()); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
match state {
|
||||||
|
Escape => bytes.push(b'\\'),
|
||||||
|
HexFirst => bytes.extend(b"\\x"),
|
||||||
|
HexSecond(c) => bytes.extend(format!("\\x{}", c).into_bytes()),
|
||||||
|
Literal => {}
|
||||||
|
}
|
||||||
|
bytes
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Unescapes an OS string.
|
||||||
|
///
|
||||||
|
/// This is like [`unescape`](fn.unescape.html), but accepts an OS string.
|
||||||
|
///
|
||||||
|
/// Note that this first lossily decodes the given OS string as UTF-8. That
|
||||||
|
/// is, an escaped string (the thing given) should be valid UTF-8.
|
||||||
|
pub fn unescape_os(string: &OsStr) -> Vec<u8> {
|
||||||
|
unescape(&string.to_string_lossy())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Adds the given codepoint to the given string, escaping it if necessary.
|
||||||
|
fn escape_char(cp: char, into: &mut String) {
|
||||||
|
if cp.is_ascii() {
|
||||||
|
escape_byte(cp as u8, into);
|
||||||
|
} else {
|
||||||
|
into.push(cp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Adds the given byte to the given string, escaping it if necessary.
|
||||||
|
fn escape_byte(byte: u8, into: &mut String) {
|
||||||
|
match byte {
|
||||||
|
0x21..=0x5B | 0x5D..=0x7D => into.push(byte as char),
|
||||||
|
b'\n' => into.push_str(r"\n"),
|
||||||
|
b'\r' => into.push_str(r"\r"),
|
||||||
|
b'\t' => into.push_str(r"\t"),
|
||||||
|
b'\\' => into.push_str(r"\\"),
|
||||||
|
_ => into.push_str(&format!(r"\x{:02X}", byte)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::{escape, unescape};
|
||||||
|
|
||||||
|
fn b(bytes: &'static [u8]) -> Vec<u8> {
|
||||||
|
bytes.to_vec()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn empty() {
|
||||||
|
assert_eq!(b(b""), unescape(r""));
|
||||||
|
assert_eq!(r"", escape(b""));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn backslash() {
|
||||||
|
assert_eq!(b(b"\\"), unescape(r"\\"));
|
||||||
|
assert_eq!(r"\\", escape(b"\\"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn nul() {
|
||||||
|
assert_eq!(b(b"\x00"), unescape(r"\x00"));
|
||||||
|
assert_eq!(r"\x00", escape(b"\x00"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn nl() {
|
||||||
|
assert_eq!(b(b"\n"), unescape(r"\n"));
|
||||||
|
assert_eq!(r"\n", escape(b"\n"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tab() {
|
||||||
|
assert_eq!(b(b"\t"), unescape(r"\t"));
|
||||||
|
assert_eq!(r"\t", escape(b"\t"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn carriage() {
|
||||||
|
assert_eq!(b(b"\r"), unescape(r"\r"));
|
||||||
|
assert_eq!(r"\r", escape(b"\r"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn nothing_simple() {
|
||||||
|
assert_eq!(b(b"\\a"), unescape(r"\a"));
|
||||||
|
assert_eq!(b(b"\\a"), unescape(r"\\a"));
|
||||||
|
assert_eq!(r"\\a", escape(b"\\a"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn nothing_hex0() {
|
||||||
|
assert_eq!(b(b"\\x"), unescape(r"\x"));
|
||||||
|
assert_eq!(b(b"\\x"), unescape(r"\\x"));
|
||||||
|
assert_eq!(r"\\x", escape(b"\\x"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn nothing_hex1() {
|
||||||
|
assert_eq!(b(b"\\xz"), unescape(r"\xz"));
|
||||||
|
assert_eq!(b(b"\\xz"), unescape(r"\\xz"));
|
||||||
|
assert_eq!(r"\\xz", escape(b"\\xz"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn nothing_hex2() {
|
||||||
|
assert_eq!(b(b"\\xzz"), unescape(r"\xzz"));
|
||||||
|
assert_eq!(b(b"\\xzz"), unescape(r"\\xzz"));
|
||||||
|
assert_eq!(r"\\xzz", escape(b"\\xzz"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn invalid_utf8() {
|
||||||
|
assert_eq!(r"\xFF", escape(b"\xFF"));
|
||||||
|
assert_eq!(r"a\xFFb", escape(b"a\xFFb"));
|
||||||
|
}
|
||||||
|
}
|
||||||
171
grep-cli/src/human.rs
Normal file
171
grep-cli/src/human.rs
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
use std::error;
|
||||||
|
use std::fmt;
|
||||||
|
use std::io;
|
||||||
|
use std::num::ParseIntError;
|
||||||
|
|
||||||
|
use regex::Regex;
|
||||||
|
|
||||||
|
/// An error that occurs when parsing a human readable size description.
|
||||||
|
///
|
||||||
|
/// This error provides a end user friendly message describing why the
|
||||||
|
/// description coudln't be parsed and what the expected format is.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct ParseSizeError {
|
||||||
|
original: String,
|
||||||
|
kind: ParseSizeErrorKind,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
enum ParseSizeErrorKind {
|
||||||
|
InvalidFormat,
|
||||||
|
InvalidInt(ParseIntError),
|
||||||
|
Overflow,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ParseSizeError {
|
||||||
|
fn format(original: &str) -> ParseSizeError {
|
||||||
|
ParseSizeError {
|
||||||
|
original: original.to_string(),
|
||||||
|
kind: ParseSizeErrorKind::InvalidFormat,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn int(original: &str, err: ParseIntError) -> ParseSizeError {
|
||||||
|
ParseSizeError {
|
||||||
|
original: original.to_string(),
|
||||||
|
kind: ParseSizeErrorKind::InvalidInt(err),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn overflow(original: &str) -> ParseSizeError {
|
||||||
|
ParseSizeError {
|
||||||
|
original: original.to_string(),
|
||||||
|
kind: ParseSizeErrorKind::Overflow,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl error::Error for ParseSizeError {
|
||||||
|
fn description(&self) -> &str { "invalid size" }
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for ParseSizeError {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
use self::ParseSizeErrorKind::*;
|
||||||
|
|
||||||
|
match self.kind {
|
||||||
|
InvalidFormat => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"invalid format for size '{}', which should be a sequence \
|
||||||
|
of digits followed by an optional 'K', 'M' or 'G' \
|
||||||
|
suffix",
|
||||||
|
self.original
|
||||||
|
)
|
||||||
|
}
|
||||||
|
InvalidInt(ref err) => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"invalid integer found in size '{}': {}",
|
||||||
|
self.original,
|
||||||
|
err
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Overflow => {
|
||||||
|
write!(f, "size too big in '{}'", self.original)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<ParseSizeError> for io::Error {
|
||||||
|
fn from(size_err: ParseSizeError) -> io::Error {
|
||||||
|
io::Error::new(io::ErrorKind::Other, size_err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parse a human readable size like `2M` into a corresponding number of bytes.
|
||||||
|
///
|
||||||
|
/// Supported size suffixes are `K` (for kilobyte), `M` (for megabyte) and `G`
|
||||||
|
/// (for gigabyte). If a size suffix is missing, then the size is interpreted
|
||||||
|
/// as bytes. If the size is too big to fit into a `u64`, then this returns an
|
||||||
|
/// error.
|
||||||
|
///
|
||||||
|
/// Additional suffixes may be added over time.
|
||||||
|
pub fn parse_human_readable_size(size: &str) -> Result<u64, ParseSizeError> {
|
||||||
|
lazy_static! {
|
||||||
|
// Normally I'd just parse something this simple by hand to avoid the
|
||||||
|
// regex dep, but we bring regex in any way for glob matching, so might
|
||||||
|
// as well use it.
|
||||||
|
static ref RE: Regex = Regex::new(r"^([0-9]+)([KMG])?$").unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
let caps = match RE.captures(size) {
|
||||||
|
Some(caps) => caps,
|
||||||
|
None => return Err(ParseSizeError::format(size)),
|
||||||
|
};
|
||||||
|
let value: u64 = caps[1].parse().map_err(|err| {
|
||||||
|
ParseSizeError::int(size, err)
|
||||||
|
})?;
|
||||||
|
let suffix = match caps.get(2) {
|
||||||
|
None => return Ok(value),
|
||||||
|
Some(cap) => cap.as_str(),
|
||||||
|
};
|
||||||
|
let bytes = match suffix {
|
||||||
|
"K" => value.checked_mul(1<<10),
|
||||||
|
"M" => value.checked_mul(1<<20),
|
||||||
|
"G" => value.checked_mul(1<<30),
|
||||||
|
// Because if the regex matches this group, it must be [KMG].
|
||||||
|
_ => unreachable!(),
|
||||||
|
};
|
||||||
|
bytes.ok_or_else(|| ParseSizeError::overflow(size))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn suffix_none() {
|
||||||
|
let x = parse_human_readable_size("123").unwrap();
|
||||||
|
assert_eq!(123, x);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn suffix_k() {
|
||||||
|
let x = parse_human_readable_size("123K").unwrap();
|
||||||
|
assert_eq!(123 * (1<<10), x);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn suffix_m() {
|
||||||
|
let x = parse_human_readable_size("123M").unwrap();
|
||||||
|
assert_eq!(123 * (1<<20), x);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn suffix_g() {
|
||||||
|
let x = parse_human_readable_size("123G").unwrap();
|
||||||
|
assert_eq!(123 * (1<<30), x);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn invalid_empty() {
|
||||||
|
assert!(parse_human_readable_size("").is_err());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn invalid_non_digit() {
|
||||||
|
assert!(parse_human_readable_size("a").is_err());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn invalid_overflow() {
|
||||||
|
assert!(parse_human_readable_size("9999999999999999G").is_err());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn invalid_suffix() {
|
||||||
|
assert!(parse_human_readable_size("123T").is_err());
|
||||||
|
}
|
||||||
|
}
|
||||||
252
grep-cli/src/lib.rs
Normal file
252
grep-cli/src/lib.rs
Normal file
@@ -0,0 +1,252 @@
|
|||||||
|
/*!
|
||||||
|
This crate provides common routines used in command line applications, with a
|
||||||
|
focus on routines useful for search oriented applications. As a utility
|
||||||
|
library, there is no central type or function. However, a key focus of this
|
||||||
|
crate is to improve failure modes and provide user friendly error messages
|
||||||
|
when things go wrong.
|
||||||
|
|
||||||
|
To the best extent possible, everything in this crate works on Windows, macOS
|
||||||
|
and Linux.
|
||||||
|
|
||||||
|
|
||||||
|
# Standard I/O
|
||||||
|
|
||||||
|
The
|
||||||
|
[`is_readable_stdin`](fn.is_readable_stdin.html),
|
||||||
|
[`is_tty_stderr`](fn.is_tty_stderr.html),
|
||||||
|
[`is_tty_stdin`](fn.is_tty_stdin.html)
|
||||||
|
and
|
||||||
|
[`is_tty_stdout`](fn.is_tty_stdout.html)
|
||||||
|
routines query aspects of standard I/O. `is_readable_stdin` determines whether
|
||||||
|
stdin can be usefully read from, while the `tty` methods determine whether a
|
||||||
|
tty is attached to stdin/stdout/stderr.
|
||||||
|
|
||||||
|
`is_readable_stdin` is useful when writing an application that changes behavior
|
||||||
|
based on whether the application was invoked with data on stdin. For example,
|
||||||
|
`rg foo` might recursively search the current working directory for
|
||||||
|
occurrences of `foo`, but `rg foo < file` might only search the contents of
|
||||||
|
`file`.
|
||||||
|
|
||||||
|
The `tty` methods are useful for similar reasons. Namely, commands like `ls`
|
||||||
|
will change their output depending on whether they are printing to a terminal
|
||||||
|
or not. For example, `ls` shows a file on each line when stdout is redirected
|
||||||
|
to a file or a pipe, but condenses the output to show possibly many files on
|
||||||
|
each line when stdout is connected to a tty.
|
||||||
|
|
||||||
|
|
||||||
|
# Coloring and buffering
|
||||||
|
|
||||||
|
The
|
||||||
|
[`stdout`](fn.stdout.html),
|
||||||
|
[`stdout_buffered_block`](fn.stdout_buffered_block.html)
|
||||||
|
and
|
||||||
|
[`stdout_buffered_line`](fn.stdout_buffered_line.html)
|
||||||
|
routines are alternative constructors for
|
||||||
|
[`StandardStream`](struct.StandardStream.html).
|
||||||
|
A `StandardStream` implements `termcolor::WriteColor`, which provides a way
|
||||||
|
to emit colors to terminals. Its key use is the encapsulation of buffering
|
||||||
|
style. Namely, `stdout` will return a line buffered `StandardStream` if and
|
||||||
|
only if stdout is connected to a tty, and will otherwise return a block
|
||||||
|
buffered `StandardStream`. Line buffering is important for use with a tty
|
||||||
|
because it typically decreases the latency at which the end user sees output.
|
||||||
|
Block buffering is used otherwise because it is faster, and redirecting stdout
|
||||||
|
to a file typically doesn't benefit from the decreased latency that line
|
||||||
|
buffering provides.
|
||||||
|
|
||||||
|
The `stdout_buffered_block` and `stdout_buffered_line` can be used to
|
||||||
|
explicitly set the buffering strategy regardless of whether stdout is connected
|
||||||
|
to a tty or not.
|
||||||
|
|
||||||
|
|
||||||
|
# Escaping
|
||||||
|
|
||||||
|
The
|
||||||
|
[`escape`](fn.escape.html),
|
||||||
|
[`escape_os`](fn.escape_os.html),
|
||||||
|
[`unescape`](fn.unescape.html)
|
||||||
|
and
|
||||||
|
[`unescape_os`](fn.unescape_os.html)
|
||||||
|
routines provide a user friendly way of dealing with UTF-8 encoded strings that
|
||||||
|
can express arbitrary bytes. For example, you might want to accept a string
|
||||||
|
containing arbitrary bytes as a command line argument, but most interactive
|
||||||
|
shells make such strings difficult to type. Instead, we can ask users to use
|
||||||
|
escape sequences.
|
||||||
|
|
||||||
|
For example, `a\xFFz` is itself a valid UTF-8 string corresponding to the
|
||||||
|
following bytes:
|
||||||
|
|
||||||
|
```ignore
|
||||||
|
[b'a', b'\\', b'x', b'F', b'F', b'z']
|
||||||
|
```
|
||||||
|
|
||||||
|
However, we can
|
||||||
|
interpret `\xFF` as an escape sequence with the `unescape`/`unescape_os`
|
||||||
|
routines, which will yield
|
||||||
|
|
||||||
|
```ignore
|
||||||
|
[b'a', b'\xFF', b'z']
|
||||||
|
```
|
||||||
|
|
||||||
|
instead. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
use grep_cli::unescape;
|
||||||
|
|
||||||
|
// Note the use of a raw string!
|
||||||
|
assert_eq!(vec![b'a', b'\xFF', b'z'], unescape(r"a\xFFz"));
|
||||||
|
```
|
||||||
|
|
||||||
|
The `escape`/`escape_os` routines provide the reverse transformation, which
|
||||||
|
makes it easy to show user friendly error messages involving arbitrary bytes.
|
||||||
|
|
||||||
|
|
||||||
|
# Building patterns
|
||||||
|
|
||||||
|
Typically, regular expression patterns must be valid UTF-8. However, command
|
||||||
|
line arguments aren't guaranteed to be valid UTF-8. Unfortunately, the
|
||||||
|
standard library's UTF-8 conversion functions from `OsStr`s do not provide
|
||||||
|
good error messages. However, the
|
||||||
|
[`pattern_from_bytes`](fn.pattern_from_bytes.html)
|
||||||
|
and
|
||||||
|
[`pattern_from_os`](fn.pattern_from_os.html)
|
||||||
|
do, including reporting exactly where the first invalid UTF-8 byte is seen.
|
||||||
|
|
||||||
|
Additionally, it can be useful to read patterns from a file while reporting
|
||||||
|
good error messages that include line numbers. The
|
||||||
|
[`patterns_from_path`](fn.patterns_from_path.html),
|
||||||
|
[`patterns_from_reader`](fn.patterns_from_reader.html)
|
||||||
|
and
|
||||||
|
[`patterns_from_stdin`](fn.patterns_from_stdin.html)
|
||||||
|
routines do just that. If any pattern is found that is invalid UTF-8, then the
|
||||||
|
error includes the file path (if available) along with the line number and the
|
||||||
|
byte offset at which the first invalid UTF-8 byte was observed.
|
||||||
|
|
||||||
|
|
||||||
|
# Read process output
|
||||||
|
|
||||||
|
Sometimes a command line application needs to execute other processes and read
|
||||||
|
its stdout in a streaming fashion. The
|
||||||
|
[`CommandReader`](struct.CommandReader.html)
|
||||||
|
provides this functionality with an explicit goal of improving failure modes.
|
||||||
|
In particular, if the process exits with an error code, then stderr is read
|
||||||
|
and converted into a normal Rust error to show to end users. This makes the
|
||||||
|
underlying failure modes explicit and gives more information to end users for
|
||||||
|
debugging the problem.
|
||||||
|
|
||||||
|
As a special case,
|
||||||
|
[`DecompressionReader`](struct.DecompressionReader.html)
|
||||||
|
provides a way to decompress arbitrary files by matching their file extensions
|
||||||
|
up with corresponding decompression programs (such as `gzip` and `xz`). This
|
||||||
|
is useful as a means of performing simplistic decompression in a portable
|
||||||
|
manner without binding to specific compression libraries. This does come with
|
||||||
|
some overhead though, so if you need to decompress lots of small files, this
|
||||||
|
may not be an appropriate convenience to use.
|
||||||
|
|
||||||
|
Each reader has a corresponding builder for additional configuration, such as
|
||||||
|
whether to read stderr asynchronously in order to avoid deadlock (which is
|
||||||
|
enabled by default).
|
||||||
|
|
||||||
|
|
||||||
|
# Miscellaneous parsing
|
||||||
|
|
||||||
|
The
|
||||||
|
[`parse_human_readable_size`](fn.parse_human_readable_size.html)
|
||||||
|
routine parses strings like `2M` and converts them to the corresponding number
|
||||||
|
of bytes (`2 * 1<<20` in this case). If an invalid size is found, then a good
|
||||||
|
error message is crafted that typically tells the user how to fix the problem.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
|
extern crate atty;
|
||||||
|
extern crate bstr;
|
||||||
|
extern crate globset;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate lazy_static;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate log;
|
||||||
|
extern crate regex;
|
||||||
|
extern crate same_file;
|
||||||
|
extern crate termcolor;
|
||||||
|
#[cfg(windows)]
|
||||||
|
extern crate winapi_util;
|
||||||
|
|
||||||
|
mod decompress;
|
||||||
|
mod escape;
|
||||||
|
mod human;
|
||||||
|
mod pattern;
|
||||||
|
mod process;
|
||||||
|
mod wtr;
|
||||||
|
|
||||||
|
pub use decompress::{
|
||||||
|
DecompressionMatcher, DecompressionMatcherBuilder,
|
||||||
|
DecompressionReader, DecompressionReaderBuilder,
|
||||||
|
};
|
||||||
|
pub use escape::{escape, escape_os, unescape, unescape_os};
|
||||||
|
pub use human::{ParseSizeError, parse_human_readable_size};
|
||||||
|
pub use pattern::{
|
||||||
|
InvalidPatternError,
|
||||||
|
pattern_from_os, pattern_from_bytes,
|
||||||
|
patterns_from_path, patterns_from_reader, patterns_from_stdin,
|
||||||
|
};
|
||||||
|
pub use process::{CommandError, CommandReader, CommandReaderBuilder};
|
||||||
|
pub use wtr::{
|
||||||
|
StandardStream,
|
||||||
|
stdout, stdout_buffered_line, stdout_buffered_block,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Returns true if and only if stdin is believed to be readable.
|
||||||
|
///
|
||||||
|
/// When stdin is readable, command line programs may choose to behave
|
||||||
|
/// differently than when stdin is not readable. For example, `command foo`
|
||||||
|
/// might search the current directory for occurrences of `foo` where as
|
||||||
|
/// `command foo < some-file` or `cat some-file | command foo` might instead
|
||||||
|
/// only search stdin for occurrences of `foo`.
|
||||||
|
pub fn is_readable_stdin() -> bool {
|
||||||
|
#[cfg(unix)]
|
||||||
|
fn imp() -> bool {
|
||||||
|
use std::os::unix::fs::FileTypeExt;
|
||||||
|
use same_file::Handle;
|
||||||
|
|
||||||
|
let ft = match Handle::stdin().and_then(|h| h.as_file().metadata()) {
|
||||||
|
Err(_) => return false,
|
||||||
|
Ok(md) => md.file_type(),
|
||||||
|
};
|
||||||
|
ft.is_file() || ft.is_fifo()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
fn imp() -> bool {
|
||||||
|
use winapi_util as winutil;
|
||||||
|
|
||||||
|
winutil::file::typ(winutil::HandleRef::stdin())
|
||||||
|
.map(|t| t.is_disk() || t.is_pipe())
|
||||||
|
.unwrap_or(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
!is_tty_stdin() && imp()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if and only if stdin is believed to be connectted to a tty
|
||||||
|
/// or a console.
|
||||||
|
pub fn is_tty_stdin() -> bool {
|
||||||
|
atty::is(atty::Stream::Stdin)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if and only if stdout is believed to be connectted to a tty
|
||||||
|
/// or a console.
|
||||||
|
///
|
||||||
|
/// This is useful for when you want your command line program to produce
|
||||||
|
/// different output depending on whether it's printing directly to a user's
|
||||||
|
/// terminal or whether it's being redirected somewhere else. For example,
|
||||||
|
/// implementations of `ls` will often show one item per line when stdout is
|
||||||
|
/// redirected, but will condensed output when printing to a tty.
|
||||||
|
pub fn is_tty_stdout() -> bool {
|
||||||
|
atty::is(atty::Stream::Stdout)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if and only if stderr is believed to be connectted to a tty
|
||||||
|
/// or a console.
|
||||||
|
pub fn is_tty_stderr() -> bool {
|
||||||
|
atty::is(atty::Stream::Stderr)
|
||||||
|
}
|
||||||
201
grep-cli/src/pattern.rs
Normal file
201
grep-cli/src/pattern.rs
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
use std::error;
|
||||||
|
use std::ffi::OsStr;
|
||||||
|
use std::fmt;
|
||||||
|
use std::fs::File;
|
||||||
|
use std::io;
|
||||||
|
use std::path::Path;
|
||||||
|
use std::str;
|
||||||
|
|
||||||
|
use bstr::io::BufReadExt;
|
||||||
|
|
||||||
|
use escape::{escape, escape_os};
|
||||||
|
|
||||||
|
/// An error that occurs when a pattern could not be converted to valid UTF-8.
|
||||||
|
///
|
||||||
|
/// The purpose of this error is to give a more targeted failure mode for
|
||||||
|
/// patterns written by end users that are not valid UTF-8.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct InvalidPatternError {
|
||||||
|
original: String,
|
||||||
|
valid_up_to: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InvalidPatternError {
|
||||||
|
/// Returns the index in the given string up to which valid UTF-8 was
|
||||||
|
/// verified.
|
||||||
|
pub fn valid_up_to(&self) -> usize {
|
||||||
|
self.valid_up_to
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl error::Error for InvalidPatternError {
|
||||||
|
fn description(&self) -> &str { "invalid pattern" }
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for InvalidPatternError {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"found invalid UTF-8 in pattern at byte offset {} \
|
||||||
|
(use hex escape sequences to match arbitrary bytes \
|
||||||
|
in a pattern, e.g., \\xFF): '{}'",
|
||||||
|
self.valid_up_to,
|
||||||
|
self.original,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<InvalidPatternError> for io::Error {
|
||||||
|
fn from(paterr: InvalidPatternError) -> io::Error {
|
||||||
|
io::Error::new(io::ErrorKind::Other, paterr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Convert an OS string into a regular expression pattern.
|
||||||
|
///
|
||||||
|
/// This conversion fails if the given pattern is not valid UTF-8, in which
|
||||||
|
/// case, a targeted error with more information about where the invalid UTF-8
|
||||||
|
/// occurs is given. The error also suggests the use of hex escape sequences,
|
||||||
|
/// which are supported by many regex engines.
|
||||||
|
pub fn pattern_from_os(pattern: &OsStr) -> Result<&str, InvalidPatternError> {
|
||||||
|
pattern.to_str().ok_or_else(|| {
|
||||||
|
let valid_up_to = pattern
|
||||||
|
.to_string_lossy()
|
||||||
|
.find('\u{FFFD}')
|
||||||
|
.expect("a Unicode replacement codepoint for invalid UTF-8");
|
||||||
|
InvalidPatternError {
|
||||||
|
original: escape_os(pattern),
|
||||||
|
valid_up_to: valid_up_to,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Convert arbitrary bytes into a regular expression pattern.
|
||||||
|
///
|
||||||
|
/// This conversion fails if the given pattern is not valid UTF-8, in which
|
||||||
|
/// case, a targeted error with more information about where the invalid UTF-8
|
||||||
|
/// occurs is given. The error also suggests the use of hex escape sequences,
|
||||||
|
/// which are supported by many regex engines.
|
||||||
|
pub fn pattern_from_bytes(
|
||||||
|
pattern: &[u8],
|
||||||
|
) -> Result<&str, InvalidPatternError> {
|
||||||
|
str::from_utf8(pattern).map_err(|err| {
|
||||||
|
InvalidPatternError {
|
||||||
|
original: escape(pattern),
|
||||||
|
valid_up_to: err.valid_up_to(),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Read patterns from a file path, one per line.
|
||||||
|
///
|
||||||
|
/// If there was a problem reading or if any of the patterns contain invalid
|
||||||
|
/// UTF-8, then an error is returned. If there was a problem with a specific
|
||||||
|
/// pattern, then the error message will include the line number and the file
|
||||||
|
/// path.
|
||||||
|
pub fn patterns_from_path<P: AsRef<Path>>(path: P) -> io::Result<Vec<String>> {
|
||||||
|
let path = path.as_ref();
|
||||||
|
let file = File::open(path).map_err(|err| {
|
||||||
|
io::Error::new(
|
||||||
|
io::ErrorKind::Other,
|
||||||
|
format!("{}: {}", path.display(), err),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
patterns_from_reader(file).map_err(|err| {
|
||||||
|
io::Error::new(
|
||||||
|
io::ErrorKind::Other,
|
||||||
|
format!("{}:{}", path.display(), err),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Read patterns from stdin, one per line.
|
||||||
|
///
|
||||||
|
/// If there was a problem reading or if any of the patterns contain invalid
|
||||||
|
/// UTF-8, then an error is returned. If there was a problem with a specific
|
||||||
|
/// pattern, then the error message will include the line number and the fact
|
||||||
|
/// that it came from stdin.
|
||||||
|
pub fn patterns_from_stdin() -> io::Result<Vec<String>> {
|
||||||
|
let stdin = io::stdin();
|
||||||
|
let locked = stdin.lock();
|
||||||
|
patterns_from_reader(locked).map_err(|err| {
|
||||||
|
io::Error::new(
|
||||||
|
io::ErrorKind::Other,
|
||||||
|
format!("<stdin>:{}", err),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Read patterns from any reader, one per line.
|
||||||
|
///
|
||||||
|
/// If there was a problem reading or if any of the patterns contain invalid
|
||||||
|
/// UTF-8, then an error is returned. If there was a problem with a specific
|
||||||
|
/// pattern, then the error message will include the line number.
|
||||||
|
///
|
||||||
|
/// Note that this routine uses its own internal buffer, so the caller should
|
||||||
|
/// not provide their own buffered reader if possible.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// This shows how to parse patterns, one per line.
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// use grep_cli::patterns_from_reader;
|
||||||
|
///
|
||||||
|
/// # fn example() -> Result<(), Box<::std::error::Error>> {
|
||||||
|
/// let patterns = "\
|
||||||
|
/// foo
|
||||||
|
/// bar\\s+foo
|
||||||
|
/// [a-z]{3}
|
||||||
|
/// ";
|
||||||
|
///
|
||||||
|
/// assert_eq!(patterns_from_reader(patterns.as_bytes())?, vec![
|
||||||
|
/// r"foo",
|
||||||
|
/// r"bar\s+foo",
|
||||||
|
/// r"[a-z]{3}",
|
||||||
|
/// ]);
|
||||||
|
/// # Ok(()) }
|
||||||
|
/// ```
|
||||||
|
pub fn patterns_from_reader<R: io::Read>(rdr: R) -> io::Result<Vec<String>> {
|
||||||
|
let mut patterns = vec![];
|
||||||
|
let mut line_number = 0;
|
||||||
|
io::BufReader::new(rdr).for_byte_line(|line| {
|
||||||
|
line_number += 1;
|
||||||
|
match pattern_from_bytes(line) {
|
||||||
|
Ok(pattern) => {
|
||||||
|
patterns.push(pattern.to_string());
|
||||||
|
Ok(true)
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
Err(io::Error::new(
|
||||||
|
io::ErrorKind::Other,
|
||||||
|
format!("{}: {}", line_number, err),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
Ok(patterns)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn bytes() {
|
||||||
|
let pat = b"abc\xFFxyz";
|
||||||
|
let err = pattern_from_bytes(pat).unwrap_err();
|
||||||
|
assert_eq!(3, err.valid_up_to());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(unix)]
|
||||||
|
fn os() {
|
||||||
|
use std::os::unix::ffi::OsStrExt;
|
||||||
|
use std::ffi::OsStr;
|
||||||
|
|
||||||
|
let pat = OsStr::from_bytes(b"abc\xFFxyz");
|
||||||
|
let err = pattern_from_os(pat).unwrap_err();
|
||||||
|
assert_eq!(3, err.valid_up_to());
|
||||||
|
}
|
||||||
|
}
|
||||||
267
grep-cli/src/process.rs
Normal file
267
grep-cli/src/process.rs
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
use std::error;
|
||||||
|
use std::fmt;
|
||||||
|
use std::io::{self, Read};
|
||||||
|
use std::iter;
|
||||||
|
use std::process;
|
||||||
|
use std::thread::{self, JoinHandle};
|
||||||
|
|
||||||
|
/// An error that can occur while running a command and reading its output.
|
||||||
|
///
|
||||||
|
/// This error can be seamlessly converted to an `io::Error` via a `From`
|
||||||
|
/// implementation.
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct CommandError {
|
||||||
|
kind: CommandErrorKind,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
enum CommandErrorKind {
|
||||||
|
Io(io::Error),
|
||||||
|
Stderr(Vec<u8>),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CommandError {
|
||||||
|
/// Create an error from an I/O error.
|
||||||
|
pub(crate) fn io(ioerr: io::Error) -> CommandError {
|
||||||
|
CommandError { kind: CommandErrorKind::Io(ioerr) }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create an error from the contents of stderr (which may be empty).
|
||||||
|
pub(crate) fn stderr(bytes: Vec<u8>) -> CommandError {
|
||||||
|
CommandError { kind: CommandErrorKind::Stderr(bytes) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl error::Error for CommandError {
|
||||||
|
fn description(&self) -> &str { "command error" }
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for CommandError {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match self.kind {
|
||||||
|
CommandErrorKind::Io(ref e) => e.fmt(f),
|
||||||
|
CommandErrorKind::Stderr(ref bytes) => {
|
||||||
|
let msg = String::from_utf8_lossy(bytes);
|
||||||
|
if msg.trim().is_empty() {
|
||||||
|
write!(f, "<stderr is empty>")
|
||||||
|
} else {
|
||||||
|
let div = iter::repeat('-').take(79).collect::<String>();
|
||||||
|
write!(f, "\n{div}\n{msg}\n{div}", div=div, msg=msg.trim())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<io::Error> for CommandError {
|
||||||
|
fn from(ioerr: io::Error) -> CommandError {
|
||||||
|
CommandError { kind: CommandErrorKind::Io(ioerr) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<CommandError> for io::Error {
|
||||||
|
fn from(cmderr: CommandError) -> io::Error {
|
||||||
|
match cmderr.kind {
|
||||||
|
CommandErrorKind::Io(ioerr) => ioerr,
|
||||||
|
CommandErrorKind::Stderr(_) => {
|
||||||
|
io::Error::new(io::ErrorKind::Other, cmderr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Configures and builds a streaming reader for process output.
|
||||||
|
#[derive(Clone, Debug, Default)]
|
||||||
|
pub struct CommandReaderBuilder {
|
||||||
|
async_stderr: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CommandReaderBuilder {
|
||||||
|
/// Create a new builder with the default configuration.
|
||||||
|
pub fn new() -> CommandReaderBuilder {
|
||||||
|
CommandReaderBuilder::default()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Build a new streaming reader for the given command's output.
|
||||||
|
///
|
||||||
|
/// The caller should set everything that's required on the given command
|
||||||
|
/// before building a reader, such as its arguments, environment and
|
||||||
|
/// current working directory. Settings such as the stdout and stderr (but
|
||||||
|
/// not stdin) pipes will be overridden so that they can be controlled by
|
||||||
|
/// the reader.
|
||||||
|
///
|
||||||
|
/// If there was a problem spawning the given command, then its error is
|
||||||
|
/// returned.
|
||||||
|
pub fn build(
|
||||||
|
&self,
|
||||||
|
command: &mut process::Command,
|
||||||
|
) -> Result<CommandReader, CommandError> {
|
||||||
|
let mut child = command
|
||||||
|
.stdout(process::Stdio::piped())
|
||||||
|
.stderr(process::Stdio::piped())
|
||||||
|
.spawn()?;
|
||||||
|
let stdout = child.stdout.take().unwrap();
|
||||||
|
let stderr =
|
||||||
|
if self.async_stderr {
|
||||||
|
StderrReader::async(child.stderr.take().unwrap())
|
||||||
|
} else {
|
||||||
|
StderrReader::sync(child.stderr.take().unwrap())
|
||||||
|
};
|
||||||
|
Ok(CommandReader {
|
||||||
|
child: child,
|
||||||
|
stdout: stdout,
|
||||||
|
stderr: stderr,
|
||||||
|
done: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// When enabled, the reader will asynchronously read the contents of the
|
||||||
|
/// command's stderr output. When disabled, stderr is only read after the
|
||||||
|
/// stdout stream has been exhausted (or if the process quits with an error
|
||||||
|
/// code).
|
||||||
|
///
|
||||||
|
/// Note that when enabled, this may require launching an additional
|
||||||
|
/// thread in order to read stderr. This is done so that the process being
|
||||||
|
/// executed is never blocked from writing to stdout or stderr. If this is
|
||||||
|
/// disabled, then it is possible for the process to fill up the stderr
|
||||||
|
/// buffer and deadlock.
|
||||||
|
///
|
||||||
|
/// This is enabled by default.
|
||||||
|
pub fn async_stderr(&mut self, yes: bool) -> &mut CommandReaderBuilder {
|
||||||
|
self.async_stderr = yes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A streaming reader for a command's output.
|
||||||
|
///
|
||||||
|
/// The purpose of this reader is to provide an easy way to execute processes
|
||||||
|
/// whose stdout is read in a streaming way while also making the processes'
|
||||||
|
/// stderr available when the process fails with an exit code. This makes it
|
||||||
|
/// possible to execute processes while surfacing the underlying failure mode
|
||||||
|
/// in the case of an error.
|
||||||
|
///
|
||||||
|
/// Moreover, by default, this reader will asynchronously read the processes'
|
||||||
|
/// stderr. This prevents subtle deadlocking bugs for noisy processes that
|
||||||
|
/// write a lot to stderr. Currently, the entire contents of stderr is read
|
||||||
|
/// on to the heap.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// This example shows how to invoke `gzip` to decompress the contents of a
|
||||||
|
/// file. If the `gzip` command reports a failing exit status, then its stderr
|
||||||
|
/// is returned as an error.
|
||||||
|
///
|
||||||
|
/// ```no_run
|
||||||
|
/// use std::io::Read;
|
||||||
|
/// use std::process::Command;
|
||||||
|
/// use grep_cli::CommandReader;
|
||||||
|
///
|
||||||
|
/// # fn example() -> Result<(), Box<::std::error::Error>> {
|
||||||
|
/// let mut cmd = Command::new("gzip");
|
||||||
|
/// cmd.arg("-d").arg("-c").arg("/usr/share/man/man1/ls.1.gz");
|
||||||
|
///
|
||||||
|
/// let mut rdr = CommandReader::new(&mut cmd)?;
|
||||||
|
/// let mut contents = vec![];
|
||||||
|
/// rdr.read_to_end(&mut contents)?;
|
||||||
|
/// # Ok(()) }
|
||||||
|
/// ```
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct CommandReader {
|
||||||
|
child: process::Child,
|
||||||
|
stdout: process::ChildStdout,
|
||||||
|
stderr: StderrReader,
|
||||||
|
done: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CommandReader {
|
||||||
|
/// Create a new streaming reader for the given command using the default
|
||||||
|
/// configuration.
|
||||||
|
///
|
||||||
|
/// The caller should set everything that's required on the given command
|
||||||
|
/// before building a reader, such as its arguments, environment and
|
||||||
|
/// current working directory. Settings such as the stdout and stderr (but
|
||||||
|
/// not stdin) pipes will be overridden so that they can be controlled by
|
||||||
|
/// the reader.
|
||||||
|
///
|
||||||
|
/// If there was a problem spawning the given command, then its error is
|
||||||
|
/// returned.
|
||||||
|
///
|
||||||
|
/// If the caller requires additional configuration for the reader
|
||||||
|
/// returned, then use
|
||||||
|
/// [`CommandReaderBuilder`](struct.CommandReaderBuilder.html).
|
||||||
|
pub fn new(
|
||||||
|
cmd: &mut process::Command,
|
||||||
|
) -> Result<CommandReader, CommandError> {
|
||||||
|
CommandReaderBuilder::new().build(cmd)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl io::Read for CommandReader {
|
||||||
|
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||||
|
if self.done {
|
||||||
|
return Ok(0);
|
||||||
|
}
|
||||||
|
let nread = self.stdout.read(buf)?;
|
||||||
|
if nread == 0 {
|
||||||
|
self.done = true;
|
||||||
|
// Reap the child now that we're done reading. If the command
|
||||||
|
// failed, report stderr as an error.
|
||||||
|
if !self.child.wait()?.success() {
|
||||||
|
return Err(io::Error::from(self.stderr.read_to_end()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(nread)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A reader that encapsulates the asynchronous or synchronous reading of
|
||||||
|
/// stderr.
|
||||||
|
#[derive(Debug)]
|
||||||
|
enum StderrReader {
|
||||||
|
Async(Option<JoinHandle<CommandError>>),
|
||||||
|
Sync(process::ChildStderr),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StderrReader {
|
||||||
|
/// Create a reader for stderr that reads contents asynchronously.
|
||||||
|
fn async(mut stderr: process::ChildStderr) -> StderrReader {
|
||||||
|
let handle = thread::spawn(move || {
|
||||||
|
stderr_to_command_error(&mut stderr)
|
||||||
|
});
|
||||||
|
StderrReader::Async(Some(handle))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a reader for stderr that reads contents synchronously.
|
||||||
|
fn sync(stderr: process::ChildStderr) -> StderrReader {
|
||||||
|
StderrReader::Sync(stderr)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consumes all of stderr on to the heap and returns it as an error.
|
||||||
|
///
|
||||||
|
/// If there was a problem reading stderr itself, then this returns an I/O
|
||||||
|
/// command error.
|
||||||
|
fn read_to_end(&mut self) -> CommandError {
|
||||||
|
match *self {
|
||||||
|
StderrReader::Async(ref mut handle) => {
|
||||||
|
let handle = handle
|
||||||
|
.take()
|
||||||
|
.expect("read_to_end cannot be called more than once");
|
||||||
|
handle
|
||||||
|
.join()
|
||||||
|
.expect("stderr reading thread does not panic")
|
||||||
|
}
|
||||||
|
StderrReader::Sync(ref mut stderr) => {
|
||||||
|
stderr_to_command_error(stderr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn stderr_to_command_error(stderr: &mut process::ChildStderr) -> CommandError {
|
||||||
|
let mut bytes = vec![];
|
||||||
|
match stderr.read_to_end(&mut bytes) {
|
||||||
|
Ok(_) => CommandError::stderr(bytes),
|
||||||
|
Err(err) => CommandError::io(err),
|
||||||
|
}
|
||||||
|
}
|
||||||
133
grep-cli/src/wtr.rs
Normal file
133
grep-cli/src/wtr.rs
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
use std::io;
|
||||||
|
|
||||||
|
use termcolor;
|
||||||
|
|
||||||
|
use is_tty_stdout;
|
||||||
|
|
||||||
|
/// A writer that supports coloring with either line or block buffering.
|
||||||
|
pub struct StandardStream(StandardStreamKind);
|
||||||
|
|
||||||
|
/// Returns a possibly buffered writer to stdout for the given color choice.
|
||||||
|
///
|
||||||
|
/// The writer returned is either line buffered or block buffered. The decision
|
||||||
|
/// between these two is made automatically based on whether a tty is attached
|
||||||
|
/// to stdout or not. If a tty is attached, then line buffering is used.
|
||||||
|
/// Otherwise, block buffering is used. In general, block buffering is more
|
||||||
|
/// efficient, but may increase the time it takes for the end user to see the
|
||||||
|
/// first bits of output.
|
||||||
|
///
|
||||||
|
/// If you need more fine grained control over the buffering mode, then use one
|
||||||
|
/// of `stdout_buffered_line` or `stdout_buffered_block`.
|
||||||
|
///
|
||||||
|
/// The color choice given is passed along to the underlying writer. To
|
||||||
|
/// completely disable colors in all cases, use `ColorChoice::Never`.
|
||||||
|
pub fn stdout(color_choice: termcolor::ColorChoice) -> StandardStream {
|
||||||
|
if is_tty_stdout() {
|
||||||
|
stdout_buffered_line(color_choice)
|
||||||
|
} else {
|
||||||
|
stdout_buffered_block(color_choice)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a line buffered writer to stdout for the given color choice.
|
||||||
|
///
|
||||||
|
/// This writer is useful when printing results directly to a tty such that
|
||||||
|
/// users see output as soon as it's written. The downside of this approach
|
||||||
|
/// is that it can be slower, especially when there is a lot of output.
|
||||||
|
///
|
||||||
|
/// You might consider using
|
||||||
|
/// [`stdout`](fn.stdout.html)
|
||||||
|
/// instead, which chooses the buffering strategy automatically based on
|
||||||
|
/// whether stdout is connected to a tty.
|
||||||
|
pub fn stdout_buffered_line(
|
||||||
|
color_choice: termcolor::ColorChoice,
|
||||||
|
) -> StandardStream {
|
||||||
|
let out = termcolor::StandardStream::stdout(color_choice);
|
||||||
|
StandardStream(StandardStreamKind::LineBuffered(out))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a block buffered writer to stdout for the given color choice.
|
||||||
|
///
|
||||||
|
/// This writer is useful when printing results to a file since it amortizes
|
||||||
|
/// the cost of writing data. The downside of this approach is that it can
|
||||||
|
/// increase the latency of display output when writing to a tty.
|
||||||
|
///
|
||||||
|
/// You might consider using
|
||||||
|
/// [`stdout`](fn.stdout.html)
|
||||||
|
/// instead, which chooses the buffering strategy automatically based on
|
||||||
|
/// whether stdout is connected to a tty.
|
||||||
|
pub fn stdout_buffered_block(
|
||||||
|
color_choice: termcolor::ColorChoice,
|
||||||
|
) -> StandardStream {
|
||||||
|
let out = termcolor::BufferedStandardStream::stdout(color_choice);
|
||||||
|
StandardStream(StandardStreamKind::BlockBuffered(out))
|
||||||
|
}
|
||||||
|
|
||||||
|
enum StandardStreamKind {
|
||||||
|
LineBuffered(termcolor::StandardStream),
|
||||||
|
BlockBuffered(termcolor::BufferedStandardStream),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl io::Write for StandardStream {
|
||||||
|
#[inline]
|
||||||
|
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
use self::StandardStreamKind::*;
|
||||||
|
|
||||||
|
match self.0 {
|
||||||
|
LineBuffered(ref mut w) => w.write(buf),
|
||||||
|
BlockBuffered(ref mut w) => w.write(buf),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn flush(&mut self) -> io::Result<()> {
|
||||||
|
use self::StandardStreamKind::*;
|
||||||
|
|
||||||
|
match self.0 {
|
||||||
|
LineBuffered(ref mut w) => w.flush(),
|
||||||
|
BlockBuffered(ref mut w) => w.flush(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl termcolor::WriteColor for StandardStream {
|
||||||
|
#[inline]
|
||||||
|
fn supports_color(&self) -> bool {
|
||||||
|
use self::StandardStreamKind::*;
|
||||||
|
|
||||||
|
match self.0 {
|
||||||
|
LineBuffered(ref w) => w.supports_color(),
|
||||||
|
BlockBuffered(ref w) => w.supports_color(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn set_color(&mut self, spec: &termcolor::ColorSpec) -> io::Result<()> {
|
||||||
|
use self::StandardStreamKind::*;
|
||||||
|
|
||||||
|
match self.0 {
|
||||||
|
LineBuffered(ref mut w) => w.set_color(spec),
|
||||||
|
BlockBuffered(ref mut w) => w.set_color(spec),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn reset(&mut self) -> io::Result<()> {
|
||||||
|
use self::StandardStreamKind::*;
|
||||||
|
|
||||||
|
match self.0 {
|
||||||
|
LineBuffered(ref mut w) => w.reset(),
|
||||||
|
BlockBuffered(ref mut w) => w.reset(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn is_synchronous(&self) -> bool {
|
||||||
|
use self::StandardStreamKind::*;
|
||||||
|
|
||||||
|
match self.0 {
|
||||||
|
LineBuffered(ref w) => w.is_synchronous(),
|
||||||
|
BlockBuffered(ref w) => w.is_synchronous(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
24
grep-matcher/Cargo.toml
Normal file
24
grep-matcher/Cargo.toml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[package]
|
||||||
|
name = "grep-matcher"
|
||||||
|
version = "0.1.3" #:version
|
||||||
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
|
description = """
|
||||||
|
A trait for regular expressions, with a focus on line oriented search.
|
||||||
|
"""
|
||||||
|
documentation = "https://docs.rs/grep-matcher"
|
||||||
|
homepage = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
repository = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["regex", "pattern", "trait"]
|
||||||
|
license = "Unlicense/MIT"
|
||||||
|
autotests = false
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
memchr = "2.1"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
regex = "1.1"
|
||||||
|
|
||||||
|
[[test]]
|
||||||
|
name = "integration"
|
||||||
|
path = "tests/tests.rs"
|
||||||
21
grep-matcher/LICENSE-MIT
Normal file
21
grep-matcher/LICENSE-MIT
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Andrew Gallant
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
36
grep-matcher/README.md
Normal file
36
grep-matcher/README.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
grep-matcher
|
||||||
|
------------
|
||||||
|
This crate provides a low level interface for describing regular expression
|
||||||
|
matchers. The `grep` crate uses this interface in order to make the regex
|
||||||
|
engine it uses pluggable.
|
||||||
|
|
||||||
|
[](https://travis-ci.org/BurntSushi/ripgrep)
|
||||||
|
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||||
|
[](https://crates.io/crates/grep-matcher)
|
||||||
|
|
||||||
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
[https://docs.rs/grep-matcher](https://docs.rs/grep-matcher)
|
||||||
|
|
||||||
|
**NOTE:** You probably don't want to use this crate directly. Instead, you
|
||||||
|
should prefer the facade defined in the
|
||||||
|
[`grep`](https://docs.rs/grep)
|
||||||
|
crate.
|
||||||
|
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Add this to your `Cargo.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
grep-matcher = "0.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
and this to your crate root:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
extern crate grep_matcher;
|
||||||
|
```
|
||||||
24
grep-matcher/UNLICENSE
Normal file
24
grep-matcher/UNLICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
328
grep-matcher/src/interpolate.rs
Normal file
328
grep-matcher/src/interpolate.rs
Normal file
@@ -0,0 +1,328 @@
|
|||||||
|
use std::str;
|
||||||
|
|
||||||
|
use memchr::memchr;
|
||||||
|
|
||||||
|
/// Interpolate capture references in `replacement` and write the interpolation
|
||||||
|
/// result to `dst`. References in `replacement` take the form of $N or $name,
|
||||||
|
/// where `N` is a capture group index and `name` is a capture group name. The
|
||||||
|
/// function provided, `name_to_index`, maps capture group names to indices.
|
||||||
|
///
|
||||||
|
/// The `append` function given is responsible for writing the replacement
|
||||||
|
/// to the `dst` buffer. That is, it is called with the capture group index
|
||||||
|
/// of a capture group reference and is expected to resolve the index to its
|
||||||
|
/// corresponding matched text. If no such match exists, then `append` should
|
||||||
|
/// not write anything to its given buffer.
|
||||||
|
pub fn interpolate<A, N>(
|
||||||
|
mut replacement: &[u8],
|
||||||
|
mut append: A,
|
||||||
|
mut name_to_index: N,
|
||||||
|
dst: &mut Vec<u8>,
|
||||||
|
) where
|
||||||
|
A: FnMut(usize, &mut Vec<u8>),
|
||||||
|
N: FnMut(&str) -> Option<usize>
|
||||||
|
{
|
||||||
|
while !replacement.is_empty() {
|
||||||
|
match memchr(b'$', replacement) {
|
||||||
|
None => break,
|
||||||
|
Some(i) => {
|
||||||
|
dst.extend(&replacement[..i]);
|
||||||
|
replacement = &replacement[i..];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if replacement.get(1).map_or(false, |&b| b == b'$') {
|
||||||
|
dst.push(b'$');
|
||||||
|
replacement = &replacement[2..];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
debug_assert!(!replacement.is_empty());
|
||||||
|
let cap_ref = match find_cap_ref(replacement) {
|
||||||
|
Some(cap_ref) => cap_ref,
|
||||||
|
None => {
|
||||||
|
dst.push(b'$');
|
||||||
|
replacement = &replacement[1..];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
replacement = &replacement[cap_ref.end..];
|
||||||
|
match cap_ref.cap {
|
||||||
|
Ref::Number(i) => append(i, dst),
|
||||||
|
Ref::Named(name) => {
|
||||||
|
if let Some(i) = name_to_index(name) {
|
||||||
|
append(i, dst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dst.extend(replacement);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `CaptureRef` represents a reference to a capture group inside some text.
|
||||||
|
/// The reference is either a capture group name or a number.
|
||||||
|
///
|
||||||
|
/// It is also tagged with the position in the text immediately proceding the
|
||||||
|
/// capture reference.
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
|
struct CaptureRef<'a> {
|
||||||
|
cap: Ref<'a>,
|
||||||
|
end: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A reference to a capture group in some text.
|
||||||
|
///
|
||||||
|
/// e.g., `$2`, `$foo`, `${foo}`.
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
|
enum Ref<'a> {
|
||||||
|
Named(&'a str),
|
||||||
|
Number(usize),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> From<&'a str> for Ref<'a> {
|
||||||
|
fn from(x: &'a str) -> Ref<'a> {
|
||||||
|
Ref::Named(x)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<usize> for Ref<'static> {
|
||||||
|
fn from(x: usize) -> Ref<'static> {
|
||||||
|
Ref::Number(x)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parses a possible reference to a capture group name in the given text,
|
||||||
|
/// starting at the beginning of `replacement`.
|
||||||
|
///
|
||||||
|
/// If no such valid reference could be found, None is returned.
|
||||||
|
fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef> {
|
||||||
|
let mut i = 0;
|
||||||
|
if replacement.len() <= 1 || replacement[0] != b'$' {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
let mut brace = false;
|
||||||
|
i += 1;
|
||||||
|
if replacement[i] == b'{' {
|
||||||
|
brace = true;
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
let mut cap_end = i;
|
||||||
|
while replacement.get(cap_end).map_or(false, is_valid_cap_letter) {
|
||||||
|
cap_end += 1;
|
||||||
|
}
|
||||||
|
if cap_end == i {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
// We just verified that the range 0..cap_end is valid ASCII, so it must
|
||||||
|
// therefore be valid UTF-8. If we really cared, we could avoid this UTF-8
|
||||||
|
// check with an unchecked conversion or by parsing the number straight
|
||||||
|
// from &[u8].
|
||||||
|
let cap = str::from_utf8(&replacement[i..cap_end])
|
||||||
|
.expect("valid UTF-8 capture name");
|
||||||
|
if brace {
|
||||||
|
if !replacement.get(cap_end).map_or(false, |&b| b == b'}') {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
cap_end += 1;
|
||||||
|
}
|
||||||
|
Some(CaptureRef {
|
||||||
|
cap: match cap.parse::<u32>() {
|
||||||
|
Ok(i) => Ref::Number(i as usize),
|
||||||
|
Err(_) => Ref::Named(cap),
|
||||||
|
},
|
||||||
|
end: cap_end,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if and only if the given byte is allowed in a capture name.
|
||||||
|
fn is_valid_cap_letter(b: &u8) -> bool {
|
||||||
|
match *b {
|
||||||
|
b'0' ..= b'9' | b'a' ..= b'z' | b'A' ..= b'Z' | b'_' => true,
|
||||||
|
_ => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::{CaptureRef, find_cap_ref, interpolate};
|
||||||
|
|
||||||
|
macro_rules! find {
|
||||||
|
($name:ident, $text:expr) => {
|
||||||
|
#[test]
|
||||||
|
fn $name() {
|
||||||
|
assert_eq!(None, find_cap_ref($text.as_bytes()));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($name:ident, $text:expr, $capref:expr) => {
|
||||||
|
#[test]
|
||||||
|
fn $name() {
|
||||||
|
assert_eq!(Some($capref), find_cap_ref($text.as_bytes()));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
macro_rules! c {
|
||||||
|
($name_or_number:expr, $pos:expr) => {
|
||||||
|
CaptureRef { cap: $name_or_number.into(), end: $pos }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
find!(find_cap_ref1, "$foo", c!("foo", 4));
|
||||||
|
find!(find_cap_ref2, "${foo}", c!("foo", 6));
|
||||||
|
find!(find_cap_ref3, "$0", c!(0, 2));
|
||||||
|
find!(find_cap_ref4, "$5", c!(5, 2));
|
||||||
|
find!(find_cap_ref5, "$10", c!(10, 3));
|
||||||
|
find!(find_cap_ref6, "$42a", c!("42a", 4));
|
||||||
|
find!(find_cap_ref7, "${42}a", c!(42, 5));
|
||||||
|
find!(find_cap_ref8, "${42");
|
||||||
|
find!(find_cap_ref9, "${42 ");
|
||||||
|
find!(find_cap_ref10, " $0 ");
|
||||||
|
find!(find_cap_ref11, "$");
|
||||||
|
find!(find_cap_ref12, " ");
|
||||||
|
find!(find_cap_ref13, "");
|
||||||
|
|
||||||
|
// A convenience routine for using interpolate's unwieldy but flexible API.
|
||||||
|
fn interpolate_string(
|
||||||
|
mut name_to_index: Vec<(&'static str, usize)>,
|
||||||
|
caps: Vec<&'static str>,
|
||||||
|
replacement: &str,
|
||||||
|
) -> String {
|
||||||
|
name_to_index.sort_by_key(|x| x.0);
|
||||||
|
|
||||||
|
let mut dst = vec![];
|
||||||
|
interpolate(
|
||||||
|
replacement.as_bytes(),
|
||||||
|
|i, dst| {
|
||||||
|
if let Some(&s) = caps.get(i) {
|
||||||
|
dst.extend(s.as_bytes());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|name| -> Option<usize> {
|
||||||
|
name_to_index
|
||||||
|
.binary_search_by_key(&name, |x| x.0)
|
||||||
|
.ok()
|
||||||
|
.map(|i| name_to_index[i].1)
|
||||||
|
},
|
||||||
|
&mut dst,
|
||||||
|
);
|
||||||
|
String::from_utf8(dst).unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
macro_rules! interp {
|
||||||
|
($name:ident, $map:expr, $caps:expr, $hay:expr, $expected:expr $(,)*) => {
|
||||||
|
#[test]
|
||||||
|
fn $name() {
|
||||||
|
assert_eq!($expected, interpolate_string($map, $caps, $hay));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp1,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test $foo test",
|
||||||
|
"test xxx test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp2,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test$footest",
|
||||||
|
"test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp3,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test${foo}test",
|
||||||
|
"testxxxtest",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp4,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test$2test",
|
||||||
|
"test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp5,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test${2}test",
|
||||||
|
"testxxxtest",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp6,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test $$foo test",
|
||||||
|
"test $foo test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp7,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"test $foo",
|
||||||
|
"test xxx",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp8,
|
||||||
|
vec![("foo", 2)],
|
||||||
|
vec!["", "", "xxx"],
|
||||||
|
"$foo test",
|
||||||
|
"xxx test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp9,
|
||||||
|
vec![("bar", 1), ("foo", 2)],
|
||||||
|
vec!["", "yyy", "xxx"],
|
||||||
|
"test $bar$foo",
|
||||||
|
"test yyyxxx",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp10,
|
||||||
|
vec![("bar", 1), ("foo", 2)],
|
||||||
|
vec!["", "yyy", "xxx"],
|
||||||
|
"test $ test",
|
||||||
|
"test $ test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp11,
|
||||||
|
vec![("bar", 1), ("foo", 2)],
|
||||||
|
vec!["", "yyy", "xxx"],
|
||||||
|
"test ${} test",
|
||||||
|
"test ${} test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp12,
|
||||||
|
vec![("bar", 1), ("foo", 2)],
|
||||||
|
vec!["", "yyy", "xxx"],
|
||||||
|
"test ${ } test",
|
||||||
|
"test ${ } test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp13,
|
||||||
|
vec![("bar", 1), ("foo", 2)],
|
||||||
|
vec!["", "yyy", "xxx"],
|
||||||
|
"test ${a b} test",
|
||||||
|
"test ${a b} test",
|
||||||
|
);
|
||||||
|
|
||||||
|
interp!(
|
||||||
|
interp14,
|
||||||
|
vec![("bar", 1), ("foo", 2)],
|
||||||
|
vec!["", "yyy", "xxx"],
|
||||||
|
"test ${a} test",
|
||||||
|
"test test",
|
||||||
|
);
|
||||||
|
}
|
||||||
1136
grep-matcher/src/lib.rs
Normal file
1136
grep-matcher/src/lib.rs
Normal file
File diff suppressed because it is too large
Load Diff
208
grep-matcher/tests/test_matcher.rs
Normal file
208
grep-matcher/tests/test_matcher.rs
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
use grep_matcher::{Captures, Match, Matcher};
|
||||||
|
use regex::bytes::Regex;
|
||||||
|
|
||||||
|
use util::{RegexMatcher, RegexMatcherNoCaps};
|
||||||
|
|
||||||
|
fn matcher(pattern: &str) -> RegexMatcher {
|
||||||
|
RegexMatcher::new(Regex::new(pattern).unwrap())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn matcher_no_caps(pattern: &str) -> RegexMatcherNoCaps {
|
||||||
|
RegexMatcherNoCaps(Regex::new(pattern).unwrap())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn m(start: usize, end: usize) -> Match {
|
||||||
|
Match::new(start, end)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn find() {
|
||||||
|
let matcher = matcher(r"(\w+)\s+(\w+)");
|
||||||
|
assert_eq!(matcher.find(b" homer simpson ").unwrap(), Some(m(1, 14)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn find_iter() {
|
||||||
|
let matcher = matcher(r"(\w+)\s+(\w+)");
|
||||||
|
let mut matches = vec![];
|
||||||
|
matcher.find_iter(b"aa bb cc dd", |m| {
|
||||||
|
matches.push(m);
|
||||||
|
true
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(matches, vec![m(0, 5), m(6, 11)]);
|
||||||
|
|
||||||
|
// Test that find_iter respects short circuiting.
|
||||||
|
matches.clear();
|
||||||
|
matcher.find_iter(b"aa bb cc dd", |m| {
|
||||||
|
matches.push(m);
|
||||||
|
false
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(matches, vec![m(0, 5)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn try_find_iter() {
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
struct MyError;
|
||||||
|
|
||||||
|
let matcher = matcher(r"(\w+)\s+(\w+)");
|
||||||
|
let mut matches = vec![];
|
||||||
|
let err = matcher.try_find_iter(b"aa bb cc dd", |m| {
|
||||||
|
if matches.is_empty() {
|
||||||
|
matches.push(m);
|
||||||
|
Ok(true)
|
||||||
|
} else {
|
||||||
|
Err(MyError)
|
||||||
|
}
|
||||||
|
}).unwrap().unwrap_err();
|
||||||
|
assert_eq!(matches, vec![m(0, 5)]);
|
||||||
|
assert_eq!(err, MyError);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn shortest_match() {
|
||||||
|
let matcher = matcher(r"a+");
|
||||||
|
// This tests that the default impl isn't doing anything smart, and simply
|
||||||
|
// defers to `find`.
|
||||||
|
assert_eq!(matcher.shortest_match(b"aaa").unwrap(), Some(3));
|
||||||
|
// The actual underlying regex is smarter.
|
||||||
|
assert_eq!(matcher.re.shortest_match(b"aaa"), Some(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn captures() {
|
||||||
|
let matcher = matcher(r"(?P<a>\w+)\s+(?P<b>\w+)");
|
||||||
|
assert_eq!(matcher.capture_count(), 3);
|
||||||
|
assert_eq!(matcher.capture_index("a"), Some(1));
|
||||||
|
assert_eq!(matcher.capture_index("b"), Some(2));
|
||||||
|
assert_eq!(matcher.capture_index("nada"), None);
|
||||||
|
|
||||||
|
let mut caps = matcher.new_captures().unwrap();
|
||||||
|
assert!(matcher.captures(b" homer simpson ", &mut caps).unwrap());
|
||||||
|
assert_eq!(caps.get(0), Some(m(1, 14)));
|
||||||
|
assert_eq!(caps.get(1), Some(m(1, 6)));
|
||||||
|
assert_eq!(caps.get(2), Some(m(7, 14)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn captures_iter() {
|
||||||
|
let matcher = matcher(r"(?P<a>\w+)\s+(?P<b>\w+)");
|
||||||
|
let mut caps = matcher.new_captures().unwrap();
|
||||||
|
let mut matches = vec![];
|
||||||
|
matcher.captures_iter(b"aa bb cc dd", &mut caps, |caps| {
|
||||||
|
matches.push(caps.get(0).unwrap());
|
||||||
|
matches.push(caps.get(1).unwrap());
|
||||||
|
matches.push(caps.get(2).unwrap());
|
||||||
|
true
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(matches, vec![
|
||||||
|
m(0, 5), m(0, 2), m(3, 5),
|
||||||
|
m(6, 11), m(6, 8), m(9, 11),
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Test that captures_iter respects short circuiting.
|
||||||
|
matches.clear();
|
||||||
|
matcher.captures_iter(b"aa bb cc dd", &mut caps, |caps| {
|
||||||
|
matches.push(caps.get(0).unwrap());
|
||||||
|
matches.push(caps.get(1).unwrap());
|
||||||
|
matches.push(caps.get(2).unwrap());
|
||||||
|
false
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(matches, vec![
|
||||||
|
m(0, 5), m(0, 2), m(3, 5),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn try_captures_iter() {
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
struct MyError;
|
||||||
|
|
||||||
|
let matcher = matcher(r"(?P<a>\w+)\s+(?P<b>\w+)");
|
||||||
|
let mut caps = matcher.new_captures().unwrap();
|
||||||
|
let mut matches = vec![];
|
||||||
|
let err = matcher.try_captures_iter(b"aa bb cc dd", &mut caps, |caps| {
|
||||||
|
if matches.is_empty() {
|
||||||
|
matches.push(caps.get(0).unwrap());
|
||||||
|
matches.push(caps.get(1).unwrap());
|
||||||
|
matches.push(caps.get(2).unwrap());
|
||||||
|
Ok(true)
|
||||||
|
} else {
|
||||||
|
Err(MyError)
|
||||||
|
}
|
||||||
|
}).unwrap().unwrap_err();
|
||||||
|
assert_eq!(matches, vec![m(0, 5), m(0, 2), m(3, 5)]);
|
||||||
|
assert_eq!(err, MyError);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that our default impls for capturing are correct. Namely, when
|
||||||
|
// capturing isn't supported by the underlying matcher, then all of the
|
||||||
|
// various capturing related APIs fail fast.
|
||||||
|
#[test]
|
||||||
|
fn no_captures() {
|
||||||
|
let matcher = matcher_no_caps(r"(?P<a>\w+)\s+(?P<b>\w+)");
|
||||||
|
assert_eq!(matcher.capture_count(), 0);
|
||||||
|
assert_eq!(matcher.capture_index("a"), None);
|
||||||
|
assert_eq!(matcher.capture_index("b"), None);
|
||||||
|
assert_eq!(matcher.capture_index("nada"), None);
|
||||||
|
|
||||||
|
let mut caps = matcher.new_captures().unwrap();
|
||||||
|
assert!(!matcher.captures(b"homer simpson", &mut caps).unwrap());
|
||||||
|
|
||||||
|
let mut called = false;
|
||||||
|
matcher.captures_iter(b"homer simpson", &mut caps, |_| {
|
||||||
|
called = true;
|
||||||
|
true
|
||||||
|
}).unwrap();
|
||||||
|
assert!(!called);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn replace() {
|
||||||
|
let matcher = matcher(r"(\w+)\s+(\w+)");
|
||||||
|
let mut dst = vec![];
|
||||||
|
matcher.replace(b"aa bb cc dd", &mut dst, |_, dst| {
|
||||||
|
dst.push(b'z');
|
||||||
|
true
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(dst, b"z z");
|
||||||
|
|
||||||
|
// Test that replacements respect short circuiting.
|
||||||
|
dst.clear();
|
||||||
|
matcher.replace(b"aa bb cc dd", &mut dst, |_, dst| {
|
||||||
|
dst.push(b'z');
|
||||||
|
false
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(dst, b"z cc dd");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn replace_with_captures() {
|
||||||
|
let matcher = matcher(r"(\w+)\s+(\w+)");
|
||||||
|
let haystack = b"aa bb cc dd";
|
||||||
|
let mut caps = matcher.new_captures().unwrap();
|
||||||
|
let mut dst = vec![];
|
||||||
|
matcher.replace_with_captures(haystack, &mut caps, &mut dst, |caps, dst| {
|
||||||
|
caps.interpolate(
|
||||||
|
|name| matcher.capture_index(name),
|
||||||
|
haystack,
|
||||||
|
b"$2 $1",
|
||||||
|
dst,
|
||||||
|
);
|
||||||
|
true
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(dst, b"bb aa dd cc");
|
||||||
|
|
||||||
|
// Test that replacements respect short circuiting.
|
||||||
|
dst.clear();
|
||||||
|
matcher.replace_with_captures(haystack, &mut caps, &mut dst, |caps, dst| {
|
||||||
|
caps.interpolate(
|
||||||
|
|name| matcher.capture_index(name),
|
||||||
|
haystack,
|
||||||
|
b"$2 $1",
|
||||||
|
dst,
|
||||||
|
);
|
||||||
|
false
|
||||||
|
}).unwrap();
|
||||||
|
assert_eq!(dst, b"bb aa cc dd");
|
||||||
|
}
|
||||||
6
grep-matcher/tests/tests.rs
Normal file
6
grep-matcher/tests/tests.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
extern crate grep_matcher;
|
||||||
|
extern crate regex;
|
||||||
|
|
||||||
|
mod util;
|
||||||
|
|
||||||
|
mod test_matcher;
|
||||||
104
grep-matcher/tests/util.rs
Normal file
104
grep-matcher/tests/util.rs
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
use std::collections::HashMap;
|
||||||
|
use std::result;
|
||||||
|
|
||||||
|
use grep_matcher::{Captures, Match, Matcher, NoCaptures, NoError};
|
||||||
|
use regex::bytes::{CaptureLocations, Regex};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct RegexMatcher {
|
||||||
|
pub re: Regex,
|
||||||
|
pub names: HashMap<String, usize>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RegexMatcher {
|
||||||
|
pub fn new(re: Regex) -> RegexMatcher {
|
||||||
|
let mut names = HashMap::new();
|
||||||
|
for (i, optional_name) in re.capture_names().enumerate() {
|
||||||
|
if let Some(name) = optional_name {
|
||||||
|
names.insert(name.to_string(), i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RegexMatcher {
|
||||||
|
re: re,
|
||||||
|
names: names,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type Result<T> = result::Result<T, NoError>;
|
||||||
|
|
||||||
|
impl Matcher for RegexMatcher {
|
||||||
|
type Captures = RegexCaptures;
|
||||||
|
type Error = NoError;
|
||||||
|
|
||||||
|
fn find_at(
|
||||||
|
&self,
|
||||||
|
haystack: &[u8],
|
||||||
|
at: usize,
|
||||||
|
) -> Result<Option<Match>> {
|
||||||
|
Ok(self.re
|
||||||
|
.find_at(haystack, at)
|
||||||
|
.map(|m| Match::new(m.start(), m.end())))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn new_captures(&self) -> Result<RegexCaptures> {
|
||||||
|
Ok(RegexCaptures(self.re.capture_locations()))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn captures_at(
|
||||||
|
&self,
|
||||||
|
haystack: &[u8],
|
||||||
|
at: usize,
|
||||||
|
caps: &mut RegexCaptures,
|
||||||
|
) -> Result<bool> {
|
||||||
|
Ok(self.re.captures_read_at(&mut caps.0, haystack, at).is_some())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn capture_count(&self) -> usize {
|
||||||
|
self.re.captures_len()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn capture_index(&self, name: &str) -> Option<usize> {
|
||||||
|
self.names.get(name).map(|i| *i)
|
||||||
|
}
|
||||||
|
|
||||||
|
// We purposely don't implement any other methods, so that we test the
|
||||||
|
// default impls. The "real" Regex impl for Matcher provides a few more
|
||||||
|
// impls. e.g., Its `find_iter` impl is faster than what we can do here,
|
||||||
|
// since the regex crate avoids synchronization overhead.
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct RegexMatcherNoCaps(pub Regex);
|
||||||
|
|
||||||
|
impl Matcher for RegexMatcherNoCaps {
|
||||||
|
type Captures = NoCaptures;
|
||||||
|
type Error = NoError;
|
||||||
|
|
||||||
|
fn find_at(
|
||||||
|
&self,
|
||||||
|
haystack: &[u8],
|
||||||
|
at: usize,
|
||||||
|
) -> Result<Option<Match>> {
|
||||||
|
Ok(self.0
|
||||||
|
.find_at(haystack, at)
|
||||||
|
.map(|m| Match::new(m.start(), m.end())))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn new_captures(&self) -> Result<NoCaptures> {
|
||||||
|
Ok(NoCaptures::new())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct RegexCaptures(CaptureLocations);
|
||||||
|
|
||||||
|
impl Captures for RegexCaptures {
|
||||||
|
fn len(&self) -> usize {
|
||||||
|
self.0.len()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get(&self, i: usize) -> Option<Match> {
|
||||||
|
self.0.pos(i).map(|(s, e)| Match::new(s, e))
|
||||||
|
}
|
||||||
|
}
|
||||||
17
grep-pcre2/Cargo.toml
Normal file
17
grep-pcre2/Cargo.toml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[package]
|
||||||
|
name = "grep-pcre2"
|
||||||
|
version = "0.1.3" #:version
|
||||||
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
|
description = """
|
||||||
|
Use PCRE2 with the 'grep' crate.
|
||||||
|
"""
|
||||||
|
documentation = "https://docs.rs/grep-pcre2"
|
||||||
|
homepage = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
repository = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["regex", "grep", "pcre", "backreference", "look"]
|
||||||
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
grep-matcher = { version = "0.1.2", path = "../grep-matcher" }
|
||||||
|
pcre2 = "0.2.0"
|
||||||
21
grep-pcre2/LICENSE-MIT
Normal file
21
grep-pcre2/LICENSE-MIT
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Andrew Gallant
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
39
grep-pcre2/README.md
Normal file
39
grep-pcre2/README.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
grep-pcre2
|
||||||
|
----------
|
||||||
|
The `grep-pcre2` crate provides an implementation of the `Matcher` trait from
|
||||||
|
the `grep-matcher` crate. This implementation permits PCRE2 to be used in the
|
||||||
|
`grep` crate for fast line oriented searching.
|
||||||
|
|
||||||
|
[](https://travis-ci.org/BurntSushi/ripgrep)
|
||||||
|
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||||
|
[](https://crates.io/crates/grep-pcre2)
|
||||||
|
|
||||||
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
[https://docs.rs/grep-pcre2](https://docs.rs/grep-pcre2)
|
||||||
|
|
||||||
|
**NOTE:** You probably don't want to use this crate directly. Instead, you
|
||||||
|
should prefer the facade defined in the
|
||||||
|
[`grep`](https://docs.rs/grep)
|
||||||
|
crate.
|
||||||
|
|
||||||
|
If you're looking to just use PCRE2 from Rust, then you probably want the
|
||||||
|
[`pcre2`](https://docs.rs/pcre2)
|
||||||
|
crate, which provide high level safe bindings to PCRE2.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Add this to your `Cargo.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
grep-pcre2 = "0.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
and this to your crate root:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
extern crate grep_pcre2;
|
||||||
|
```
|
||||||
24
grep-pcre2/UNLICENSE
Normal file
24
grep-pcre2/UNLICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
59
grep-pcre2/src/error.rs
Normal file
59
grep-pcre2/src/error.rs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
use std::error;
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
|
/// An error that can occur in this crate.
|
||||||
|
///
|
||||||
|
/// Generally, this error corresponds to problems building a regular
|
||||||
|
/// expression, whether it's in parsing, compilation or a problem with
|
||||||
|
/// guaranteeing a configured optimization.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct Error {
|
||||||
|
kind: ErrorKind,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Error {
|
||||||
|
pub(crate) fn regex<E: error::Error>(err: E) -> Error {
|
||||||
|
Error { kind: ErrorKind::Regex(err.to_string()) }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the kind of this error.
|
||||||
|
pub fn kind(&self) -> &ErrorKind {
|
||||||
|
&self.kind
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The kind of an error that can occur.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub enum ErrorKind {
|
||||||
|
/// An error that occurred as a result of parsing a regular expression.
|
||||||
|
/// This can be a syntax error or an error that results from attempting to
|
||||||
|
/// compile a regular expression that is too big.
|
||||||
|
///
|
||||||
|
/// The string here is the underlying error converted to a string.
|
||||||
|
Regex(String),
|
||||||
|
/// Hints that destructuring should not be exhaustive.
|
||||||
|
///
|
||||||
|
/// This enum may grow additional variants, so this makes sure clients
|
||||||
|
/// don't count on exhaustive matching. (Otherwise, adding a new variant
|
||||||
|
/// could break existing code.)
|
||||||
|
#[doc(hidden)]
|
||||||
|
__Nonexhaustive,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl error::Error for Error {
|
||||||
|
fn description(&self) -> &str {
|
||||||
|
match self.kind {
|
||||||
|
ErrorKind::Regex(_) => "regex error",
|
||||||
|
ErrorKind::__Nonexhaustive => unreachable!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for Error {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match self.kind {
|
||||||
|
ErrorKind::Regex(ref s) => write!(f, "{}", s),
|
||||||
|
ErrorKind::__Nonexhaustive => unreachable!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
grep-pcre2/src/lib.rs
Normal file
16
grep-pcre2/src/lib.rs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/*!
|
||||||
|
An implementation of `grep-matcher`'s `Matcher` trait for
|
||||||
|
[PCRE2](https://www.pcre.org/).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
|
extern crate grep_matcher;
|
||||||
|
extern crate pcre2;
|
||||||
|
|
||||||
|
pub use error::{Error, ErrorKind};
|
||||||
|
pub use matcher::{RegexCaptures, RegexMatcher, RegexMatcherBuilder};
|
||||||
|
pub use pcre2::{is_jit_available, version};
|
||||||
|
|
||||||
|
mod error;
|
||||||
|
mod matcher;
|
||||||
464
grep-pcre2/src/matcher.rs
Normal file
464
grep-pcre2/src/matcher.rs
Normal file
@@ -0,0 +1,464 @@
|
|||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use grep_matcher::{Captures, Match, Matcher};
|
||||||
|
use pcre2::bytes::{CaptureLocations, Regex, RegexBuilder};
|
||||||
|
|
||||||
|
use error::Error;
|
||||||
|
|
||||||
|
/// A builder for configuring the compilation of a PCRE2 regex.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct RegexMatcherBuilder {
|
||||||
|
builder: RegexBuilder,
|
||||||
|
case_smart: bool,
|
||||||
|
word: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RegexMatcherBuilder {
|
||||||
|
/// Create a new matcher builder with a default configuration.
|
||||||
|
pub fn new() -> RegexMatcherBuilder {
|
||||||
|
RegexMatcherBuilder {
|
||||||
|
builder: RegexBuilder::new(),
|
||||||
|
case_smart: false,
|
||||||
|
word: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Compile the given pattern into a PCRE matcher using the current
|
||||||
|
/// configuration.
|
||||||
|
///
|
||||||
|
/// If there was a problem compiling the pattern, then an error is
|
||||||
|
/// returned.
|
||||||
|
pub fn build(&self, pattern: &str) -> Result<RegexMatcher, Error> {
|
||||||
|
let mut builder = self.builder.clone();
|
||||||
|
if self.case_smart && !has_uppercase_literal(pattern) {
|
||||||
|
builder.caseless(true);
|
||||||
|
}
|
||||||
|
let res =
|
||||||
|
if self.word {
|
||||||
|
let pattern = format!(r"(?<!\w)(?:{})(?!\w)", pattern);
|
||||||
|
builder.build(&pattern)
|
||||||
|
} else {
|
||||||
|
builder.build(pattern)
|
||||||
|
};
|
||||||
|
res.map_err(Error::regex).map(|regex| {
|
||||||
|
let mut names = HashMap::new();
|
||||||
|
for (i, name) in regex.capture_names().iter().enumerate() {
|
||||||
|
if let Some(ref name) = *name {
|
||||||
|
names.insert(name.to_string(), i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RegexMatcher { regex, names }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enables case insensitive matching.
|
||||||
|
///
|
||||||
|
/// If the `utf` option is also set, then Unicode case folding is used
|
||||||
|
/// to determine case insensitivity. When the `utf` option is not set,
|
||||||
|
/// then only standard ASCII case insensitivity is considered.
|
||||||
|
///
|
||||||
|
/// This option corresponds to the `i` flag.
|
||||||
|
pub fn caseless(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.caseless(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Whether to enable "smart case" or not.
|
||||||
|
///
|
||||||
|
/// When smart case is enabled, the builder will automatically enable
|
||||||
|
/// case insensitive matching based on how the pattern is written. Namely,
|
||||||
|
/// case insensitive mode is enabled when both of the following things
|
||||||
|
/// are believed to be true:
|
||||||
|
///
|
||||||
|
/// 1. The pattern contains at least one literal character. For example,
|
||||||
|
/// `a\w` contains a literal (`a`) but `\w` does not.
|
||||||
|
/// 2. Of the literals in the pattern, none of them are considered to be
|
||||||
|
/// uppercase according to Unicode. For example, `foo\pL` has no
|
||||||
|
/// uppercase literals but `Foo\pL` does.
|
||||||
|
///
|
||||||
|
/// Note that the implementation of this is not perfect. Namely, `\p{Ll}`
|
||||||
|
/// will prevent case insensitive matching even though it is part of a meta
|
||||||
|
/// sequence. This bug will probably never be fixed.
|
||||||
|
pub fn case_smart(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.case_smart = yes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enables "dot all" matching.
|
||||||
|
///
|
||||||
|
/// When enabled, the `.` metacharacter in the pattern matches any
|
||||||
|
/// character, include `\n`. When disabled (the default), `.` will match
|
||||||
|
/// any character except for `\n`.
|
||||||
|
///
|
||||||
|
/// This option corresponds to the `s` flag.
|
||||||
|
pub fn dotall(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.dotall(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable "extended" mode in the pattern, where whitespace is ignored.
|
||||||
|
///
|
||||||
|
/// This option corresponds to the `x` flag.
|
||||||
|
pub fn extended(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.extended(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable multiline matching mode.
|
||||||
|
///
|
||||||
|
/// When enabled, the `^` and `$` anchors will match both at the beginning
|
||||||
|
/// and end of a subject string, in addition to matching at the start of
|
||||||
|
/// a line and the end of a line. When disabled, the `^` and `$` anchors
|
||||||
|
/// will only match at the beginning and end of a subject string.
|
||||||
|
///
|
||||||
|
/// This option corresponds to the `m` flag.
|
||||||
|
pub fn multi_line(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.multi_line(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable matching of CRLF as a line terminator.
|
||||||
|
///
|
||||||
|
/// When enabled, anchors such as `^` and `$` will match any of the
|
||||||
|
/// following as a line terminator: `\r`, `\n` or `\r\n`.
|
||||||
|
///
|
||||||
|
/// This is disabled by default, in which case, only `\n` is recognized as
|
||||||
|
/// a line terminator.
|
||||||
|
pub fn crlf(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.crlf(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Require that all matches occur on word boundaries.
|
||||||
|
///
|
||||||
|
/// Enabling this option is subtly different than putting `\b` assertions
|
||||||
|
/// on both sides of your pattern. In particular, a `\b` assertion requires
|
||||||
|
/// that one side of it match a word character while the other match a
|
||||||
|
/// non-word character. This option, in contrast, merely requires that
|
||||||
|
/// one side match a non-word character.
|
||||||
|
///
|
||||||
|
/// For example, `\b-2\b` will not match `foo -2 bar` since `-` is not a
|
||||||
|
/// word character. However, `-2` with this `word` option enabled will
|
||||||
|
/// match the `-2` in `foo -2 bar`.
|
||||||
|
pub fn word(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.word = yes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable Unicode matching mode.
|
||||||
|
///
|
||||||
|
/// When enabled, the following patterns become Unicode aware: `\b`, `\B`,
|
||||||
|
/// `\d`, `\D`, `\s`, `\S`, `\w`, `\W`.
|
||||||
|
///
|
||||||
|
/// When set, this implies UTF matching mode. It is not possible to enable
|
||||||
|
/// Unicode matching mode without enabling UTF matching mode.
|
||||||
|
///
|
||||||
|
/// This is disabled by default.
|
||||||
|
pub fn ucp(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.ucp(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable UTF matching mode.
|
||||||
|
///
|
||||||
|
/// When enabled, characters are treated as sequences of code units that
|
||||||
|
/// make up a single codepoint instead of as single bytes. For example,
|
||||||
|
/// this will cause `.` to match any single UTF-8 encoded codepoint, where
|
||||||
|
/// as when this is disabled, `.` will any single byte (except for `\n` in
|
||||||
|
/// both cases, unless "dot all" mode is enabled).
|
||||||
|
///
|
||||||
|
/// Note that when UTF matching mode is enabled, every search performed
|
||||||
|
/// will do a UTF-8 validation check, which can impact performance. The
|
||||||
|
/// UTF-8 check can be disabled via the `disable_utf_check` option, but it
|
||||||
|
/// is undefined behavior to enable UTF matching mode and search invalid
|
||||||
|
/// UTF-8.
|
||||||
|
///
|
||||||
|
/// This is disabled by default.
|
||||||
|
pub fn utf(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.utf(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// When UTF matching mode is enabled, this will disable the UTF checking
|
||||||
|
/// that PCRE2 will normally perform automatically. If UTF matching mode
|
||||||
|
/// is not enabled, then this has no effect.
|
||||||
|
///
|
||||||
|
/// UTF checking is enabled by default when UTF matching mode is enabled.
|
||||||
|
/// If UTF matching mode is enabled and UTF checking is enabled, then PCRE2
|
||||||
|
/// will return an error if you attempt to search a subject string that is
|
||||||
|
/// not valid UTF-8.
|
||||||
|
///
|
||||||
|
/// # Safety
|
||||||
|
///
|
||||||
|
/// It is undefined behavior to disable the UTF check in UTF matching mode
|
||||||
|
/// and search a subject string that is not valid UTF-8. When the UTF check
|
||||||
|
/// is disabled, callers must guarantee that the subject string is valid
|
||||||
|
/// UTF-8.
|
||||||
|
pub unsafe fn disable_utf_check(&mut self) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.disable_utf_check();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable PCRE2's JIT and return an error if it's not available.
|
||||||
|
///
|
||||||
|
/// This generally speeds up matching quite a bit. The downside is that it
|
||||||
|
/// can increase the time it takes to compile a pattern.
|
||||||
|
///
|
||||||
|
/// If the JIT isn't available or if JIT compilation returns an error, then
|
||||||
|
/// regex compilation will fail with the corresponding error.
|
||||||
|
///
|
||||||
|
/// This is disabled by default, and always overrides `jit_if_available`.
|
||||||
|
pub fn jit(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.jit(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable PCRE2's JIT if it's available.
|
||||||
|
///
|
||||||
|
/// This generally speeds up matching quite a bit. The downside is that it
|
||||||
|
/// can increase the time it takes to compile a pattern.
|
||||||
|
///
|
||||||
|
/// If the JIT isn't available or if JIT compilation returns an error,
|
||||||
|
/// then a debug message with the error will be emitted and the regex will
|
||||||
|
/// otherwise silently fall back to non-JIT matching.
|
||||||
|
///
|
||||||
|
/// This is disabled by default, and always overrides `jit`.
|
||||||
|
pub fn jit_if_available(&mut self, yes: bool) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.jit_if_available(yes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Set the maximum size of PCRE2's JIT stack, in bytes. If the JIT is
|
||||||
|
/// not enabled, then this has no effect.
|
||||||
|
///
|
||||||
|
/// When `None` is given, no custom JIT stack will be created, and instead,
|
||||||
|
/// the default JIT stack is used. When the default is used, its maximum
|
||||||
|
/// size is 32 KB.
|
||||||
|
///
|
||||||
|
/// When this is set, then a new JIT stack will be created with the given
|
||||||
|
/// maximum size as its limit.
|
||||||
|
///
|
||||||
|
/// Increasing the stack size can be useful for larger regular expressions.
|
||||||
|
///
|
||||||
|
/// By default, this is set to `None`.
|
||||||
|
pub fn max_jit_stack_size(
|
||||||
|
&mut self,
|
||||||
|
bytes: Option<usize>,
|
||||||
|
) -> &mut RegexMatcherBuilder {
|
||||||
|
self.builder.max_jit_stack_size(bytes);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// An implementation of the `Matcher` trait using PCRE2.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct RegexMatcher {
|
||||||
|
regex: Regex,
|
||||||
|
names: HashMap<String, usize>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RegexMatcher {
|
||||||
|
/// Create a new matcher from the given pattern using the default
|
||||||
|
/// configuration.
|
||||||
|
pub fn new(pattern: &str) -> Result<RegexMatcher, Error> {
|
||||||
|
RegexMatcherBuilder::new().build(pattern)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Matcher for RegexMatcher {
|
||||||
|
type Captures = RegexCaptures;
|
||||||
|
type Error = Error;
|
||||||
|
|
||||||
|
fn find_at(
|
||||||
|
&self,
|
||||||
|
haystack: &[u8],
|
||||||
|
at: usize,
|
||||||
|
) -> Result<Option<Match>, Error> {
|
||||||
|
Ok(self.regex
|
||||||
|
.find_at(haystack, at)
|
||||||
|
.map_err(Error::regex)?
|
||||||
|
.map(|m| Match::new(m.start(), m.end())))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn new_captures(&self) -> Result<RegexCaptures, Error> {
|
||||||
|
Ok(RegexCaptures::new(self.regex.capture_locations()))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn capture_count(&self) -> usize {
|
||||||
|
self.regex.captures_len()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn capture_index(&self, name: &str) -> Option<usize> {
|
||||||
|
self.names.get(name).map(|i| *i)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn try_find_iter<F, E>(
|
||||||
|
&self,
|
||||||
|
haystack: &[u8],
|
||||||
|
mut matched: F,
|
||||||
|
) -> Result<Result<(), E>, Error>
|
||||||
|
where F: FnMut(Match) -> Result<bool, E>
|
||||||
|
{
|
||||||
|
for result in self.regex.find_iter(haystack) {
|
||||||
|
let m = result.map_err(Error::regex)?;
|
||||||
|
match matched(Match::new(m.start(), m.end())) {
|
||||||
|
Ok(true) => continue,
|
||||||
|
Ok(false) => return Ok(Ok(())),
|
||||||
|
Err(err) => return Ok(Err(err)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(Ok(()))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn captures_at(
|
||||||
|
&self,
|
||||||
|
haystack: &[u8],
|
||||||
|
at: usize,
|
||||||
|
caps: &mut RegexCaptures,
|
||||||
|
) -> Result<bool, Error> {
|
||||||
|
Ok(self.regex
|
||||||
|
.captures_read_at(&mut caps.locs, haystack, at)
|
||||||
|
.map_err(Error::regex)?
|
||||||
|
.is_some())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Represents the match offsets of each capturing group in a match.
|
||||||
|
///
|
||||||
|
/// The first, or `0`th capture group, always corresponds to the entire match
|
||||||
|
/// and is guaranteed to be present when a match occurs. The next capture
|
||||||
|
/// group, at index `1`, corresponds to the first capturing group in the regex,
|
||||||
|
/// ordered by the position at which the left opening parenthesis occurs.
|
||||||
|
///
|
||||||
|
/// Note that not all capturing groups are guaranteed to be present in a match.
|
||||||
|
/// For example, in the regex, `(?P<foo>\w)|(?P<bar>\W)`, only one of `foo`
|
||||||
|
/// or `bar` will ever be set in any given match.
|
||||||
|
///
|
||||||
|
/// In order to access a capture group by name, you'll need to first find the
|
||||||
|
/// index of the group using the corresponding matcher's `capture_index`
|
||||||
|
/// method, and then use that index with `RegexCaptures::get`.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct RegexCaptures {
|
||||||
|
/// Where the locations are stored.
|
||||||
|
locs: CaptureLocations,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Captures for RegexCaptures {
|
||||||
|
fn len(&self) -> usize {
|
||||||
|
self.locs.len()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get(&self, i: usize) -> Option<Match> {
|
||||||
|
self.locs.get(i).map(|(s, e)| Match::new(s, e))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RegexCaptures {
|
||||||
|
pub(crate) fn new(locs: CaptureLocations) -> RegexCaptures {
|
||||||
|
RegexCaptures { locs }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Determine whether the pattern contains an uppercase character which should
|
||||||
|
/// negate the effect of the smart-case option.
|
||||||
|
///
|
||||||
|
/// Ideally we would be able to check the AST in order to correctly handle
|
||||||
|
/// things like '\p{Ll}' and '\p{Lu}' (which should be treated as explicitly
|
||||||
|
/// cased), but PCRE doesn't expose enough details for that kind of analysis.
|
||||||
|
/// For now, our 'good enough' solution is to simply perform a semi-naïve
|
||||||
|
/// scan of the input pattern and ignore all characters following a '\'. The
|
||||||
|
/// This at least lets us support the most common cases, like 'foo\w' and
|
||||||
|
/// 'foo\S', in an intuitive manner.
|
||||||
|
fn has_uppercase_literal(pattern: &str) -> bool {
|
||||||
|
let mut chars = pattern.chars();
|
||||||
|
while let Some(c) = chars.next() {
|
||||||
|
if c == '\\' {
|
||||||
|
chars.next();
|
||||||
|
} else if c.is_uppercase() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use grep_matcher::{LineMatchKind, Matcher};
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
// Test that enabling word matches does the right thing and demonstrate
|
||||||
|
// the difference between it and surrounding the regex in `\b`.
|
||||||
|
#[test]
|
||||||
|
fn word() {
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.word(true)
|
||||||
|
.build(r"-2")
|
||||||
|
.unwrap();
|
||||||
|
assert!(matcher.is_match(b"abc -2 foo").unwrap());
|
||||||
|
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.word(false)
|
||||||
|
.build(r"\b-2\b")
|
||||||
|
.unwrap();
|
||||||
|
assert!(!matcher.is_match(b"abc -2 foo").unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that enabling CRLF permits `$` to match at the end of a line.
|
||||||
|
#[test]
|
||||||
|
fn line_terminator_crlf() {
|
||||||
|
// Test normal use of `$` with a `\n` line terminator.
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.multi_line(true)
|
||||||
|
.build(r"abc$")
|
||||||
|
.unwrap();
|
||||||
|
assert!(matcher.is_match(b"abc\n").unwrap());
|
||||||
|
|
||||||
|
// Test that `$` doesn't match at `\r\n` boundary normally.
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.multi_line(true)
|
||||||
|
.build(r"abc$")
|
||||||
|
.unwrap();
|
||||||
|
assert!(!matcher.is_match(b"abc\r\n").unwrap());
|
||||||
|
|
||||||
|
// Now check the CRLF handling.
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.multi_line(true)
|
||||||
|
.crlf(true)
|
||||||
|
.build(r"abc$")
|
||||||
|
.unwrap();
|
||||||
|
assert!(matcher.is_match(b"abc\r\n").unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that smart case works.
|
||||||
|
#[test]
|
||||||
|
fn case_smart() {
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.case_smart(true)
|
||||||
|
.build(r"abc")
|
||||||
|
.unwrap();
|
||||||
|
assert!(matcher.is_match(b"ABC").unwrap());
|
||||||
|
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.case_smart(true)
|
||||||
|
.build(r"aBc")
|
||||||
|
.unwrap();
|
||||||
|
assert!(!matcher.is_match(b"ABC").unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that finding candidate lines works as expected.
|
||||||
|
#[test]
|
||||||
|
fn candidate_lines() {
|
||||||
|
fn is_confirmed(m: LineMatchKind) -> bool {
|
||||||
|
match m {
|
||||||
|
LineMatchKind::Confirmed(_) => true,
|
||||||
|
_ => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.build(r"\wfoo\s")
|
||||||
|
.unwrap();
|
||||||
|
let m = matcher.find_candidate_line(b"afoo ").unwrap().unwrap();
|
||||||
|
assert!(is_confirmed(m));
|
||||||
|
}
|
||||||
|
}
|
||||||
31
grep-printer/Cargo.toml
Normal file
31
grep-printer/Cargo.toml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[package]
|
||||||
|
name = "grep-printer"
|
||||||
|
version = "0.1.3" #:version
|
||||||
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
|
description = """
|
||||||
|
An implementation of the grep crate's Sink trait that provides standard
|
||||||
|
printing of search results, similar to grep itself.
|
||||||
|
"""
|
||||||
|
documentation = "https://docs.rs/grep-printer"
|
||||||
|
homepage = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
repository = "https://github.com/BurntSushi/ripgrep"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["grep", "pattern", "print", "printer", "sink"]
|
||||||
|
license = "Unlicense/MIT"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["serde1"]
|
||||||
|
serde1 = ["base64", "serde", "serde_derive", "serde_json"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
base64 = { version = "0.11.0", optional = true }
|
||||||
|
bstr = "0.2.0"
|
||||||
|
grep-matcher = { version = "0.1.2", path = "../grep-matcher" }
|
||||||
|
grep-searcher = { version = "0.1.4", path = "../grep-searcher" }
|
||||||
|
termcolor = "1.0.4"
|
||||||
|
serde = { version = "1.0.77", optional = true }
|
||||||
|
serde_derive = { version = "1.0.77", optional = true }
|
||||||
|
serde_json = { version = "1.0.27", optional = true }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
grep-regex = { version = "0.1.3", path = "../grep-regex" }
|
||||||
21
grep-printer/LICENSE-MIT
Normal file
21
grep-printer/LICENSE-MIT
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Andrew Gallant
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
35
grep-printer/README.md
Normal file
35
grep-printer/README.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
grep-printer
|
||||||
|
------------
|
||||||
|
Print results from line oriented searching in a human readable, aggregate or
|
||||||
|
JSON Lines format.
|
||||||
|
|
||||||
|
[](https://travis-ci.org/BurntSushi/ripgrep)
|
||||||
|
[](https://ci.appveyor.com/project/BurntSushi/ripgrep)
|
||||||
|
[](https://crates.io/crates/grep-printer)
|
||||||
|
|
||||||
|
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
[https://docs.rs/grep-printer](https://docs.rs/grep-printer)
|
||||||
|
|
||||||
|
**NOTE:** You probably don't want to use this crate directly. Instead, you
|
||||||
|
should prefer the facade defined in the
|
||||||
|
[`grep`](https://docs.rs/grep)
|
||||||
|
crate.
|
||||||
|
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Add this to your `Cargo.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
grep-printer = "0.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
and this to your crate root:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
extern crate grep_printer;
|
||||||
|
```
|
||||||
24
grep-printer/UNLICENSE
Normal file
24
grep-printer/UNLICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
394
grep-printer/src/color.rs
Normal file
394
grep-printer/src/color.rs
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
use std::error;
|
||||||
|
use std::fmt;
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
use termcolor::{Color, ColorSpec, ParseColorError};
|
||||||
|
|
||||||
|
/// Returns a default set of color specifications.
|
||||||
|
///
|
||||||
|
/// This may change over time, but the color choices are meant to be fairly
|
||||||
|
/// conservative that work across terminal themes.
|
||||||
|
///
|
||||||
|
/// Additional color specifications can be added to the list returned. More
|
||||||
|
/// recently added specifications override previously added specifications.
|
||||||
|
pub fn default_color_specs() -> Vec<UserColorSpec> {
|
||||||
|
vec![
|
||||||
|
#[cfg(unix)]
|
||||||
|
"path:fg:magenta".parse().unwrap(),
|
||||||
|
#[cfg(windows)]
|
||||||
|
"path:fg:cyan".parse().unwrap(),
|
||||||
|
"line:fg:green".parse().unwrap(),
|
||||||
|
"match:fg:red".parse().unwrap(),
|
||||||
|
"match:style:bold".parse().unwrap(),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/// An error that can occur when parsing color specifications.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub enum ColorError {
|
||||||
|
/// This occurs when an unrecognized output type is used.
|
||||||
|
UnrecognizedOutType(String),
|
||||||
|
/// This occurs when an unrecognized spec type is used.
|
||||||
|
UnrecognizedSpecType(String),
|
||||||
|
/// This occurs when an unrecognized color name is used.
|
||||||
|
UnrecognizedColor(String, String),
|
||||||
|
/// This occurs when an unrecognized style attribute is used.
|
||||||
|
UnrecognizedStyle(String),
|
||||||
|
/// This occurs when the format of a color specification is invalid.
|
||||||
|
InvalidFormat(String),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl error::Error for ColorError {
|
||||||
|
fn description(&self) -> &str {
|
||||||
|
match *self {
|
||||||
|
ColorError::UnrecognizedOutType(_) => "unrecognized output type",
|
||||||
|
ColorError::UnrecognizedSpecType(_) => "unrecognized spec type",
|
||||||
|
ColorError::UnrecognizedColor(_, _) => "unrecognized color name",
|
||||||
|
ColorError::UnrecognizedStyle(_) => "unrecognized style attribute",
|
||||||
|
ColorError::InvalidFormat(_) => "invalid color spec",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ColorError {
|
||||||
|
fn from_parse_error(err: ParseColorError) -> ColorError {
|
||||||
|
ColorError::UnrecognizedColor(
|
||||||
|
err.invalid().to_string(),
|
||||||
|
err.to_string(),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for ColorError {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match *self {
|
||||||
|
ColorError::UnrecognizedOutType(ref name) => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"unrecognized output type '{}'. Choose from: \
|
||||||
|
path, line, column, match.",
|
||||||
|
name,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
ColorError::UnrecognizedSpecType(ref name) => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"unrecognized spec type '{}'. Choose from: \
|
||||||
|
fg, bg, style, none.",
|
||||||
|
name,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
ColorError::UnrecognizedColor(_, ref msg) => {
|
||||||
|
write!(f, "{}", msg)
|
||||||
|
}
|
||||||
|
ColorError::UnrecognizedStyle(ref name) => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"unrecognized style attribute '{}'. Choose from: \
|
||||||
|
nobold, bold, nointense, intense, nounderline, \
|
||||||
|
underline.",
|
||||||
|
name,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
ColorError::InvalidFormat(ref original) => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"invalid color spec format: '{}'. Valid format \
|
||||||
|
is '(path|line|column|match):(fg|bg|style):(value)'.",
|
||||||
|
original,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A merged set of color specifications.
|
||||||
|
///
|
||||||
|
/// This set of color specifications represents the various color types that
|
||||||
|
/// are supported by the printers in this crate. A set of color specifications
|
||||||
|
/// can be created from a sequence of
|
||||||
|
/// [`UserColorSpec`s](struct.UserColorSpec.html).
|
||||||
|
#[derive(Clone, Debug, Default, Eq, PartialEq)]
|
||||||
|
pub struct ColorSpecs {
|
||||||
|
path: ColorSpec,
|
||||||
|
line: ColorSpec,
|
||||||
|
column: ColorSpec,
|
||||||
|
matched: ColorSpec,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A single color specification provided by the user.
|
||||||
|
///
|
||||||
|
/// ## Format
|
||||||
|
///
|
||||||
|
/// The format of a `Spec` is a triple: `{type}:{attribute}:{value}`. Each
|
||||||
|
/// component is defined as follows:
|
||||||
|
///
|
||||||
|
/// * `{type}` can be one of `path`, `line`, `column` or `match`.
|
||||||
|
/// * `{attribute}` can be one of `fg`, `bg` or `style`. `{attribute}` may also
|
||||||
|
/// be the special value `none`, in which case, `{value}` can be omitted.
|
||||||
|
/// * `{value}` is either a color name (for `fg`/`bg`) or a style instruction.
|
||||||
|
///
|
||||||
|
/// `{type}` controls which part of the output should be styled.
|
||||||
|
///
|
||||||
|
/// When `{attribute}` is `none`, then this should cause any existing style
|
||||||
|
/// settings to be cleared for the specified `type`.
|
||||||
|
///
|
||||||
|
/// `{value}` should be a color when `{attribute}` is `fg` or `bg`, or it
|
||||||
|
/// should be a style instruction when `{attribute}` is `style`. When
|
||||||
|
/// `{attribute}` is `none`, `{value}` must be omitted.
|
||||||
|
///
|
||||||
|
/// Valid colors are `black`, `blue`, `green`, `red`, `cyan`, `magenta`,
|
||||||
|
/// `yellow`, `white`. Extended colors can also be specified, and are formatted
|
||||||
|
/// as `x` (for 256-bit colors) or `x,x,x` (for 24-bit true color), where
|
||||||
|
/// `x` is a number between 0 and 255 inclusive. `x` may be given as a normal
|
||||||
|
/// decimal number of a hexadecimal number, where the latter is prefixed by
|
||||||
|
/// `0x`.
|
||||||
|
///
|
||||||
|
/// Valid style instructions are `nobold`, `bold`, `intense`, `nointense`,
|
||||||
|
/// `underline`, `nounderline`.
|
||||||
|
///
|
||||||
|
/// ## Example
|
||||||
|
///
|
||||||
|
/// The standard way to build a `UserColorSpec` is to parse it from a string.
|
||||||
|
/// Once multiple `UserColorSpec`s have been constructed, they can be provided
|
||||||
|
/// to the standard printer where they will automatically be applied to the
|
||||||
|
/// output.
|
||||||
|
///
|
||||||
|
/// A `UserColorSpec` can also be converted to a `termcolor::ColorSpec`:
|
||||||
|
///
|
||||||
|
/// ```rust
|
||||||
|
/// extern crate grep_printer;
|
||||||
|
/// extern crate termcolor;
|
||||||
|
///
|
||||||
|
/// # fn main() {
|
||||||
|
/// use termcolor::{Color, ColorSpec};
|
||||||
|
/// use grep_printer::UserColorSpec;
|
||||||
|
///
|
||||||
|
/// let user_spec1: UserColorSpec = "path:fg:blue".parse().unwrap();
|
||||||
|
/// let user_spec2: UserColorSpec = "match:bg:0xff,0x7f,0x00".parse().unwrap();
|
||||||
|
///
|
||||||
|
/// let spec1 = user_spec1.to_color_spec();
|
||||||
|
/// let spec2 = user_spec2.to_color_spec();
|
||||||
|
///
|
||||||
|
/// assert_eq!(spec1.fg(), Some(&Color::Blue));
|
||||||
|
/// assert_eq!(spec2.bg(), Some(&Color::Rgb(0xFF, 0x7F, 0x00)));
|
||||||
|
/// # }
|
||||||
|
/// ```
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct UserColorSpec {
|
||||||
|
ty: OutType,
|
||||||
|
value: SpecValue,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl UserColorSpec {
|
||||||
|
/// Convert this user provided color specification to a specification that
|
||||||
|
/// can be used with `termcolor`. This drops the type of this specification
|
||||||
|
/// (where the type indicates where the color is applied in the standard
|
||||||
|
/// printer, e.g., to the file path or the line numbers, etc.).
|
||||||
|
pub fn to_color_spec(&self) -> ColorSpec {
|
||||||
|
let mut spec = ColorSpec::default();
|
||||||
|
self.value.merge_into(&mut spec);
|
||||||
|
spec
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The actual value given by the specification.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
enum SpecValue {
|
||||||
|
None,
|
||||||
|
Fg(Color),
|
||||||
|
Bg(Color),
|
||||||
|
Style(Style),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The set of configurable portions of ripgrep's output.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
enum OutType {
|
||||||
|
Path,
|
||||||
|
Line,
|
||||||
|
Column,
|
||||||
|
Match,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The specification type.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
enum SpecType {
|
||||||
|
Fg,
|
||||||
|
Bg,
|
||||||
|
Style,
|
||||||
|
None,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The set of available styles for use in the terminal.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
enum Style {
|
||||||
|
Bold,
|
||||||
|
NoBold,
|
||||||
|
Intense,
|
||||||
|
NoIntense,
|
||||||
|
Underline,
|
||||||
|
NoUnderline
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ColorSpecs {
|
||||||
|
/// Create color specifications from a list of user supplied
|
||||||
|
/// specifications.
|
||||||
|
pub fn new(specs: &[UserColorSpec]) -> ColorSpecs {
|
||||||
|
let mut merged = ColorSpecs::default();
|
||||||
|
for spec in specs {
|
||||||
|
match spec.ty {
|
||||||
|
OutType::Path => spec.merge_into(&mut merged.path),
|
||||||
|
OutType::Line => spec.merge_into(&mut merged.line),
|
||||||
|
OutType::Column => spec.merge_into(&mut merged.column),
|
||||||
|
OutType::Match => spec.merge_into(&mut merged.matched),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
merged
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a default set of specifications that have color.
|
||||||
|
///
|
||||||
|
/// This is distinct from `ColorSpecs`'s `Default` implementation in that
|
||||||
|
/// this provides a set of default color choices, where as the `Default`
|
||||||
|
/// implementation provides no color choices.
|
||||||
|
pub fn default_with_color() -> ColorSpecs {
|
||||||
|
ColorSpecs::new(&default_color_specs())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the color specification for coloring file paths.
|
||||||
|
pub fn path(&self) -> &ColorSpec {
|
||||||
|
&self.path
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the color specification for coloring line numbers.
|
||||||
|
pub fn line(&self) -> &ColorSpec {
|
||||||
|
&self.line
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the color specification for coloring column numbers.
|
||||||
|
pub fn column(&self) -> &ColorSpec {
|
||||||
|
&self.column
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the color specification for coloring matched text.
|
||||||
|
pub fn matched(&self) -> &ColorSpec {
|
||||||
|
&self.matched
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl UserColorSpec {
|
||||||
|
/// Merge this spec into the given color specification.
|
||||||
|
fn merge_into(&self, cspec: &mut ColorSpec) {
|
||||||
|
self.value.merge_into(cspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl SpecValue {
|
||||||
|
/// Merge this spec value into the given color specification.
|
||||||
|
fn merge_into(&self, cspec: &mut ColorSpec) {
|
||||||
|
match *self {
|
||||||
|
SpecValue::None => cspec.clear(),
|
||||||
|
SpecValue::Fg(ref color) => { cspec.set_fg(Some(color.clone())); }
|
||||||
|
SpecValue::Bg(ref color) => { cspec.set_bg(Some(color.clone())); }
|
||||||
|
SpecValue::Style(ref style) => {
|
||||||
|
match *style {
|
||||||
|
Style::Bold => { cspec.set_bold(true); }
|
||||||
|
Style::NoBold => { cspec.set_bold(false); }
|
||||||
|
Style::Intense => { cspec.set_intense(true); }
|
||||||
|
Style::NoIntense => { cspec.set_intense(false); }
|
||||||
|
Style::Underline => { cspec.set_underline(true); }
|
||||||
|
Style::NoUnderline => { cspec.set_underline(false); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for UserColorSpec {
|
||||||
|
type Err = ColorError;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<UserColorSpec, ColorError> {
|
||||||
|
let pieces: Vec<&str> = s.split(':').collect();
|
||||||
|
if pieces.len() <= 1 || pieces.len() > 3 {
|
||||||
|
return Err(ColorError::InvalidFormat(s.to_string()));
|
||||||
|
}
|
||||||
|
let otype: OutType = pieces[0].parse()?;
|
||||||
|
match pieces[1].parse()? {
|
||||||
|
SpecType::None => {
|
||||||
|
Ok(UserColorSpec {
|
||||||
|
ty: otype,
|
||||||
|
value: SpecValue::None,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
SpecType::Style => {
|
||||||
|
if pieces.len() < 3 {
|
||||||
|
return Err(ColorError::InvalidFormat(s.to_string()));
|
||||||
|
}
|
||||||
|
let style: Style = pieces[2].parse()?;
|
||||||
|
Ok(UserColorSpec { ty: otype, value: SpecValue::Style(style) })
|
||||||
|
}
|
||||||
|
SpecType::Fg => {
|
||||||
|
if pieces.len() < 3 {
|
||||||
|
return Err(ColorError::InvalidFormat(s.to_string()));
|
||||||
|
}
|
||||||
|
let color: Color = pieces[2]
|
||||||
|
.parse()
|
||||||
|
.map_err(ColorError::from_parse_error)?;
|
||||||
|
Ok(UserColorSpec { ty: otype, value: SpecValue::Fg(color) })
|
||||||
|
}
|
||||||
|
SpecType::Bg => {
|
||||||
|
if pieces.len() < 3 {
|
||||||
|
return Err(ColorError::InvalidFormat(s.to_string()));
|
||||||
|
}
|
||||||
|
let color: Color = pieces[2]
|
||||||
|
.parse()
|
||||||
|
.map_err(ColorError::from_parse_error)?;
|
||||||
|
Ok(UserColorSpec { ty: otype, value: SpecValue::Bg(color) })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for OutType {
|
||||||
|
type Err = ColorError;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<OutType, ColorError> {
|
||||||
|
match &*s.to_lowercase() {
|
||||||
|
"path" => Ok(OutType::Path),
|
||||||
|
"line" => Ok(OutType::Line),
|
||||||
|
"column" => Ok(OutType::Column),
|
||||||
|
"match" => Ok(OutType::Match),
|
||||||
|
_ => Err(ColorError::UnrecognizedOutType(s.to_string())),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for SpecType {
|
||||||
|
type Err = ColorError;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<SpecType, ColorError> {
|
||||||
|
match &*s.to_lowercase() {
|
||||||
|
"fg" => Ok(SpecType::Fg),
|
||||||
|
"bg" => Ok(SpecType::Bg),
|
||||||
|
"style" => Ok(SpecType::Style),
|
||||||
|
"none" => Ok(SpecType::None),
|
||||||
|
_ => Err(ColorError::UnrecognizedSpecType(s.to_string())),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for Style {
|
||||||
|
type Err = ColorError;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<Style, ColorError> {
|
||||||
|
match &*s.to_lowercase() {
|
||||||
|
"bold" => Ok(Style::Bold),
|
||||||
|
"nobold" => Ok(Style::NoBold),
|
||||||
|
"intense" => Ok(Style::Intense),
|
||||||
|
"nointense" => Ok(Style::NoIntense),
|
||||||
|
"underline" => Ok(Style::Underline),
|
||||||
|
"nounderline" => Ok(Style::NoUnderline),
|
||||||
|
_ => Err(ColorError::UnrecognizedStyle(s.to_string())),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
90
grep-printer/src/counter.rs
Normal file
90
grep-printer/src/counter.rs
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
use std::io::{self, Write};
|
||||||
|
|
||||||
|
use termcolor::{ColorSpec, WriteColor};
|
||||||
|
|
||||||
|
/// A writer that counts the number of bytes that have been successfully
|
||||||
|
/// written.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct CounterWriter<W> {
|
||||||
|
wtr: W,
|
||||||
|
count: u64,
|
||||||
|
total_count: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W: Write> CounterWriter<W> {
|
||||||
|
pub fn new(wtr: W) -> CounterWriter<W> {
|
||||||
|
CounterWriter { wtr: wtr, count: 0, total_count: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W> CounterWriter<W> {
|
||||||
|
/// Returns the total number of bytes written since construction or the
|
||||||
|
/// last time `reset` was called.
|
||||||
|
pub fn count(&self) -> u64 {
|
||||||
|
self.count
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the total number of bytes written since construction.
|
||||||
|
pub fn total_count(&self) -> u64 {
|
||||||
|
self.total_count + self.count
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Resets the number of bytes written to `0`.
|
||||||
|
pub fn reset_count(&mut self) {
|
||||||
|
self.total_count += self.count;
|
||||||
|
self.count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Clear resets all counting related state for this writer.
|
||||||
|
///
|
||||||
|
/// After this call, the total count of bytes written to the underlying
|
||||||
|
/// writer is erased and reset.
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub fn clear(&mut self) {
|
||||||
|
self.count = 0;
|
||||||
|
self.total_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub fn get_ref(&self) -> &W {
|
||||||
|
&self.wtr
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_mut(&mut self) -> &mut W {
|
||||||
|
&mut self.wtr
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn into_inner(self) -> W {
|
||||||
|
self.wtr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W: Write> Write for CounterWriter<W> {
|
||||||
|
fn write(&mut self, buf: &[u8]) -> Result<usize, io::Error> {
|
||||||
|
let n = self.wtr.write(buf)?;
|
||||||
|
self.count += n as u64;
|
||||||
|
Ok(n)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn flush(&mut self) -> Result<(), io::Error> {
|
||||||
|
self.wtr.flush()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W: WriteColor> WriteColor for CounterWriter<W> {
|
||||||
|
fn supports_color(&self) -> bool {
|
||||||
|
self.wtr.supports_color()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> {
|
||||||
|
self.wtr.set_color(spec)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reset(&mut self) -> io::Result<()> {
|
||||||
|
self.wtr.reset()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_synchronous(&self) -> bool {
|
||||||
|
self.wtr.is_synchronous()
|
||||||
|
}
|
||||||
|
}
|
||||||
963
grep-printer/src/json.rs
Normal file
963
grep-printer/src/json.rs
Normal file
@@ -0,0 +1,963 @@
|
|||||||
|
use std::io::{self, Write};
|
||||||
|
use std::path::Path;
|
||||||
|
use std::time::Instant;
|
||||||
|
|
||||||
|
use grep_matcher::{Match, Matcher};
|
||||||
|
use grep_searcher::{
|
||||||
|
Searcher,
|
||||||
|
Sink, SinkError, SinkContext, SinkContextKind, SinkFinish, SinkMatch,
|
||||||
|
};
|
||||||
|
use serde_json as json;
|
||||||
|
|
||||||
|
use counter::CounterWriter;
|
||||||
|
use jsont;
|
||||||
|
use stats::Stats;
|
||||||
|
|
||||||
|
/// The configuration for the JSON printer.
|
||||||
|
///
|
||||||
|
/// This is manipulated by the JSONBuilder and then referenced by the actual
|
||||||
|
/// implementation. Once a printer is build, the configuration is frozen and
|
||||||
|
/// cannot changed.
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
struct Config {
|
||||||
|
pretty: bool,
|
||||||
|
max_matches: Option<u64>,
|
||||||
|
always_begin_end: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Config {
|
||||||
|
fn default() -> Config {
|
||||||
|
Config {
|
||||||
|
pretty: false,
|
||||||
|
max_matches: None,
|
||||||
|
always_begin_end: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A builder for a JSON lines printer.
|
||||||
|
///
|
||||||
|
/// The builder permits configuring how the printer behaves. The JSON printer
|
||||||
|
/// has fewer configuration options than the standard printer because it is
|
||||||
|
/// a structured format, and the printer always attempts to find the most
|
||||||
|
/// information possible.
|
||||||
|
///
|
||||||
|
/// Some configuration options, such as whether line numbers are included or
|
||||||
|
/// whether contextual lines are shown, are drawn directly from the
|
||||||
|
/// `grep_searcher::Searcher`'s configuration.
|
||||||
|
///
|
||||||
|
/// Once a `JSON` printer is built, its configuration cannot be changed.
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct JSONBuilder {
|
||||||
|
config: Config,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl JSONBuilder {
|
||||||
|
/// Return a new builder for configuring the JSON printer.
|
||||||
|
pub fn new() -> JSONBuilder {
|
||||||
|
JSONBuilder { config: Config::default() }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a JSON printer that writes results to the given writer.
|
||||||
|
pub fn build<W: io::Write>(&self, wtr: W) -> JSON<W> {
|
||||||
|
JSON {
|
||||||
|
config: self.config.clone(),
|
||||||
|
wtr: CounterWriter::new(wtr),
|
||||||
|
matches: vec![],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Print JSON in a pretty printed format.
|
||||||
|
///
|
||||||
|
/// Enabling this will no longer produce a "JSON lines" format, in that
|
||||||
|
/// each JSON object printed may span multiple lines.
|
||||||
|
///
|
||||||
|
/// This is disabled by default.
|
||||||
|
pub fn pretty(&mut self, yes: bool) -> &mut JSONBuilder {
|
||||||
|
self.config.pretty = yes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Set the maximum amount of matches that are printed.
|
||||||
|
///
|
||||||
|
/// If multi line search is enabled and a match spans multiple lines, then
|
||||||
|
/// that match is counted exactly once for the purposes of enforcing this
|
||||||
|
/// limit, regardless of how many lines it spans.
|
||||||
|
pub fn max_matches(&mut self, limit: Option<u64>) -> &mut JSONBuilder {
|
||||||
|
self.config.max_matches = limit;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// When enabled, the `begin` and `end` messages are always emitted, even
|
||||||
|
/// when no match is found.
|
||||||
|
///
|
||||||
|
/// When disabled, the `begin` and `end` messages are only shown if there
|
||||||
|
/// is at least one `match` or `context` message.
|
||||||
|
///
|
||||||
|
/// This is disabled by default.
|
||||||
|
pub fn always_begin_end(&mut self, yes: bool) -> &mut JSONBuilder {
|
||||||
|
self.config.always_begin_end = yes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The JSON printer, which emits results in a JSON lines format.
|
||||||
|
///
|
||||||
|
/// This type is generic over `W`, which represents any implementation of
|
||||||
|
/// the standard library `io::Write` trait.
|
||||||
|
///
|
||||||
|
/// # Format
|
||||||
|
///
|
||||||
|
/// This section describes the JSON format used by this printer.
|
||||||
|
///
|
||||||
|
/// To skip the rigamarole, take a look at the
|
||||||
|
/// [example](#example)
|
||||||
|
/// at the end.
|
||||||
|
///
|
||||||
|
/// ## Overview
|
||||||
|
///
|
||||||
|
/// The format of this printer is the [JSON Lines](http://jsonlines.org/)
|
||||||
|
/// format. Specifically, this printer emits a sequence of messages, where
|
||||||
|
/// each message is encoded as a single JSON value on a single line. There are
|
||||||
|
/// four different types of messages (and this number may expand over time):
|
||||||
|
///
|
||||||
|
/// * **begin** - A message that indicates a file is being searched.
|
||||||
|
/// * **end** - A message the indicates a file is done being searched. This
|
||||||
|
/// message also include summary statistics about the search.
|
||||||
|
/// * **match** - A message that indicates a match was found. This includes
|
||||||
|
/// the text and offsets of the match.
|
||||||
|
/// * **context** - A message that indicates a contextual line was found.
|
||||||
|
/// This includes the text of the line, along with any match information if
|
||||||
|
/// the search was inverted.
|
||||||
|
///
|
||||||
|
/// Every message is encoded in the same envelope format, which includes a tag
|
||||||
|
/// indicating the message type along with an object for the payload:
|
||||||
|
///
|
||||||
|
/// ```json
|
||||||
|
/// {
|
||||||
|
/// "type": "{begin|end|match|context}",
|
||||||
|
/// "data": { ... }
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// The message itself is encoded in the envelope's `data` key.
|
||||||
|
///
|
||||||
|
/// ## Text encoding
|
||||||
|
///
|
||||||
|
/// Before describing each message format, we first must briefly discuss text
|
||||||
|
/// encoding, since it factors into every type of message. In particular, JSON
|
||||||
|
/// may only be encoded in UTF-8, UTF-16 or UTF-32. For the purposes of this
|
||||||
|
/// printer, we need only worry about UTF-8. The problem here is that searching
|
||||||
|
/// is not limited to UTF-8 exclusively, which in turn implies that matches
|
||||||
|
/// may be reported that contain invalid UTF-8. Moreover, this printer may
|
||||||
|
/// also print file paths, and the encoding of file paths is itself not
|
||||||
|
/// guarnateed to be valid UTF-8. Therefore, this printer must deal with the
|
||||||
|
/// presence of invalid UTF-8 somehow. The printer could silently ignore such
|
||||||
|
/// things completely, or even lossily transcode invalid UTF-8 to valid UTF-8
|
||||||
|
/// by replacing all invalid sequences with the Unicode replacement character.
|
||||||
|
/// However, this would prevent consumers of this format from accessing the
|
||||||
|
/// original data in a non-lossy way.
|
||||||
|
///
|
||||||
|
/// Therefore, this printer will emit valid UTF-8 encoded bytes as normal
|
||||||
|
/// JSON strings and otherwise base64 encode data that isn't valid UTF-8. To
|
||||||
|
/// communicate whether this process occurs or not, strings are keyed by the
|
||||||
|
/// name `text` where as arbitrary bytes are keyed by `bytes`.
|
||||||
|
///
|
||||||
|
/// For example, when a path is included in a message, it is formatted like so,
|
||||||
|
/// if and only if the path is valid UTF-8:
|
||||||
|
///
|
||||||
|
/// ```json
|
||||||
|
/// {
|
||||||
|
/// "path": {
|
||||||
|
/// "text": "/home/ubuntu/lib.rs"
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// If instead our path was `/home/ubuntu/lib\xFF.rs`, where the `\xFF` byte
|
||||||
|
/// makes it invalid UTF-8, the path would instead be encoded like so:
|
||||||
|
///
|
||||||
|
/// ```json
|
||||||
|
/// {
|
||||||
|
/// "path": {
|
||||||
|
/// "bytes": "L2hvbWUvdWJ1bnR1L2xpYv8ucnM="
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// This same representation is used for reporting matches as well.
|
||||||
|
///
|
||||||
|
/// The printer guarantees that the `text` field is used whenever the
|
||||||
|
/// underlying bytes are valid UTF-8.
|
||||||
|
///
|
||||||
|
/// ## Wire format
|
||||||
|
///
|
||||||
|
/// This section documents the wire format emitted by this printer, starting
|
||||||
|
/// with the four types of messages.
|
||||||
|
///
|
||||||
|
/// Each message has its own format, and is contained inside an envelope that
|
||||||
|
/// indicates the type of message. The envelope has these fields:
|
||||||
|
///
|
||||||
|
/// * **type** - A string indicating the type of this message. It may be one
|
||||||
|
/// of four possible strings: `begin`, `end`, `match` or `context`. This
|
||||||
|
/// list may expand over time.
|
||||||
|
/// * **data** - The actual message data. The format of this field depends on
|
||||||
|
/// the value of `type`. The possible message formats are
|
||||||
|
/// [`begin`](#message-begin),
|
||||||
|
/// [`end`](#message-end),
|
||||||
|
/// [`match`](#message-match),
|
||||||
|
/// [`context`](#message-context).
|
||||||
|
///
|
||||||
|
/// #### Message: **begin**
|
||||||
|
///
|
||||||
|
/// This message indicates that a search has begun. It has these fields:
|
||||||
|
///
|
||||||
|
/// * **path** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// representing the file path corresponding to the search, if one is
|
||||||
|
/// present. If no file path is available, then this field is `null`.
|
||||||
|
///
|
||||||
|
/// #### Message: **end**
|
||||||
|
///
|
||||||
|
/// This message indicates that a search has finished. It has these fields:
|
||||||
|
///
|
||||||
|
/// * **path** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// representing the file path corresponding to the search, if one is
|
||||||
|
/// present. If no file path is available, then this field is `null`.
|
||||||
|
/// * **binary_offset** - The absolute offset in the data searched
|
||||||
|
/// corresponding to the place at which binary data was detected. If no
|
||||||
|
/// binary data was detected (or if binary detection was disabled), then this
|
||||||
|
/// field is `null`.
|
||||||
|
/// * **stats** - A [`stats` object](#object-stats) that contains summary
|
||||||
|
/// statistics for the previous search.
|
||||||
|
///
|
||||||
|
/// #### Message: **match**
|
||||||
|
///
|
||||||
|
/// This message indicates that a match has been found. A match generally
|
||||||
|
/// corresponds to a single line of text, although it may correspond to
|
||||||
|
/// multiple lines if the search can emit matches over multiple lines. It
|
||||||
|
/// has these fields:
|
||||||
|
///
|
||||||
|
/// * **path** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// representing the file path corresponding to the search, if one is
|
||||||
|
/// present. If no file path is available, then this field is `null`.
|
||||||
|
/// * **lines** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// representing one or more lines contained in this match.
|
||||||
|
/// * **line_number** - If the searcher has been configured to report line
|
||||||
|
/// numbers, then this corresponds to the line number of the first line
|
||||||
|
/// in `lines`. If no line numbers are available, then this is `null`.
|
||||||
|
/// * **absolute_offset** - The absolute byte offset corresponding to the start
|
||||||
|
/// of `lines` in the data being searched.
|
||||||
|
/// * **submatches** - An array of [`submatch` objects](#object-submatch)
|
||||||
|
/// corresponding to matches in `lines`. The offsets included in each
|
||||||
|
/// `submatch` correspond to byte offsets into `lines`. (If `lines` is base64
|
||||||
|
/// encoded, then the byte offsets correspond to the data after base64
|
||||||
|
/// decoding.) The `submatch` objects are guaranteed to be sorted by their
|
||||||
|
/// starting offsets. Note that it is possible for this array to be empty,
|
||||||
|
/// for example, when searching reports inverted matches.
|
||||||
|
///
|
||||||
|
/// #### Message: **context**
|
||||||
|
///
|
||||||
|
/// This message indicates that a contextual line has been found. A contextual
|
||||||
|
/// line is a line that doesn't contain a match, but is generally adjacent to
|
||||||
|
/// a line that does contain a match. The precise way in which contextual lines
|
||||||
|
/// are reported is determined by the searcher. It has these fields, which are
|
||||||
|
/// exactly the same fields found in a [`match`](#message-match):
|
||||||
|
///
|
||||||
|
/// * **path** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// representing the file path corresponding to the search, if one is
|
||||||
|
/// present. If no file path is available, then this field is `null`.
|
||||||
|
/// * **lines** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// representing one or more lines contained in this context. This includes
|
||||||
|
/// line terminators, if they're present.
|
||||||
|
/// * **line_number** - If the searcher has been configured to report line
|
||||||
|
/// numbers, then this corresponds to the line number of the first line
|
||||||
|
/// in `lines`. If no line numbers are available, then this is `null`.
|
||||||
|
/// * **absolute_offset** - The absolute byte offset corresponding to the start
|
||||||
|
/// of `lines` in the data being searched.
|
||||||
|
/// * **submatches** - An array of [`submatch` objects](#object-submatch)
|
||||||
|
/// corresponding to matches in `lines`. The offsets included in each
|
||||||
|
/// `submatch` correspond to byte offsets into `lines`. (If `lines` is base64
|
||||||
|
/// encoded, then the byte offsets correspond to the data after base64
|
||||||
|
/// decoding.) The `submatch` objects are guaranteed to be sorted by
|
||||||
|
/// their starting offsets. Note that it is possible for this array to be
|
||||||
|
/// non-empty, for example, when searching reports inverted matches such that
|
||||||
|
/// the original matcher could match things in the contextual lines.
|
||||||
|
///
|
||||||
|
/// #### Object: **submatch**
|
||||||
|
///
|
||||||
|
/// This object describes submatches found within `match` or `context`
|
||||||
|
/// messages. The `start` and `end` fields indicate the half-open interval on
|
||||||
|
/// which the match occurs (`start` is included, but `end` is not). It is
|
||||||
|
/// guaranteed that `start <= end`. It has these fields:
|
||||||
|
///
|
||||||
|
/// * **match** - An
|
||||||
|
/// [arbitrary data object](#object-arbitrary-data)
|
||||||
|
/// corresponding to the text in this submatch.
|
||||||
|
/// * **start** - A byte offset indicating the start of this match. This offset
|
||||||
|
/// is generally reported in terms of the parent object's data. For example,
|
||||||
|
/// the `lines` field in the
|
||||||
|
/// [`match`](#message-match) or [`context`](#message-context)
|
||||||
|
/// messages.
|
||||||
|
/// * **end** - A byte offset indicating the end of this match. This offset
|
||||||
|
/// is generally reported in terms of the parent object's data. For example,
|
||||||
|
/// the `lines` field in the
|
||||||
|
/// [`match`](#message-match) or [`context`](#message-context)
|
||||||
|
/// messages.
|
||||||
|
///
|
||||||
|
/// #### Object: **stats**
|
||||||
|
///
|
||||||
|
/// This object is included in messages and contains summary statistics about
|
||||||
|
/// a search. It has these fields:
|
||||||
|
///
|
||||||
|
/// * **elapsed** - A [`duration` object](#object-duration) describing the
|
||||||
|
/// length of time that elapsed while performing the search.
|
||||||
|
/// * **searches** - The number of searches that have run. For this printer,
|
||||||
|
/// this value is always `1`. (Implementations may emit additional message
|
||||||
|
/// types that use this same `stats` object that represents summary
|
||||||
|
/// statistics over multiple searches.)
|
||||||
|
/// * **searches_with_match** - The number of searches that have run that have
|
||||||
|
/// found at least one match. This is never more than `searches`.
|
||||||
|
/// * **bytes_searched** - The total number of bytes that have been searched.
|
||||||
|
/// * **bytes_printed** - The total number of bytes that have been printed.
|
||||||
|
/// This includes everything emitted by this printer.
|
||||||
|
/// * **matched_lines** - The total number of lines that participated in a
|
||||||
|
/// match. When matches may contain multiple lines, then this includes every
|
||||||
|
/// line that is part of every match.
|
||||||
|
/// * **matches** - The total number of matches. There may be multiple matches
|
||||||
|
/// per line. When matches may contain multiple lines, each match is counted
|
||||||
|
/// only once, regardless of how many lines it spans.
|
||||||
|
///
|
||||||
|
/// #### Object: **duration**
|
||||||
|
///
|
||||||
|
/// This object includes a few fields for describing a duration. Two of its
|
||||||
|
/// fields, `secs` and `nanos`, can be combined to give nanosecond precision
|
||||||
|
/// on systems that support it. It has these fields:
|
||||||
|
///
|
||||||
|
/// * **secs** - A whole number of seconds indicating the length of this
|
||||||
|
/// duration.
|
||||||
|
/// * **nanos** - A fractional part of this duration represent by nanoseconds.
|
||||||
|
/// If nanosecond precision isn't supported, then this is typically rounded
|
||||||
|
/// up to the nearest number of nanoseconds.
|
||||||
|
/// * **human** - A human readable string describing the length of the
|
||||||
|
/// duration. The format of the string is itself unspecified.
|
||||||
|
///
|
||||||
|
/// #### Object: **arbitrary data**
|
||||||
|
///
|
||||||
|
/// This object is used whenever arbitrary data needs to be represented as a
|
||||||
|
/// JSON value. This object contains two fields, where generally only one of
|
||||||
|
/// the fields is present:
|
||||||
|
///
|
||||||
|
/// * **text** - A normal JSON string that is UTF-8 encoded. This field is
|
||||||
|
/// populated if and only if the underlying data is valid UTF-8.
|
||||||
|
/// * **bytes** - A normal JSON string that is a base64 encoding of the
|
||||||
|
/// underlying bytes.
|
||||||
|
///
|
||||||
|
/// More information on the motivation for this representation can be seen in
|
||||||
|
/// the section [text encoding](#text-encoding) above.
|
||||||
|
///
|
||||||
|
/// ## Example
|
||||||
|
///
|
||||||
|
/// This section shows a small example that includes all message types.
|
||||||
|
///
|
||||||
|
/// Here's the file we want to search, located at `/home/andrew/sherlock`:
|
||||||
|
///
|
||||||
|
/// ```text
|
||||||
|
/// For the Doctor Watsons of this world, as opposed to the Sherlock
|
||||||
|
/// Holmeses, success in the province of detective work must always
|
||||||
|
/// be, to a very large extent, the result of luck. Sherlock Holmes
|
||||||
|
/// can extract a clew from a wisp of straw or a flake of cigar ash;
|
||||||
|
/// but Doctor Watson has to have it taken out for him and dusted,
|
||||||
|
/// and exhibited clearly, with a label attached.
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// Searching for `Watson` with a `before_context` of `1` with line numbers
|
||||||
|
/// enabled shows something like this using the standard printer:
|
||||||
|
///
|
||||||
|
/// ```text
|
||||||
|
/// sherlock:1:For the Doctor Watsons of this world, as opposed to the Sherlock
|
||||||
|
/// --
|
||||||
|
/// sherlock-4-can extract a clew from a wisp of straw or a flake of cigar ash;
|
||||||
|
/// sherlock:5:but Doctor Watson has to have it taken out for him and dusted,
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// Here's what the same search looks like using the JSON wire format described
|
||||||
|
/// above, where in we show semi-prettified JSON (instead of a strict JSON
|
||||||
|
/// Lines format), for illustrative purposes:
|
||||||
|
///
|
||||||
|
/// ```json
|
||||||
|
/// {
|
||||||
|
/// "type": "begin",
|
||||||
|
/// "data": {
|
||||||
|
/// "path": {"text": "/home/andrew/sherlock"}}
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// {
|
||||||
|
/// "type": "match",
|
||||||
|
/// "data": {
|
||||||
|
/// "path": {"text": "/home/andrew/sherlock"},
|
||||||
|
/// "lines": {"text": "For the Doctor Watsons of this world, as opposed to the Sherlock\n"},
|
||||||
|
/// "line_number": 1,
|
||||||
|
/// "absolute_offset": 0,
|
||||||
|
/// "submatches": [
|
||||||
|
/// {"match": {"text": "Watson"}, "start": 15, "end": 21}
|
||||||
|
/// ]
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// {
|
||||||
|
/// "type": "context",
|
||||||
|
/// "data": {
|
||||||
|
/// "path": {"text": "/home/andrew/sherlock"},
|
||||||
|
/// "lines": {"text": "can extract a clew from a wisp of straw or a flake of cigar ash;\n"},
|
||||||
|
/// "line_number": 4,
|
||||||
|
/// "absolute_offset": 193,
|
||||||
|
/// "submatches": []
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// {
|
||||||
|
/// "type": "match",
|
||||||
|
/// "data": {
|
||||||
|
/// "path": {"text": "/home/andrew/sherlock"},
|
||||||
|
/// "lines": {"text": "but Doctor Watson has to have it taken out for him and dusted,\n"},
|
||||||
|
/// "line_number": 5,
|
||||||
|
/// "absolute_offset": 258,
|
||||||
|
/// "submatches": [
|
||||||
|
/// {"match": {"text": "Watson"}, "start": 11, "end": 17}
|
||||||
|
/// ]
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// {
|
||||||
|
/// "type": "end",
|
||||||
|
/// "data": {
|
||||||
|
/// "path": {"text": "/home/andrew/sherlock"},
|
||||||
|
/// "binary_offset": null,
|
||||||
|
/// "stats": {
|
||||||
|
/// "elapsed": {"secs": 0, "nanos": 36296, "human": "0.0000s"},
|
||||||
|
/// "searches": 1,
|
||||||
|
/// "searches_with_match": 1,
|
||||||
|
/// "bytes_searched": 367,
|
||||||
|
/// "bytes_printed": 1151,
|
||||||
|
/// "matched_lines": 2,
|
||||||
|
/// "matches": 2
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct JSON<W> {
|
||||||
|
config: Config,
|
||||||
|
wtr: CounterWriter<W>,
|
||||||
|
matches: Vec<Match>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W: io::Write> JSON<W> {
|
||||||
|
/// Return a JSON lines printer with a default configuration that writes
|
||||||
|
/// matches to the given writer.
|
||||||
|
pub fn new(wtr: W) -> JSON<W> {
|
||||||
|
JSONBuilder::new().build(wtr)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return an implementation of `Sink` for the JSON printer.
|
||||||
|
///
|
||||||
|
/// This does not associate the printer with a file path, which means this
|
||||||
|
/// implementation will never print a file path along with the matches.
|
||||||
|
pub fn sink<'s, M: Matcher>(
|
||||||
|
&'s mut self,
|
||||||
|
matcher: M,
|
||||||
|
) -> JSONSink<'static, 's, M, W> {
|
||||||
|
JSONSink {
|
||||||
|
matcher: matcher,
|
||||||
|
json: self,
|
||||||
|
path: None,
|
||||||
|
start_time: Instant::now(),
|
||||||
|
match_count: 0,
|
||||||
|
after_context_remaining: 0,
|
||||||
|
binary_byte_offset: None,
|
||||||
|
begin_printed: false,
|
||||||
|
stats: Stats::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return an implementation of `Sink` associated with a file path.
|
||||||
|
///
|
||||||
|
/// When the printer is associated with a path, then it may, depending on
|
||||||
|
/// its configuration, print the path along with the matches found.
|
||||||
|
pub fn sink_with_path<'p, 's, M, P>(
|
||||||
|
&'s mut self,
|
||||||
|
matcher: M,
|
||||||
|
path: &'p P,
|
||||||
|
) -> JSONSink<'p, 's, M, W>
|
||||||
|
where M: Matcher,
|
||||||
|
P: ?Sized + AsRef<Path>,
|
||||||
|
{
|
||||||
|
JSONSink {
|
||||||
|
matcher: matcher,
|
||||||
|
json: self,
|
||||||
|
path: Some(path.as_ref()),
|
||||||
|
start_time: Instant::now(),
|
||||||
|
match_count: 0,
|
||||||
|
after_context_remaining: 0,
|
||||||
|
binary_byte_offset: None,
|
||||||
|
begin_printed: false,
|
||||||
|
stats: Stats::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Write the given message followed by a new line. The new line is
|
||||||
|
/// determined from the configuration of the given searcher.
|
||||||
|
fn write_message(&mut self, message: &jsont::Message) -> io::Result<()> {
|
||||||
|
if self.config.pretty {
|
||||||
|
json::to_writer_pretty(&mut self.wtr, message)?;
|
||||||
|
} else {
|
||||||
|
json::to_writer(&mut self.wtr, message)?;
|
||||||
|
}
|
||||||
|
self.wtr.write(&[b'\n'])?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W> JSON<W> {
|
||||||
|
/// Returns true if and only if this printer has written at least one byte
|
||||||
|
/// to the underlying writer during any of the previous searches.
|
||||||
|
pub fn has_written(&self) -> bool {
|
||||||
|
self.wtr.total_count() > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return a mutable reference to the underlying writer.
|
||||||
|
pub fn get_mut(&mut self) -> &mut W {
|
||||||
|
self.wtr.get_mut()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consume this printer and return back ownership of the underlying
|
||||||
|
/// writer.
|
||||||
|
pub fn into_inner(self) -> W {
|
||||||
|
self.wtr.into_inner()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// An implementation of `Sink` associated with a matcher and an optional file
|
||||||
|
/// path for the JSON printer.
|
||||||
|
///
|
||||||
|
/// This type is generic over a few type parameters:
|
||||||
|
///
|
||||||
|
/// * `'p` refers to the lifetime of the file path, if one is provided. When
|
||||||
|
/// no file path is given, then this is `'static`.
|
||||||
|
/// * `'s` refers to the lifetime of the
|
||||||
|
/// [`JSON`](struct.JSON.html)
|
||||||
|
/// printer that this type borrows.
|
||||||
|
/// * `M` refers to the type of matcher used by
|
||||||
|
/// `grep_searcher::Searcher` that is reporting results to this sink.
|
||||||
|
/// * `W` refers to the underlying writer that this printer is writing its
|
||||||
|
/// output to.
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct JSONSink<'p, 's, M: Matcher, W: 's> {
|
||||||
|
matcher: M,
|
||||||
|
json: &'s mut JSON<W>,
|
||||||
|
path: Option<&'p Path>,
|
||||||
|
start_time: Instant,
|
||||||
|
match_count: u64,
|
||||||
|
after_context_remaining: u64,
|
||||||
|
binary_byte_offset: Option<u64>,
|
||||||
|
begin_printed: bool,
|
||||||
|
stats: Stats,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'p, 's, M: Matcher, W: io::Write> JSONSink<'p, 's, M, W> {
|
||||||
|
/// Returns true if and only if this printer received a match in the
|
||||||
|
/// previous search.
|
||||||
|
///
|
||||||
|
/// This is unaffected by the result of searches before the previous
|
||||||
|
/// search.
|
||||||
|
pub fn has_match(&self) -> bool {
|
||||||
|
self.match_count > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of matches reported to this sink.
|
||||||
|
///
|
||||||
|
/// This corresponds to the number of times `Sink::matched` is called.
|
||||||
|
pub fn match_count(&self) -> u64 {
|
||||||
|
self.match_count
|
||||||
|
}
|
||||||
|
|
||||||
|
/// If binary data was found in the previous search, this returns the
|
||||||
|
/// offset at which the binary data was first detected.
|
||||||
|
///
|
||||||
|
/// The offset returned is an absolute offset relative to the entire
|
||||||
|
/// set of bytes searched.
|
||||||
|
///
|
||||||
|
/// This is unaffected by the result of searches before the previous
|
||||||
|
/// search. e.g., If the search prior to the previous search found binary
|
||||||
|
/// data but the previous search found no binary data, then this will
|
||||||
|
/// return `None`.
|
||||||
|
pub fn binary_byte_offset(&self) -> Option<u64> {
|
||||||
|
self.binary_byte_offset
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return a reference to the stats produced by the printer for all
|
||||||
|
/// searches executed on this sink.
|
||||||
|
pub fn stats(&self) -> &Stats {
|
||||||
|
&self.stats
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Execute the matcher over the given bytes and record the match
|
||||||
|
/// locations if the current configuration demands match granularity.
|
||||||
|
fn record_matches(&mut self, bytes: &[u8]) -> io::Result<()> {
|
||||||
|
self.json.matches.clear();
|
||||||
|
// If printing requires knowing the location of each individual match,
|
||||||
|
// then compute and stored those right now for use later. While this
|
||||||
|
// adds an extra copy for storing the matches, we do amortize the
|
||||||
|
// allocation for it and this greatly simplifies the printing logic to
|
||||||
|
// the extent that it's easy to ensure that we never do more than
|
||||||
|
// one search to find the matches.
|
||||||
|
let matches = &mut self.json.matches;
|
||||||
|
self.matcher.find_iter(bytes, |m| {
|
||||||
|
matches.push(m);
|
||||||
|
true
|
||||||
|
}).map_err(io::Error::error_message)?;
|
||||||
|
// Don't report empty matches appearing at the end of the bytes.
|
||||||
|
if !matches.is_empty()
|
||||||
|
&& matches.last().unwrap().is_empty()
|
||||||
|
&& matches.last().unwrap().start() >= bytes.len()
|
||||||
|
{
|
||||||
|
matches.pop().unwrap();
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns true if this printer should quit.
|
||||||
|
///
|
||||||
|
/// This implements the logic for handling quitting after seeing a certain
|
||||||
|
/// amount of matches. In most cases, the logic is simple, but we must
|
||||||
|
/// permit all "after" contextual lines to print after reaching the limit.
|
||||||
|
fn should_quit(&self) -> bool {
|
||||||
|
let limit = match self.json.config.max_matches {
|
||||||
|
None => return false,
|
||||||
|
Some(limit) => limit,
|
||||||
|
};
|
||||||
|
if self.match_count < limit {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.after_context_remaining == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Write the "begin" message.
|
||||||
|
fn write_begin_message(&mut self) -> io::Result<()> {
|
||||||
|
if self.begin_printed {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
let msg = jsont::Message::Begin(jsont::Begin {
|
||||||
|
path: self.path,
|
||||||
|
});
|
||||||
|
self.json.write_message(&msg)?;
|
||||||
|
self.begin_printed = true;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'p, 's, M: Matcher, W: io::Write> Sink for JSONSink<'p, 's, M, W> {
|
||||||
|
type Error = io::Error;
|
||||||
|
|
||||||
|
fn matched(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
mat: &SinkMatch,
|
||||||
|
) -> Result<bool, io::Error> {
|
||||||
|
self.write_begin_message()?;
|
||||||
|
|
||||||
|
self.match_count += 1;
|
||||||
|
self.after_context_remaining = searcher.after_context() as u64;
|
||||||
|
self.record_matches(mat.bytes())?;
|
||||||
|
self.stats.add_matches(self.json.matches.len() as u64);
|
||||||
|
self.stats.add_matched_lines(mat.lines().count() as u64);
|
||||||
|
|
||||||
|
let submatches = SubMatches::new(mat.bytes(), &self.json.matches);
|
||||||
|
let msg = jsont::Message::Match(jsont::Match {
|
||||||
|
path: self.path,
|
||||||
|
lines: mat.bytes(),
|
||||||
|
line_number: mat.line_number(),
|
||||||
|
absolute_offset: mat.absolute_byte_offset(),
|
||||||
|
submatches: submatches.as_slice(),
|
||||||
|
});
|
||||||
|
self.json.write_message(&msg)?;
|
||||||
|
Ok(!self.should_quit())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn context(
|
||||||
|
&mut self,
|
||||||
|
searcher: &Searcher,
|
||||||
|
ctx: &SinkContext,
|
||||||
|
) -> Result<bool, io::Error> {
|
||||||
|
self.write_begin_message()?;
|
||||||
|
self.json.matches.clear();
|
||||||
|
|
||||||
|
if ctx.kind() == &SinkContextKind::After {
|
||||||
|
self.after_context_remaining =
|
||||||
|
self.after_context_remaining.saturating_sub(1);
|
||||||
|
}
|
||||||
|
let submatches =
|
||||||
|
if searcher.invert_match() {
|
||||||
|
self.record_matches(ctx.bytes())?;
|
||||||
|
SubMatches::new(ctx.bytes(), &self.json.matches)
|
||||||
|
} else {
|
||||||
|
SubMatches::empty()
|
||||||
|
};
|
||||||
|
let msg = jsont::Message::Context(jsont::Context {
|
||||||
|
path: self.path,
|
||||||
|
lines: ctx.bytes(),
|
||||||
|
line_number: ctx.line_number(),
|
||||||
|
absolute_offset: ctx.absolute_byte_offset(),
|
||||||
|
submatches: submatches.as_slice(),
|
||||||
|
});
|
||||||
|
self.json.write_message(&msg)?;
|
||||||
|
Ok(!self.should_quit())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn begin(
|
||||||
|
&mut self,
|
||||||
|
_searcher: &Searcher,
|
||||||
|
) -> Result<bool, io::Error> {
|
||||||
|
self.json.wtr.reset_count();
|
||||||
|
self.start_time = Instant::now();
|
||||||
|
self.match_count = 0;
|
||||||
|
self.after_context_remaining = 0;
|
||||||
|
self.binary_byte_offset = None;
|
||||||
|
if self.json.config.max_matches == Some(0) {
|
||||||
|
return Ok(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if !self.json.config.always_begin_end {
|
||||||
|
return Ok(true);
|
||||||
|
}
|
||||||
|
self.write_begin_message()?;
|
||||||
|
Ok(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn finish(
|
||||||
|
&mut self,
|
||||||
|
_searcher: &Searcher,
|
||||||
|
finish: &SinkFinish,
|
||||||
|
) -> Result<(), io::Error> {
|
||||||
|
if !self.begin_printed {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
|
self.binary_byte_offset = finish.binary_byte_offset();
|
||||||
|
self.stats.add_elapsed(self.start_time.elapsed());
|
||||||
|
self.stats.add_searches(1);
|
||||||
|
if self.match_count > 0 {
|
||||||
|
self.stats.add_searches_with_match(1);
|
||||||
|
}
|
||||||
|
self.stats.add_bytes_searched(finish.byte_count());
|
||||||
|
self.stats.add_bytes_printed(self.json.wtr.count());
|
||||||
|
|
||||||
|
let msg = jsont::Message::End(jsont::End {
|
||||||
|
path: self.path,
|
||||||
|
binary_offset: finish.binary_byte_offset(),
|
||||||
|
stats: self.stats.clone(),
|
||||||
|
});
|
||||||
|
self.json.write_message(&msg)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// SubMatches represents a set of matches in a contiguous range of bytes.
|
||||||
|
///
|
||||||
|
/// A simpler representation for this would just simply be `Vec<SubMatch>`,
|
||||||
|
/// but the common case is exactly one match per range of bytes, which we
|
||||||
|
/// specialize here using a fixed size array without any allocation.
|
||||||
|
enum SubMatches<'a> {
|
||||||
|
Empty,
|
||||||
|
Small([jsont::SubMatch<'a>; 1]),
|
||||||
|
Big(Vec<jsont::SubMatch<'a>>),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> SubMatches<'a> {
|
||||||
|
/// Create a new set of match ranges from a set of matches and the
|
||||||
|
/// corresponding bytes that those matches apply to.
|
||||||
|
fn new(bytes: &'a[u8], matches: &[Match]) -> SubMatches<'a> {
|
||||||
|
if matches.len() == 1 {
|
||||||
|
let mat = matches[0];
|
||||||
|
SubMatches::Small([jsont::SubMatch {
|
||||||
|
m: &bytes[mat],
|
||||||
|
start: mat.start(),
|
||||||
|
end: mat.end(),
|
||||||
|
}])
|
||||||
|
} else {
|
||||||
|
let mut match_ranges = vec![];
|
||||||
|
for &mat in matches {
|
||||||
|
match_ranges.push(jsont::SubMatch {
|
||||||
|
m: &bytes[mat],
|
||||||
|
start: mat.start(),
|
||||||
|
end: mat.end(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
SubMatches::Big(match_ranges)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create an empty set of match ranges.
|
||||||
|
fn empty() -> SubMatches<'static> {
|
||||||
|
SubMatches::Empty
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return this set of match ranges as a slice.
|
||||||
|
fn as_slice(&self) -> &[jsont::SubMatch] {
|
||||||
|
match *self {
|
||||||
|
SubMatches::Empty => &[],
|
||||||
|
SubMatches::Small(ref x) => x,
|
||||||
|
SubMatches::Big(ref x) => x,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use grep_regex::{RegexMatcher, RegexMatcherBuilder};
|
||||||
|
use grep_matcher::LineTerminator;
|
||||||
|
use grep_searcher::SearcherBuilder;
|
||||||
|
|
||||||
|
use super::{JSON, JSONBuilder};
|
||||||
|
|
||||||
|
const SHERLOCK: &'static [u8] = b"\
|
||||||
|
For the Doctor Watsons of this world, as opposed to the Sherlock
|
||||||
|
Holmeses, success in the province of detective work must always
|
||||||
|
be, to a very large extent, the result of luck. Sherlock Holmes
|
||||||
|
can extract a clew from a wisp of straw or a flake of cigar ash;
|
||||||
|
but Doctor Watson has to have it taken out for him and dusted,
|
||||||
|
and exhibited clearly, with a label attached.
|
||||||
|
";
|
||||||
|
|
||||||
|
fn printer_contents(
|
||||||
|
printer: &mut JSON<Vec<u8>>,
|
||||||
|
) -> String {
|
||||||
|
String::from_utf8(printer.get_mut().to_owned()).unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn binary_detection() {
|
||||||
|
use grep_searcher::BinaryDetection;
|
||||||
|
|
||||||
|
const BINARY: &'static [u8] = b"\
|
||||||
|
For the Doctor Watsons of this world, as opposed to the Sherlock
|
||||||
|
Holmeses, success in the province of detective work must always
|
||||||
|
be, to a very large extent, the result of luck. Sherlock Holmes
|
||||||
|
can extract a clew \x00 from a wisp of straw or a flake of cigar ash;
|
||||||
|
but Doctor Watson has to have it taken out for him and dusted,
|
||||||
|
and exhibited clearly, with a label attached.\
|
||||||
|
";
|
||||||
|
|
||||||
|
let matcher = RegexMatcher::new(
|
||||||
|
r"Watson"
|
||||||
|
).unwrap();
|
||||||
|
let mut printer = JSONBuilder::new()
|
||||||
|
.build(vec![]);
|
||||||
|
SearcherBuilder::new()
|
||||||
|
.binary_detection(BinaryDetection::quit(b'\x00'))
|
||||||
|
.heap_limit(Some(80))
|
||||||
|
.build()
|
||||||
|
.search_reader(&matcher, BINARY, printer.sink(&matcher))
|
||||||
|
.unwrap();
|
||||||
|
let got = printer_contents(&mut printer);
|
||||||
|
|
||||||
|
assert_eq!(got.lines().count(), 3);
|
||||||
|
let last = got.lines().last().unwrap();
|
||||||
|
assert!(last.contains(r#""binary_offset":212,"#));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn max_matches() {
|
||||||
|
let matcher = RegexMatcher::new(
|
||||||
|
r"Watson"
|
||||||
|
).unwrap();
|
||||||
|
let mut printer = JSONBuilder::new()
|
||||||
|
.max_matches(Some(1))
|
||||||
|
.build(vec![]);
|
||||||
|
SearcherBuilder::new()
|
||||||
|
.build()
|
||||||
|
.search_reader(&matcher, SHERLOCK, printer.sink(&matcher))
|
||||||
|
.unwrap();
|
||||||
|
let got = printer_contents(&mut printer);
|
||||||
|
|
||||||
|
assert_eq!(got.lines().count(), 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn no_match() {
|
||||||
|
let matcher = RegexMatcher::new(
|
||||||
|
r"DOES NOT MATCH"
|
||||||
|
).unwrap();
|
||||||
|
let mut printer = JSONBuilder::new()
|
||||||
|
.build(vec![]);
|
||||||
|
SearcherBuilder::new()
|
||||||
|
.build()
|
||||||
|
.search_reader(&matcher, SHERLOCK, printer.sink(&matcher))
|
||||||
|
.unwrap();
|
||||||
|
let got = printer_contents(&mut printer);
|
||||||
|
|
||||||
|
assert!(got.is_empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn always_begin_end_no_match() {
|
||||||
|
let matcher = RegexMatcher::new(
|
||||||
|
r"DOES NOT MATCH"
|
||||||
|
).unwrap();
|
||||||
|
let mut printer = JSONBuilder::new()
|
||||||
|
.always_begin_end(true)
|
||||||
|
.build(vec![]);
|
||||||
|
SearcherBuilder::new()
|
||||||
|
.build()
|
||||||
|
.search_reader(&matcher, SHERLOCK, printer.sink(&matcher))
|
||||||
|
.unwrap();
|
||||||
|
let got = printer_contents(&mut printer);
|
||||||
|
|
||||||
|
assert_eq!(got.lines().count(), 2);
|
||||||
|
assert!(got.contains("begin") && got.contains("end"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn missing_crlf() {
|
||||||
|
let haystack = "test\r\n".as_bytes();
|
||||||
|
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.build("test")
|
||||||
|
.unwrap();
|
||||||
|
let mut printer = JSONBuilder::new()
|
||||||
|
.build(vec![]);
|
||||||
|
SearcherBuilder::new()
|
||||||
|
.build()
|
||||||
|
.search_reader(&matcher, haystack, printer.sink(&matcher))
|
||||||
|
.unwrap();
|
||||||
|
let got = printer_contents(&mut printer);
|
||||||
|
assert_eq!(got.lines().count(), 3);
|
||||||
|
assert!(
|
||||||
|
got.lines().nth(1).unwrap().contains(r"test\r\n"),
|
||||||
|
r"missing 'test\r\n' in '{}'",
|
||||||
|
got.lines().nth(1).unwrap(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let matcher = RegexMatcherBuilder::new()
|
||||||
|
.crlf(true)
|
||||||
|
.build("test")
|
||||||
|
.unwrap();
|
||||||
|
let mut printer = JSONBuilder::new()
|
||||||
|
.build(vec![]);
|
||||||
|
SearcherBuilder::new()
|
||||||
|
.line_terminator(LineTerminator::crlf())
|
||||||
|
.build()
|
||||||
|
.search_reader(&matcher, haystack, printer.sink(&matcher))
|
||||||
|
.unwrap();
|
||||||
|
let got = printer_contents(&mut printer);
|
||||||
|
assert_eq!(got.lines().count(), 3);
|
||||||
|
assert!(
|
||||||
|
got.lines().nth(1).unwrap().contains(r"test\r\n"),
|
||||||
|
r"missing 'test\r\n' in '{}'",
|
||||||
|
got.lines().nth(1).unwrap(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
147
grep-printer/src/jsont.rs
Normal file
147
grep-printer/src/jsont.rs
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
// This module defines the types we use for JSON serialization. We specifically
|
||||||
|
// omit deserialization, partially because there isn't a clear use case for
|
||||||
|
// them at this time, but also because deserialization will complicate things.
|
||||||
|
// Namely, the types below are designed in a way that permits JSON
|
||||||
|
// serialization with little or no allocation. Allocation is often quite
|
||||||
|
// convenient for deserialization however, so these types would become a bit
|
||||||
|
// more complex.
|
||||||
|
|
||||||
|
use std::borrow::Cow;
|
||||||
|
use std::path::Path;
|
||||||
|
use std::str;
|
||||||
|
|
||||||
|
use base64;
|
||||||
|
use serde::{Serialize, Serializer};
|
||||||
|
|
||||||
|
use stats::Stats;
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
#[serde(tag = "type", content = "data")]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
|
pub enum Message<'a> {
|
||||||
|
Begin(Begin<'a>),
|
||||||
|
End(End<'a>),
|
||||||
|
Match(Match<'a>),
|
||||||
|
Context(Context<'a>),
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
pub struct Begin<'a> {
|
||||||
|
#[serde(serialize_with = "ser_path")]
|
||||||
|
pub path: Option<&'a Path>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
pub struct End<'a> {
|
||||||
|
#[serde(serialize_with = "ser_path")]
|
||||||
|
pub path: Option<&'a Path>,
|
||||||
|
pub binary_offset: Option<u64>,
|
||||||
|
pub stats: Stats,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
pub struct Match<'a> {
|
||||||
|
#[serde(serialize_with = "ser_path")]
|
||||||
|
pub path: Option<&'a Path>,
|
||||||
|
#[serde(serialize_with = "ser_bytes")]
|
||||||
|
pub lines: &'a [u8],
|
||||||
|
pub line_number: Option<u64>,
|
||||||
|
pub absolute_offset: u64,
|
||||||
|
pub submatches: &'a [SubMatch<'a>],
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
pub struct Context<'a> {
|
||||||
|
#[serde(serialize_with = "ser_path")]
|
||||||
|
pub path: Option<&'a Path>,
|
||||||
|
#[serde(serialize_with = "ser_bytes")]
|
||||||
|
pub lines: &'a [u8],
|
||||||
|
pub line_number: Option<u64>,
|
||||||
|
pub absolute_offset: u64,
|
||||||
|
pub submatches: &'a [SubMatch<'a>],
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
pub struct SubMatch<'a> {
|
||||||
|
#[serde(rename = "match")]
|
||||||
|
#[serde(serialize_with = "ser_bytes")]
|
||||||
|
pub m: &'a [u8],
|
||||||
|
pub start: usize,
|
||||||
|
pub end: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Data represents things that look like strings, but may actually not be
|
||||||
|
/// valid UTF-8. To handle this, `Data` is serialized as an object with one
|
||||||
|
/// of two keys: `text` (for valid UTF-8) or `bytes` (for invalid UTF-8).
|
||||||
|
///
|
||||||
|
/// The happy path is valid UTF-8, which streams right through as-is, since
|
||||||
|
/// it is natively supported by JSON. When invalid UTF-8 is found, then it is
|
||||||
|
/// represented as arbitrary bytes and base64 encoded.
|
||||||
|
#[derive(Clone, Debug, Hash, PartialEq, Eq, Serialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
enum Data<'a> {
|
||||||
|
Text { text: Cow<'a, str> },
|
||||||
|
Bytes {
|
||||||
|
#[serde(serialize_with = "to_base64")]
|
||||||
|
bytes: &'a [u8],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Data<'a> {
|
||||||
|
fn from_bytes(bytes: &[u8]) -> Data {
|
||||||
|
match str::from_utf8(bytes) {
|
||||||
|
Ok(text) => Data::Text { text: Cow::Borrowed(text) },
|
||||||
|
Err(_) => Data::Bytes { bytes },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(unix)]
|
||||||
|
fn from_path(path: &Path) -> Data {
|
||||||
|
use std::os::unix::ffi::OsStrExt;
|
||||||
|
|
||||||
|
match path.to_str() {
|
||||||
|
Some(text) => Data::Text { text: Cow::Borrowed(text) },
|
||||||
|
None => Data::Bytes { bytes: path.as_os_str().as_bytes() },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(unix))]
|
||||||
|
fn from_path(path: &Path) -> Data {
|
||||||
|
// Using lossy conversion means some paths won't round trip precisely,
|
||||||
|
// but it's not clear what we should actually do. Serde rejects
|
||||||
|
// non-UTF-8 paths, and OsStr's are serialized as a sequence of UTF-16
|
||||||
|
// code units on Windows. Neither seem appropriate for this use case,
|
||||||
|
// so we do the easy thing for now.
|
||||||
|
Data::Text { text: path.to_string_lossy() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn to_base64<T, S>(
|
||||||
|
bytes: T,
|
||||||
|
ser: S,
|
||||||
|
) -> Result<S::Ok, S::Error>
|
||||||
|
where T: AsRef<[u8]>,
|
||||||
|
S: Serializer
|
||||||
|
{
|
||||||
|
ser.serialize_str(&base64::encode(&bytes))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn ser_bytes<T, S>(
|
||||||
|
bytes: T,
|
||||||
|
ser: S,
|
||||||
|
) -> Result<S::Ok, S::Error>
|
||||||
|
where T: AsRef<[u8]>,
|
||||||
|
S: Serializer
|
||||||
|
{
|
||||||
|
Data::from_bytes(bytes.as_ref()).serialize(ser)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn ser_path<P, S>(
|
||||||
|
path: &Option<P>,
|
||||||
|
ser: S,
|
||||||
|
) -> Result<S::Ok, S::Error>
|
||||||
|
where P: AsRef<Path>,
|
||||||
|
S: Serializer
|
||||||
|
{
|
||||||
|
path.as_ref().map(|p| Data::from_path(p.as_ref())).serialize(ser)
|
||||||
|
}
|
||||||
107
grep-printer/src/lib.rs
Normal file
107
grep-printer/src/lib.rs
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/*!
|
||||||
|
This crate provides featureful and fast printers that interoperate with the
|
||||||
|
[`grep-searcher`](https://docs.rs/grep-searcher)
|
||||||
|
crate.
|
||||||
|
|
||||||
|
# Brief overview
|
||||||
|
|
||||||
|
The [`Standard`](struct.Standard.html) printer shows results in a human
|
||||||
|
readable format, and is modeled after the formats used by standard grep-like
|
||||||
|
tools. Features include, but are not limited to, cross platform terminal
|
||||||
|
coloring, search & replace, multi-line result handling and reporting summary
|
||||||
|
statistics.
|
||||||
|
|
||||||
|
The [`JSON`](struct.JSON.html) printer shows results in a machine readable
|
||||||
|
format. To facilitate a stream of search results, the format uses
|
||||||
|
[JSON Lines](http://jsonlines.org/)
|
||||||
|
by emitting a series of messages as search results are found.
|
||||||
|
|
||||||
|
The [`Summary`](struct.Summary.html) printer shows *aggregate* results for a
|
||||||
|
single search in a human readable format, and is modeled after similar formats
|
||||||
|
found in standard grep-like tools. This printer is useful for showing the total
|
||||||
|
number of matches and/or printing file paths that either contain or don't
|
||||||
|
contain matches.
|
||||||
|
|
||||||
|
# Example
|
||||||
|
|
||||||
|
This example shows how to create a "standard" printer and execute a search.
|
||||||
|
|
||||||
|
```
|
||||||
|
extern crate grep_regex;
|
||||||
|
extern crate grep_printer;
|
||||||
|
extern crate grep_searcher;
|
||||||
|
|
||||||
|
use std::error::Error;
|
||||||
|
|
||||||
|
use grep_regex::RegexMatcher;
|
||||||
|
use grep_printer::Standard;
|
||||||
|
use grep_searcher::Searcher;
|
||||||
|
|
||||||
|
const SHERLOCK: &'static [u8] = b"\
|
||||||
|
For the Doctor Watsons of this world, as opposed to the Sherlock
|
||||||
|
Holmeses, success in the province of detective work must always
|
||||||
|
be, to a very large extent, the result of luck. Sherlock Holmes
|
||||||
|
can extract a clew from a wisp of straw or a flake of cigar ash;
|
||||||
|
but Doctor Watson has to have it taken out for him and dusted,
|
||||||
|
and exhibited clearly, with a label attached.
|
||||||
|
";
|
||||||
|
|
||||||
|
# fn main() { example().unwrap(); }
|
||||||
|
fn example() -> Result<(), Box<Error>> {
|
||||||
|
let matcher = RegexMatcher::new(r"Sherlock")?;
|
||||||
|
let mut printer = Standard::new_no_color(vec![]);
|
||||||
|
Searcher::new().search_slice(&matcher, SHERLOCK, printer.sink(&matcher))?;
|
||||||
|
|
||||||
|
// into_inner gives us back the underlying writer we provided to
|
||||||
|
// new_no_color, which is wrapped in a termcolor::NoColor. Thus, a second
|
||||||
|
// into_inner gives us back the actual buffer.
|
||||||
|
let output = String::from_utf8(printer.into_inner().into_inner())?;
|
||||||
|
let expected = "\
|
||||||
|
1:For the Doctor Watsons of this world, as opposed to the Sherlock
|
||||||
|
3:be, to a very large extent, the result of luck. Sherlock Holmes
|
||||||
|
";
|
||||||
|
assert_eq!(output, expected);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
```
|
||||||
|
*/
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
extern crate base64;
|
||||||
|
extern crate bstr;
|
||||||
|
extern crate grep_matcher;
|
||||||
|
#[cfg(test)]
|
||||||
|
extern crate grep_regex;
|
||||||
|
extern crate grep_searcher;
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
extern crate serde;
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
#[macro_use]
|
||||||
|
extern crate serde_derive;
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
extern crate serde_json;
|
||||||
|
extern crate termcolor;
|
||||||
|
|
||||||
|
pub use color::{ColorError, ColorSpecs, UserColorSpec, default_color_specs};
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
pub use json::{JSON, JSONBuilder, JSONSink};
|
||||||
|
pub use standard::{Standard, StandardBuilder, StandardSink};
|
||||||
|
pub use stats::Stats;
|
||||||
|
pub use summary::{Summary, SummaryBuilder, SummaryKind, SummarySink};
|
||||||
|
pub use util::PrinterPath;
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
mod macros;
|
||||||
|
|
||||||
|
mod color;
|
||||||
|
mod counter;
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
mod json;
|
||||||
|
#[cfg(feature = "serde1")]
|
||||||
|
mod jsont;
|
||||||
|
mod standard;
|
||||||
|
mod stats;
|
||||||
|
mod summary;
|
||||||
|
mod util;
|
||||||
24
grep-printer/src/macros.rs
Normal file
24
grep-printer/src/macros.rs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/// Like assert_eq, but nicer output for long strings.
|
||||||
|
#[cfg(test)]
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! assert_eq_printed {
|
||||||
|
($expected:expr, $got:expr) => {
|
||||||
|
let expected = &*$expected;
|
||||||
|
let got = &*$got;
|
||||||
|
if expected != got {
|
||||||
|
panic!("
|
||||||
|
printed outputs differ!
|
||||||
|
|
||||||
|
expected:
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
{}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
got:
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
{}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
", expected, got);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
3453
grep-printer/src/standard.rs
Normal file
3453
grep-printer/src/standard.rs
Normal file
File diff suppressed because it is too large
Load Diff
147
grep-printer/src/stats.rs
Normal file
147
grep-printer/src/stats.rs
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
use std::ops::{Add, AddAssign};
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use util::NiceDuration;
|
||||||
|
|
||||||
|
/// Summary statistics produced at the end of a search.
|
||||||
|
///
|
||||||
|
/// When statistics are reported by a printer, they correspond to all searches
|
||||||
|
/// executed with that printer.
|
||||||
|
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||||
|
#[cfg_attr(feature = "serde1", derive(Serialize))]
|
||||||
|
pub struct Stats {
|
||||||
|
elapsed: NiceDuration,
|
||||||
|
searches: u64,
|
||||||
|
searches_with_match: u64,
|
||||||
|
bytes_searched: u64,
|
||||||
|
bytes_printed: u64,
|
||||||
|
matched_lines: u64,
|
||||||
|
matches: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Add for Stats {
|
||||||
|
type Output = Stats;
|
||||||
|
|
||||||
|
fn add(self, rhs: Stats) -> Stats {
|
||||||
|
self + &rhs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Add<&'a Stats> for Stats {
|
||||||
|
type Output = Stats;
|
||||||
|
|
||||||
|
fn add(self, rhs: &'a Stats) -> Stats {
|
||||||
|
Stats {
|
||||||
|
elapsed: NiceDuration(self.elapsed.0 + rhs.elapsed.0),
|
||||||
|
searches: self.searches + rhs.searches,
|
||||||
|
searches_with_match:
|
||||||
|
self.searches_with_match + rhs.searches_with_match,
|
||||||
|
bytes_searched: self.bytes_searched + rhs.bytes_searched,
|
||||||
|
bytes_printed: self.bytes_printed + rhs.bytes_printed,
|
||||||
|
matched_lines: self.matched_lines + rhs.matched_lines,
|
||||||
|
matches: self.matches + rhs.matches,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AddAssign for Stats {
|
||||||
|
fn add_assign(&mut self, rhs: Stats) {
|
||||||
|
*self += &rhs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> AddAssign<&'a Stats> for Stats {
|
||||||
|
fn add_assign(&mut self, rhs: &'a Stats) {
|
||||||
|
self.elapsed.0 += rhs.elapsed.0;
|
||||||
|
self.searches += rhs.searches;
|
||||||
|
self.searches_with_match += rhs.searches_with_match;
|
||||||
|
self.bytes_searched += rhs.bytes_searched;
|
||||||
|
self.bytes_printed += rhs.bytes_printed;
|
||||||
|
self.matched_lines += rhs.matched_lines;
|
||||||
|
self.matches += rhs.matches;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Stats {
|
||||||
|
/// Return a new value for tracking aggregate statistics across searches.
|
||||||
|
///
|
||||||
|
/// All statistics are set to `0`.
|
||||||
|
pub fn new() -> Stats {
|
||||||
|
Stats::default()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total amount of time elapsed.
|
||||||
|
pub fn elapsed(&self) -> Duration {
|
||||||
|
self.elapsed.0
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of searches executed.
|
||||||
|
pub fn searches(&self) -> u64 {
|
||||||
|
self.searches
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of searches that found at least one match.
|
||||||
|
pub fn searches_with_match(&self) -> u64 {
|
||||||
|
self.searches_with_match
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of bytes searched.
|
||||||
|
pub fn bytes_searched(&self) -> u64 {
|
||||||
|
self.bytes_searched
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of bytes printed.
|
||||||
|
pub fn bytes_printed(&self) -> u64 {
|
||||||
|
self.bytes_printed
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of lines that participated in a match.
|
||||||
|
///
|
||||||
|
/// When matches may contain multiple lines then this includes every line
|
||||||
|
/// that is part of every match.
|
||||||
|
pub fn matched_lines(&self) -> u64 {
|
||||||
|
self.matched_lines
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the total number of matches.
|
||||||
|
///
|
||||||
|
/// There may be multiple matches per line.
|
||||||
|
pub fn matches(&self) -> u64 {
|
||||||
|
self.matches
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the elapsed time.
|
||||||
|
pub fn add_elapsed(&mut self, duration: Duration) {
|
||||||
|
self.elapsed.0 += duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the number of searches executed.
|
||||||
|
pub fn add_searches(&mut self, n: u64) {
|
||||||
|
self.searches += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the number of searches that found at least one match.
|
||||||
|
pub fn add_searches_with_match(&mut self, n: u64) {
|
||||||
|
self.searches_with_match += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the total number of bytes searched.
|
||||||
|
pub fn add_bytes_searched(&mut self, n: u64) {
|
||||||
|
self.bytes_searched += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the total number of bytes printed.
|
||||||
|
pub fn add_bytes_printed(&mut self, n: u64) {
|
||||||
|
self.bytes_printed += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the total number of lines that participated in a match.
|
||||||
|
pub fn add_matched_lines(&mut self, n: u64) {
|
||||||
|
self.matched_lines += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add to the total number of matches.
|
||||||
|
pub fn add_matches(&mut self, n: u64) {
|
||||||
|
self.matches += n;
|
||||||
|
}
|
||||||
|
}
|
||||||
1099
grep-printer/src/summary.rs
Normal file
1099
grep-printer/src/summary.rs
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user