HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/exnova-telegram-bot-v2/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformReply = exports.transformArguments = void 0;
function transformArguments() {
    return ['MEMORY', 'STATS'];
}
exports.transformArguments = transformArguments;
const FIELDS_MAPPING = {
    'peak.allocated': 'peakAllocated',
    'total.allocated': 'totalAllocated',
    'startup.allocated': 'startupAllocated',
    'replication.backlog': 'replicationBacklog',
    'clients.slaves': 'clientsReplicas',
    'clients.normal': 'clientsNormal',
    'aof.buffer': 'aofBuffer',
    'lua.caches': 'luaCaches',
    'overhead.total': 'overheadTotal',
    'keys.count': 'keysCount',
    'keys.bytes-per-key': 'keysBytesPerKey',
    'dataset.bytes': 'datasetBytes',
    'dataset.percentage': 'datasetPercentage',
    'peak.percentage': 'peakPercentage',
    'allocator.allocated': 'allocatorAllocated',
    'allocator.active': 'allocatorActive',
    'allocator.resident': 'allocatorResident',
    'allocator-fragmentation.ratio': 'allocatorFragmentationRatio',
    'allocator-fragmentation.bytes': 'allocatorFragmentationBytes',
    'allocator-rss.ratio': 'allocatorRssRatio',
    'allocator-rss.bytes': 'allocatorRssBytes',
    'rss-overhead.ratio': 'rssOverheadRatio',
    'rss-overhead.bytes': 'rssOverheadBytes',
    'fragmentation': 'fragmentation',
    'fragmentation.bytes': 'fragmentationBytes'
}, DB_FIELDS_MAPPING = {
    'overhead.hashtable.main': 'overheadHashtableMain',
    'overhead.hashtable.expires': 'overheadHashtableExpires'
};
function transformReply(rawReply) {
    const reply = {
        db: {}
    };
    for (let i = 0; i < rawReply.length; i += 2) {
        const key = rawReply[i];
        if (key.startsWith('db.')) {
            const dbTuples = rawReply[i + 1], db = {};
            for (let j = 0; j < dbTuples.length; j += 2) {
                db[DB_FIELDS_MAPPING[dbTuples[j]]] = dbTuples[j + 1];
            }
            reply.db[key.substring(3)] = db;
            continue;
        }
        reply[FIELDS_MAPPING[key]] = Number(rawReply[i + 1]);
    }
    return reply;
}
exports.transformReply = transformReply;