File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,17 @@ type Report struct {
1717 AvgTtl uint64
1818}
1919
20+ type DBReports map [uint64 ][]Report
21+
22+ type KeyReports map [string ]Report
23+
24+ type SortReports []Report
25+
2026type Analysis struct {
2127 redis * RedisClient
22- Reports map [ uint64 ][] Report
28+ Reports DBReports
2329}
2430
25- type SortReports []Report
26-
2731func (sr SortReports ) Len () int {
2832 return len (sr )
2933}
@@ -37,7 +41,7 @@ func (sr SortReports) Swap(i, j int) {
3741}
3842
3943func NewAnalysis (redis * RedisClient ) * Analysis {
40- return & Analysis {redis , map [ uint64 ][] Report {}}
44+ return & Analysis {redis , DBReports {}}
4145}
4246
4347func (analysis Analysis ) Start (delimiters []string , limit uint64 ) {
@@ -52,12 +56,12 @@ func (analysis Analysis) Start(delimiters []string, limit uint64) {
5256 ttl int64
5357 length uint64
5458 sr SortReports
55- mr map [ string ] Report
59+ mr KeyReports
5660 )
5761
5862 for db , _ := range databases {
5963 cursor = 0
60- mr = map [ string ] Report {}
64+ mr = KeyReports {}
6165
6266 analysis .redis .Select (db )
6367
You can’t perform that action at this time.
0 commit comments