File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11Redis memory analysis
22======
33
4- Analyzing memory of redis is to find the keys(prefix) which used a lot of memory.
4+ Analyzing memory of redis is to find the keys(prefix) which used a lot of memory, export the analysis result into csv file .
55
66## Requirements
77
@@ -21,13 +21,16 @@ composer require "hhxsv5/redis-memory-analysis:~1.0" -vvv
2121``` PHP
2222include '../vendor/autoload.php';
2323
24- $analyze = new \RMA\AnalyzeRedis('127.0.0.1', 6379, '123456');
24+ use Hhxsv5\RMA\AnalyzeRedis;
25+
26+ $analyze = new AnalyzeRedis('127.0.0.1', 6379);
2527
2628//Scan the keys which can be split by '#' '*' '|'
2729$analyze->start(['#', '*', '|']);
2830
2931//Find the csv file in default target folder: ./reports
30- //csv file name format: redis-analysis-{host}-{port}-{db}.csv
32+ //CSV file name format: redis-analysis-{host}-{port}-{db}.csv
33+ //The keys order by count desc
3134$analyze->saveReport();
3235```
3336
Original file line number Diff line number Diff line change 99$ analyze ->start (['# ' , '* ' , '| ' ]);
1010
1111//Find the csv file in default target folder: ./reports
12+ //CSV file name format: redis-analysis-{host}-{port}-{db}.csv
13+ //The keys order by count desc
1214$ analyze ->saveReport ();
You can’t perform that action at this time.
0 commit comments