This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHPAPI void generic_subscribe_cmd(INTERNAL_FUNCTION_PARAMETERS, char *sub_cmd) | |
zval *object, *array, **data; | |
HashTable *arr_hash; | |
HashPosition pointer; | |
RedisSock *redis_sock; | |
char *cmd = "", *old_cmd = NULL; | |
int cmd_len, array_count; | |
zval *z_tab, **tmp; | |
char *type_response; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ src git:(cli_improved_bigkeys) ✗ time ./redis-cli --bigkeys | |
# Scanning the entire keyspace to find biggest keys as well as | |
# average sizes per key type. You can use -i 0.1 to sleep 0.1 sec | |
# per 100 SCAN commands (not usually needed). | |
[00.00%] Biggest hash found so far '530f8e1db5876:1:hash:146377' with 44 fields | |
[00.00%] Biggest list found so far '530f8ed14a8b0:17:list:269378' with 193 items | |
[00.00%] Biggest set found so far '530f8da537194:83:set:63043' with 432 members | |
[00.00%] Biggest string found so far '530f8f2de7045:95:string:333887' with 345 bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ src git:(cli_improved_bigkeys) ✗ time redis-cli --bigkeys | |
# Press ctrl+c when you have had enough of it... :) | |
# You can use -i 0.1 to sleep 0.1 sec per 100 SCANS | |
# in order to reduce server load (usually not needed). | |
Biggest hash found so far '530f8e1db5876:1:hash:146377' with 44 fields. | |
Biggest list found so far '530f8ed14a8b0:17:list:269378' with 193 items. | |
Biggest set found so far '530f8da537194:83:set:63043' with 432 members. | |
Biggest string found so far '530f8f2de7045:95:string:333887' with 345 bytes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('memory_limit','4G'); | |
$arr_args = getopt('', Array('file:', 'port:', 'step:', 'runs', 'name:')); | |
if(!isset($arr_args['file'])) { | |
die("Please pass an input filename of sets!\n"); | |
} | |
if(!isset($arr_args['port'])) { | |
die("Pass a port where redis-server is running!\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== REDIS BUG REPORT START: Cut & paste starting from here === | |
2100:M 11 Jul 12:18:14.922 # === ASSERTION FAILED === | |
2100:M 11 Jul 12:18:14.922 # ==> db.c:987 'j < argc' is not true | |
2100:M 11 Jul 12:18:14.922 # (forcing SIGSEGV to print the bug report.) | |
2100:M 11 Jul 12:18:14.922 # Redis 2.9.999 crashed by signal: 11 | |
2100:M 11 Jul 12:18:14.922 # Failed assertion: j < argc (db.c:987) | |
2100:M 11 Jul 12:18:14.922 # --- STACK TRACE | |
0 redis-server 0x000000010fc94f37 logStackTrace + 103 | |
1 redis-server 0x000000010fc9410f _redisAssert + 159 | |
2 libsystem_platform.dylib 0x00007fff824fb5aa _sigtramp + 26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include "hiredis.h" | |
#include <time.h> | |
/* Contrived arguments */ | |
const char* argv[] = { "ZUNIONSTORE", "out-set", "5", "one", "two", "three", "four", "five"}; | |
const size_t argvlen[] = {11, 6, 1, 3, 3, 5, 4, 4}; | |
const int argc = 8; | |
/* Runs to perform */ | |
const int N = 1000000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filter card Set count ZINTERUNION ZFILTERSTORE | |
1000 10 0.015698 0.002793 | |
2000 10 0.019613 0.005862 | |
3000 10 0.033271 0.010839 | |
4000 10 0.043977 0.013726 | |
5000 10 0.060546 0.014633 | |
6000 10 0.065888 0.018436 | |
7000 10 0.089333 0.025404 | |
8000 10 0.101332 0.030149 | |
9000 10 0.122370 0.025990 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#include <time.h> | |
#include <math.h> | |
#define DICT_HT_INITIAL_SIZE 4 | |
static unsigned long _dictNextPowerNew(unsigned long size) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ test clang -O2 -o pow2 pow2.c | |
➜ test ./pow2 36000000 | |
1000000 => old=0.015580; new=0.008266 [new faster by 0.007314] | |
1500000 => old=0.018460; new=0.011828 [new faster by 0.006632] | |
2000000 => old=0.027408; new=0.016054 [new faster by 0.011354] | |
2500000 => old=0.027412; new=0.024791 [new faster by 0.002621] | |
3000000 => old=0.036629; new=0.024436 [new faster by 0.012193] | |
3500000 => old=0.048103; new=0.032976 [new faster by 0.015127] | |
4000000 => old=0.049787; new=0.037055 [new faster by 0.012732] | |
4500000 => old=0.065063; new=0.044097 [new faster by 0.020966] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[top-secret@top-secret test]# cc -O2 pow2.c -o pow2 | |
[top-secret@top-secret test]# ./pow2 36000000 | |
1000000 => old=0.000000; new=0.010000 [old faster by 0.010000] | |
1500000 => old=0.020000; new=0.010000 [new faster by 0.010000] | |
2000000 => old=0.020000; new=0.010000 [new faster by 0.010000] | |
2500000 => old=0.030000; new=0.020000 [new faster by 0.010000] | |
3000000 => old=0.030000; new=0.030000 [old faster by 0.000000] | |
3500000 => old=0.030000; new=0.030000 [old faster by 0.000000] | |
4000000 => old=0.050000; new=0.030000 [new faster by 0.020000] | |
4500000 => old=0.050000; new=0.030000 [new faster by 0.020000] |
OlderNewer