Changeset 1361


Ignore:
Timestamp:
03/02/05 20:35:53 (8 years ago)
Author:
anarcat
Message:

do not count admin hits (!=200) seperatly

there were many problems with this approach:

1- the bandwidth used by those hits wasn't counted
2- some of those hits are real hits (continuation, for example, is not 200, but occurs naturally)
3- this is a specialization we do not need

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/alternc_stats_web.php

    r1357 r1361  
    128128    // On calcule le jour : (= yearmonthday) 
    129129    $day=$mat[3].$months[$mat[2]].$mat[1]; 
    130     if ($mat[4]==200) {      //  HTTP/1.0 OK ! 
    131       $domstat[$mat[6]."/".$day]["hit"]++; 
    132       $domstat[$mat[6]."/".$day]["size"]+=intval($mat[5]); 
    133     } else {   // HTTP/1.0 404, 304, 503 ... ! 
    134       /* XXX: why don't we cound the size of those??? */ 
    135       $domstat[$mat[6]."/".$day]["adminhit"]++;       
    136     } 
     130    $domstat[$mat[6]."/".$day]["hit"]++; 
     131    $domstat[$mat[6]."/".$day]["size"]+=intval($mat[5]); 
    137132  } else { 
    138133    printf("Can't parse: %.60s...\n", $s); 
  • trunk/bin/stat_conso.php

    r1357 r1361  
    128128    // On calcule le jour : (= yearmonthday) 
    129129    $day=$mat[3].$months[$mat[2]].$mat[1]; 
    130     if ($mat[4]==200) {      //  HTTP/1.0 OK ! 
    131       $domstat[$mat[6]."/".$day]["hit"]++; 
    132       $domstat[$mat[6]."/".$day]["size"]+=intval($mat[5]); 
    133     } else {   // HTTP/1.0 404, 304, 503 ... ! 
    134       /* XXX: why don't we cound the size of those??? */ 
    135       $domstat[$mat[6]."/".$day]["adminhit"]++;       
    136     } 
     130    $domstat[$mat[6]."/".$day]["hit"]++; 
     131    $domstat[$mat[6]."/".$day]["size"]+=intval($mat[5]); 
    137132  } else { 
    138133    printf("Can't parse: %.60s...\n", $s); 
  • trunk/schemas/mysql.sql

    r1358 r1361  
    55  `hit` int(10) unsigned NOT NULL default '0', 
    66  `size` int(10) unsigned NOT NULL default '0', 
    7   `adminhit` int(10) unsigned NOT NULL default '0', 
    87  PRIMARY KEY  (`day`,`domain`), 
    98  KEY `uid` (`uid`) 
  • trunk/stat.sql

    r1358 r1361  
    55  `hit` int(10) unsigned NOT NULL default '0', 
    66  `size` int(10) unsigned NOT NULL default '0', 
    7   `adminhit` int(10) unsigned NOT NULL default '0', 
    87  PRIMARY KEY  (`day`,`domain`), 
    98  KEY `uid` (`uid`) 
Note: See TracChangeset for help on using the changeset viewer.