Jump to content

Edit History

delete-account-pleas

delete-account-pleas

Hello @husein522

I have check this table on a Prestashop version 1.6.1.25.

  • I have truncated the table (do not drop it!)
  • Check frontoffice: No errors
  • Check backoffice: No errors

Looking into Prestashop files we can find this function:

    if (Module::$_log_modules_perfs) {
        $time_end = microtime(true);
        $memory_end = memory_get_usage(true);

        Db::getInstance()->execute('
        INSERT INTO '._DB_PREFIX_.'modules_perfs (session, module, method, time_start, time_end, memory_start, memory_end)
        VALUES ('.(int)Module::$_log_modules_perfs_session.', "'.pSQL($module_name).'", "__construct", "'.pSQL($time_start).'", "'.pSQL($time_end).'", '.(int)$memory_start.', '.(int)$memory_end.')');
    }

In the prestashop classes\Hook.php we can find this function:

    public static function coreCallHook($module, $method, $params)
    {
        // Define if we will log modules performances for this session
        if (Module::$_log_modules_perfs === null) {
            $modulo = _PS_DEBUG_PROFILING_ ? 1 : Configuration::get('PS_log_modules_perfs_MODULO');
            Module::$_log_modules_perfs = ($modulo && mt_rand(0, $modulo - 1) == 0);
            if (Module::$_log_modules_perfs) {
                Module::$_log_modules_perfs_session = mt_rand();
            }
        }

        // Immediately return the result if we do not log performances
        if (!Module::$_log_modules_perfs) {
            return $module->{$method}($params);
        }

        // Store time and memory before and after hook call and save the result in the database
        $time_start = microtime(true);
        $memory_start = memory_get_usage(true);

        // Call hook
        $r = $module->{$method}($params);

        $time_end = microtime(true);
        $memory_end = memory_get_usage(true);

        Db::getInstance()->execute('
		INSERT INTO '._DB_PREFIX_.'modules_perfs (session, module, method, time_start, time_end, memory_start, memory_end)
		VALUES ('.(int)Module::$_log_modules_perfs_session.', "'.pSQL($module->name).'", "'.pSQL($method).'", "'.pSQL($time_start).'", "'.pSQL($time_end).'", '.(int)$memory_start.', '.(int)$memory_end.')');

        return $r;
    }

 

So i am guessing its an logging system for the prestashop hooks, as long you don't drop the table you should be fine.

WARNING: make sure to make a backup just in case...

In Prestashop 1.7 the table ps_modules_perfs does not exist anymore.

delete-account-pleas

delete-account-pleas

Hello @husein522

I have check this table on a Prestashop version 1.6.1.25.

  • I have truncated the table (do not drop it!)
  • Check frontoffice: No errors
  • Check backoffice: No errors

Looking into Prestashop files we can find this function:

    if (Module::$_log_modules_perfs) {
        $time_end = microtime(true);
        $memory_end = memory_get_usage(true);

        Db::getInstance()->execute('
        INSERT INTO '._DB_PREFIX_.'modules_perfs (session, module, method, time_start, time_end, memory_start, memory_end)
        VALUES ('.(int)Module::$_log_modules_perfs_session.', "'.pSQL($module_name).'", "__construct", "'.pSQL($time_start).'", "'.pSQL($time_end).'", '.(int)$memory_start.', '.(int)$memory_end.')');
    }

So i am guessing its an logging system for the prestashop hooks, as long you don't drop the table you should be fine.

WARNING: make sure to make a backup just in case...

In Prestashop 1.7 the table ps_modules_perfs does not exist anymore.

delete-account-pleas

delete-account-pleas

Hello @husein522

I have check this table on a Prestashop version 1.6.1.25.

  • I have truncated the table (do not drop it!)
  • Check frontoffice: No errors
  • Check backoffice: No errors

Looking into Prestashop files we can find this function:

    if (Module::$_log_modules_perfs) {
        $time_end = microtime(true);
        $memory_end = memory_get_usage(true);

        Db::getInstance()->execute('
        INSERT INTO '._DB_PREFIX_.'modules_perfs (session, module, method, time_start, time_end, memory_start, memory_end)
        VALUES ('.(int)Module::$_log_modules_perfs_session.', "'.pSQL($module_name).'", "__construct", "'.pSQL($time_start).'", "'.pSQL($time_end).'", '.(int)$memory_start.', '.(int)$memory_end.')');
    }

So i am guessing its an logging system for the prestashop hooks, as long you don't drop the table you should be fine.

WARNING: make sure to make a backup just in case...

×
×
  • Create New...