4 ms·
Yeah, I had this working pretty well in about 20 minutes with python. Binary search is really pretty quick. I didn't have a 75 gigabyte log handy, so I had to
by jmelloy 16y ago
Yeah, I had this working pretty well in about 20 minutes with python. Binary search is really pretty quick. I didn't have a 75 gigabyte log handy, so I had to test it on a measly 10 GB log. :(
I had a secondary problem where our logs occasionally put a new line in, so I had to burn a couple fseeks checking for that. I'm not sure how I'd go about truly profiling it, but it returns pretty much instantly.
Though it's not really useful for our logs to look for a per-minute line, because our logs are crap. What useful information do you find looking for that type of specific data?
- dpritchett 16y agoNote they also had a time range option. I imagine they start out finding the specific event line ("you broke reddit" at 4:07 am!") and then slowly widen the time range around it to see if anything interesting happened in the minutes leading up to it.
- jmelloy 16y agoI suppose there's also tgrep 08:30-08:36 | grep REDDITBROKE