redis-xkeys

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2021 License: BSD-3-Clause Imports: 16 Imported by: 0

README

redis-key-stats

A command line tools for statistic of redis keys based on scan command

How to get

go get -u github.com/ko-han/redis-key-stats

Example

» redis-cli set 1_a aa
OK
» redis-key-stats '(.*)_a' '$1'
#pattern number
a 1

scan keys: 1, spend: 1.881753ms
» ./redis-key-stats --help
Usage: main [Options...] pattern replace

patter is an regex expression and replace is key statistic group result. 
See an example of group keys by it's prefix:
pattern is '(.*)_.*' and replace is '$1'

Options:
  -a string
        Password to use when connecting to the server
  -h string
        Server hostname (default "localhost")
  -m string
        Redis scan match pattern
  -max uint
        Max keys to scan (default 18446744073709551615)
  -p int
        Server port (default 6379)
  -r uint
        Retry times (default 10)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL