On Mon, 10 Apr 2000, Jason Simms wrote:

> I have a question first, then some insight as to why you may be having the 
> problem...  First, is this Knoxville, TN?  I lived there for 17 years of my 
> life, and only recently (1.5 years ago) moved up to New York City.  I left 
> due to lack of businesses in Knoxville using Linux / UNIX and Perl, along 
> with other more advanced Web technologies.  I can say the market for 
> hardcore UNIX / perl (what I do) is much stronger up here than down htere, 
> but I am always interested in the possibility of moving back down there with 
> my skills.
> 
> As to your problem, I doubt people can be of much assistance (though we'll 
> see) without seeing the regex and sample data.  Perhaps if you resent that??
> 
> In any case, good luck.  And perhaps, stay in touch, or put me on a mailing 
> list, or something.  Thanks!

Well, there isn't really anything in Knoxville, but Oak Ridge is pretty
busy.

You have a good point.  Sorry about the lack of code.

Here is my analyzer_benchmark script that will show you the code.

J. J. Horner
Linux, Apache, Perl, Unix, Stronghold
[EMAIL PROTECTED] http://www.knoxlug.org
System has been up: 9 days.

#!/usr/bin/perl -w
#
# This script is used to benchmark various algorithms for checking the log file. 
# It uses the Benchmark module and some sloppy coding.

use Benchmark;

my @internals = 
("192.168","ornl.gov","134.167","199.201","128.219","198.124","198.207","160.91","198.136","198.148","fueleconomy.gov","172.17","172.20");


sub first {
        my $i;
        my @fields = ("134.167","","","","","GET","/","HTTP/1.0","404","");
        my $source = $fields[0];
        $fields[5] =~ s/\"//;
        $fields[7] =~ s/\"//;
        my $method = $fields[5];
        my $uri = $fields[6];
        my $protocol = $fields[7];
        my $status = $fields[$#fields-1];
        for ($i = 0; $i <= $#internals ; $i++) {
                if ($internals[$i] =~ /$source/) {
                }
        }
}

sub anchored {
        my $i;
        my @fields = ("134.167","","","","","GET","/","HTTP/1.0","404","");
        my $source = $fields[0];
        $fields[5] =~ s/\"//;
        $fields[7] =~ s/\"//;
        my $method = $fields[5];
        my $uri = $fields[6];
        my $protocol = $fields[7];
        my $request = join(" ",$method,$uri);
        my $status = $fields[$#fields-1];
        for ($i = 0; $i <= $#internals ; $i++) {
                if ($internals[$i] =~ /$source/) {
                }
        }
}

timethese(5000, { first => 'first()',anchored => 'anchored()',  });

Reply via email to