Microtime in bash: sub-second precision
Post #8 in this bash benchmark series, measuring the speed of common bash operations.
Post #8 in this bash benchmark series, measuring the speed of common bash operations.
Post #7 in this bash benchmark series, measuring the speed of common bash text manipulations.
Post #6 in this bash benchmark series, measuring the speed of common bash text manipulations.
Post #5 in this bash benchmark series, measuring the speed of common bash text manipulations.
Post #4 in this bash benchmark series, measuring the speed of common bash text manipulations.
Post #1 in this bash benchmark series, measuring the speed of common bash text manipulations.
Post #2 in this bash benchmark series, measuring the speed of common bash text manipulations.
Post #3 in this bash benchmark series, measuring the speed of common bash text manipulations.
You have a huge file that contains one line per request/transaction. Some lines are of one type (e.g. ‘HIT’), some of another (e.g. MISS). Let’s say you want to calculate the hit-rate, but as fast as possible.
We take a Squid log file of about 140MB. How long does it take to count how many lines it has?