Skip to content
Extraits de code Groupes Projets
piwik.php 1,64 ko
Newer Older
  • Learn to ignore specific revisions
  • /**
     * Misc Thoughts about optimization
     * 
     * - after a day is archived, we delete all the useless information from the log table, keeping only the useful data for weeks/month
     *   maybe we create a new table containing only these aggregate and we can delete the rows of the day in the log table
     * - To avoid join two huge tables (log_visit, log_link_visit_action) we may have to denormalize (idsite, date)#
     * -  
     */
    
     
    /*
     * Some benchmarks
     * 
     * - with the config parsing + db connection
     * Requests per second:    471.91 [#/sec] (mean)
     * 
     * - with the main algorithm working + one visitor requesting 5000 times
     * Requests per second:    155.00 [#/sec] (mean)
     * 
    
    mattpiwik's avatar
    mattpiwik a validé
     * - august 28th, main algo + files in place + one visitor requesting 5000 times
     * Requests per second:    118.55 [#/sec] (mean)
    
    error_reporting(E_ALL|E_NOTICE);
    define('PIWIK_INCLUDE_PATH', '.');
    
    define('PIWIK_DATAFILES_INCLUDE_PATH', PIWIK_INCLUDE_PATH . "/modules/DataFiles");
    
    
    @ignore_user_abort(true);
    @set_time_limit(0);
    
    set_include_path(PIWIK_INCLUDE_PATH 
    					. PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/libs/'
    
    mattpiwik's avatar
    mattpiwik a validé
    					. PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins/'
    
    					. PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/modules'
    					. PATH_SEPARATOR . get_include_path() );
    
    
    mattpiwik's avatar
    mattpiwik a validé
    require_once "PluginsManager.php";
    
    require_once "LogStats.php";
    require_once "LogStats/Config.php";
    require_once "LogStats/Action.php";
    require_once "LogStats/Cookie.php";
    require_once "LogStats/Db.php";
    require_once "LogStats/Visit.php";
    
    $GLOBALS['DEBUGPIWIK'] = true;
    
    $process = new Piwik_LogStats;
    
    printDebug($_COOKIE);
    
    mattpiwik's avatar
    mattpiwik a validé