Log parsing speed

Now that we have two programs that parse log files, we can start to take a look at how many lines the program parses per second. First we have to make the two programs as similar as possible. In pseudocode it looks likes this. Load all modules Take the start time using Time::HiRes Put the code of the program here Set line_count = 0 Using stdin: loop through all lines Parse the line Set line_count++ Find the time difference Divide and line_count / time as n lines/s In Perl this looks like:...

April 13, 2011