Giter Site home page Giter Site logo

redis-look's Introduction

redis-look

โš ๏ธ This software is alpha quality.

Usage:
  redis-look-monitor.py
    --host,-h <host>                      (default: localhost)
    --port,-p <port>                      (default: 6379)
    --estimate-throughput,-e              (default: false)
    --estimate-throughput-limit,-l <num>  (default: 1000)
    --input-file <filename>               (default: None)
    --summary-number,-n <num>             (default: 5)

By default, the tool will connect to Redis and run MONITOR until Ctrl-C is pressed. It will then output the top operations for various dimensions. Note: MONITOR will negatively affect overall throughput, take care in production.

If --estimate-throughput is set, the tool will take the output from MONITOR and query DEBUG OBJECT for the top <limit> keys to get the serialized length. It will take the length returned and multiply it by the number of times accessed to get a rough estimate of the throughput required to service a key. Currently, the tool is not read/write aware, and it does not handle MGET properly which will affect the accuracy of the estimate.

Example

pip install requirements.txt
./redis-look-monitor.py -e
Connecting...
Issuing MONITOR...
Reading commands... 982 
^C 982 commands in 4.09 seconds (240.37 cmd/s) across 743 unique keys

* top by key

     count       avg/s      %  key
        32        7.83    3.3  _lock
         3        0.73    0.3  __raw__327
         3        0.73    0.3  __raw__553
         3        0.73    0.3  __raw__334
         3        0.73    0.3  __raw__113

* top by command

     count       avg/s      %  command
       636      155.68   64.8  SETEX
       104       25.46   10.6  LTRIM
       104       25.46   10.6  EXPIRE
       104       25.46   10.6  LPUSH
        32        7.83    3.3  EXISTS

* top by command and key

     count       avg/s      %  command and key
        32        7.83    3.3  EXISTS last_113
         1        0.24    0.1  SETEX last_999
         1        0.24    0.1  SETEX last_596
         1        0.24    0.1  LTRIM __raw__596
         1        0.24    0.1  SETEX __raw__621

Estimating throughput requirements for top 1000 keys...
* top by est. throughput

 est. bytes       count  throughput  throughput/s  key
       1.0M           3        3.0M          0.8K  __raw__222
       3.3K           3       10.0K          2.4K  __raw__103
       3.3K           3       10.0K          2.4K  __raw__990
       3.1K           3        9.4K          2.3K  __raw__327
       3.1K           3        9.4K          2.3K  __raw__553

TODO:

  • create module and upload to PyPI
  • fix various code TODOs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.