Skip to content

Commit 27d3f9f

Browse files
author
XieBiao
committed
fix demo
1 parent 60a05d9 commit 27d3f9f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Redis 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
2222
include '../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

examples/test.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
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();

0 commit comments

Comments
 (0)