Stats output in JSON mode #3178
-
|
Hi! I'm evaluating using ripgrep as a the search engine for a project over having to roll something (far slower) myself and I'm having some trouble understanding what the stats printed in Example codebase is the UXP source tree: Let's search something and print the stats: Both number of files searched and total size are correct. And the same as JSON output: Why are the bytes searched and number of searches completely different? I think the numbers here are only from the files where there were any matches, as in, only a summary of the Also, while we're on this topic, is it possible to get these status objects written out during the search? If not a lot of matches happen there is no indication of the progress at all. I could use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Please provide a link to the corpus you're using. And a git revision. |
Beta Was this translation helpful? Give feedback.
OK, so apparently, the summary statistics for the JSON printer have been wrong... since the JSON printer was introduced? Kinda wild that nobody has reported that until now. I have a fix here: #3190
I definitely don't want to enable
always_begin_endfor ripgrep by default. It emits too much noise and isn't consistent with how standard mode operates (don't print anything if there aren't any matches). We could add a flag that lets users opt into it, but I am growing increasingly hesitant to add more flags to ripgrep because there are already so many. I've generally been denying new flags for very niche requests like this without extremely compelling motivation. If you truly need some kind of…