the large file challenge

Pierre Sahores psahores at easynet.fr
Sun Nov 10 02:20:01 EST 2002


Sannyasin Sivakatirswami wrote:
> 
> Om Sadhunathan:
> 
> Excellent! i had been thinking that we should probably save access logs from our servers in honolulu, but then parsing those was a blind spot. This will help immensely.
> 
> Now, do i read this to say that there were 17,338 attempts to look at Mystic Mouse PDF's ? and if so, over what period of time? A small addtion to the script and we could determine if the download was completed. (204, i think... or may be 304?)
> 
> On Saturday, November 9, 2002, at 03:17 PM, Sadhunathan Nadesan wrote:
> 
>      metacard
>      Sat Nov 9 16:52:09 PST 2002
>      17338
>      Sat Nov 9 16:54:28 PST 2002
>      .....
> 
>      So that is 1:53 for bash, 2:04 for pascal, and 2:19 for MC. darn good!
> 
>      Here's the code, gott go...
> 
>      #!/usr/local/bin/mc
>      on startup
> 
>      put 0 into the_counter
> 
>      put 1 into the_offset
> 
>      put 333491183 into file_size
> 
>      put 30000 into the_increment
> 
>      put "/gig/tmp/log/access_log" into the_file
> 
>      open file the_file for read
> 
>      repeat until (the_offset >= file_size)
> 
>      read from file the_file at the_offset for the_increment
> 
>      put it into the_text
> 
>      repeat for each line this_line in the_text
> 
>      get offset("mystic_mouse", this_line)
> 
>      if (it is not 0) then add 1 to the_counter
> 
>      end repeat
> 
>      add the_increment to the_offset
> 
>      end repeat
> 
>      put the_counter
>      end startup

Aloha Friends,

So ! MC as far so fast than Pascal ! Is'nt it great ? And, thanks again
to Scott, for that too !
Just one more question : could you say us, Scott, when MC will become
faster than C, or is it a secret ? ;-)
-- 
Cordialement, Pierre Sahores

Inspection académique de Seine-Saint-Denis.
Applications et bases de données WEB et VPN
Qualifier et produire l'avantage compétitif



More information about the metacard mailing list