redis-benchmark -c 50 -q -n 10000 -t get,set
SET: 31645.57 requests per second
GET: 35087.72 requests per second
redis-benchmark -q
PING_INLINE: 30750.31 requests per second
PING_BULK: 31969.31 requests per second
SET: 29163.02 requests per second
GET: 29877.50 requests per second
INCR: 32133.68 requests per second
LPUSH: 30543.68 requests per second
RPUSH: 29385.84 requests per second
LPOP: 31220.73 requests per second
RPOP: 32310.18 requests per second
SADD: 32873.11 requests per second
HSET: 29481.13 requests per second
SPOP: 29239.77 requests per second
LPUSH (needed to benchmark LRANGE): 31887.76 requests per second
LRANGE_100 (first 100 elements): 20279.86 requests per second
LRANGE_300 (first 300 elements): 11092.62 requests per second
LRANGE_500 (first 450 elements): 7822.89 requests per second
LRANGE_600 (first 600 elements): 6308.35 requests per second
MSET (10 keys): 28417.16 requests per second
top - 11:15:11 up 2:59, 1 user, load average: 1.09, 2.21, 2.53
Tasks: 124 total, 1 running, 123 sleeping, 0 stopped, 0 zombie
%Cpu(s): 22.8 us, 2.1 sy, 0.0 ni, 71.7 id, 1.5 wa, 0.0 hi, 0.6 si, 1.4 st
MiB Mem : 15664.0 total, 257.1 free, 6939.6 used, 8467.3 buff/cache
MiB Swap: 1024.0 total, 1018.2 free, 5.8 used. 8407.0 avail Mem
const str = 'Холодильник'
var t = {};
t['%D0%B0']='%E0';t['%D0%B1']='%E1';t['%D0%B2']='%E2';t['%D0%B3']='%E3';t['%D0%B4']='%E4';
t['%D0%B5']='%E5';t['%D1%91']='%B8';t['%D0%B6']='%E6';t['%D0%B7']='%E7';t['%D0%B8']='%E8';
t['%D0%B9']='%E9';t['%D0%BA']='%EA';t['%D0%BB']='%EB';t['%D0%BC']='%EC';t['%D0%BD']='%ED';
t['%D0%BE']='%EE';t['%D0%BF']='%EF';t['%D1%80']='%F0';t['%D1%81']='%F1';t['%D1%82']='%F2';
t['%D1%83']='%F3';t['%D1%84']='%F4';t['%D1%85']='%F5';t['%D1%86']='%F6';t['%D1%87']='%F7';
t['%D1%88']='%F8';t['%D1%89']='%F9';t['%D1%8C']='%FC';t['%D1%8B']='%FB';t['%D1%8A']='%FA';
t['%D1%8D']='%FD';t['%D1%8E']='%FE';t['%D1%8F']='%FF';t['%D0%90']='%C0';t['%D0%91']='%C1';
t['%D0%92']='%C2';t['%D0%93']='%C3';t['%D0%94']='%C4';t['%D0%95']='%C5';t['%D0%81']='%A8';
t['%D0%96']='%C6';t['%D0%97']='%C7';t['%D0%98']='%C8';t['%D0%99']='%C9';t['%D0%9A']='%CA';
t['%D0%9B']='%CB';t['%D0%9C']='%CC';t['%D0%9D']='%CD';t['%D0%9E']='%CE';t['%D0%9F']='%CF';
t['%D0%A0']='%D0';t['%D0%A1']='%D1';t['%D0%A2']='%D2';t['%D0%A3']='%D3';t['%D0%A4']='%D4';
t['%D0%A5']='%D5';t['%D0%A6']='%D6';t['%D0%A7']='%D7';t['%D0%A8']='%D8';t['%D0%A9']='%D9';
t['%D0%AC']='%DC';t['%D0%AB']='%DB';t['%D0%AA']='%DA';t['%D0%AD']='%DD';t['%D0%AE']='%DE';
t['%D0%AF']='%DF';
function urlencode(str) {
str = (str + '').toString();
return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
}
function convert_to_cp1251(str) {
var ret='';
var l=str.length;
var i=0;
while (i<l) {
var f=0;
for (let keyVar in t) {
if (str.substring(i,i+6)==keyVar) {ret+=t[keyVar];i+=6;f=1;}
}
if (!f) {ret+=str.substring(i,i+1);i++;}
}
return ret;
}
console.log(convert_to_cp1251(urlencode(str)))