Archive for the ‘SquidLook’ Category

new SquidLook installer checked in.

Tuesday, February 20th, 2007

Finally I made the last code modifications to SquidLook installer.  The upgrade from MySAR is to do, yet. But it’s not too difficult, I think to use ‘ALTER TABLE’ commands.

SquidLook 1.0 beta1 is approaching soon…

New squidLook logo.

Monday, February 12th, 2007

 I’ve drawn the squidLook logo. The big one:

squidLook logo

and the small one:

squidlook logo small version - glasses

 

 

Optimized squidlook-importer.php commited into SVN.

Sunday, February 11th, 2007

Squidlook-importer.php is the script that do the big work: importing the Squid log files.
It is based from the old mysar-importer.php.
The original author, Giannis Stollis, pointed me about the slowness of the importer. He was working on Mysar 3.0 with an entirelly C compiled importer to get things faster, but he dropped out.
I saw the code and optimized it a bit. I've taken some simple but powerful tactics.
Given that the importer uses many, many, many SQL queries, so the bottleneck is those Mysql calls.
So:

  • Cache all small tables: for example, users table, can be entirelly cached into memory: it is good for organizations up to 80.000 employers.
  • Buffered inserts: multiple inserts done in one time is much, much, much faster than multiple single inserts. Simple do this:
PHP:
  1. $query = "INSERT INTO TABLE (field1, field2, ..., fieldn) VALUES ";
  2.         <...>
  3.         foreach (....) {
  4.              $query .= " ($value1,$value2, ... $valuen) ";   
  5.              if ($ninserts == $maxinserts) {
  6.                  mysql_query ($query);
  7.                  $query = 'INSERT INTO TABLE (field1, field2, ..., fieldn) VALUES ';
  8.              } else {
  9.                  $query .= " , ";
  10.              }
  11.         }

Sorry for the code not indented: I must discover how to enable this in wordpress...

I found the plugin for the code at http://blog.igeek.info/wp-plugins/igsyntax-hiliter/ ! It's awesome :D

First sources uploaded on SVN.

Tuesday, January 30th, 2007

Finally I uploaded first sources of SquidLook in Google Code SVN repositories.
I except to release the first 1.0 package soon.

Stay tuned.

SquidLook: a Squid log analyzer based on Mysar.

Friday, August 4th, 2006

SquidLook is a new project, managed by me, useful to analyze squid log.

It's based on mysar, in which I modified in many parts and optimized it.

The project page is at: http://code.google.com/p/squidlook/

I haven't uploaded any sources, but I'll do it soon.

Stay tuned!