Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
v0.1.1 (#6)
Browse files Browse the repository at this point in the history
* Upgrade go-redis
* Update docs
  • Loading branch information
31z4 authored Sep 16, 2017
1 parent aa1dac6 commit 16202d9
Show file tree
Hide file tree
Showing 22 changed files with 487 additions and 326 deletions.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing to `harvest`

Found a bug in our code, or have an idea for a feature? Awesome, here are some notes on how to best report them so we can get it fixed as quickly as possible.

All members of our community are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md). Please make sure you are welcoming and friendly in all of our spaces.

## Filing issues

***Any security issues should be submitted directly to
<[email protected]>***

When [filing an issue](https://github.com/31z4/harvest/issues/new), make sure to answer these questions:

1. What version of `harvest` and Redis are you using?
2. What `harvest` command did you run?
3. What did you expect to see?
4. What did you see instead?

## Contributing code

Let us know if you are interested in working on an issue by leaving a comment on the issue in GitHub. This helps avoid multiple people unknowingly working on the same issue.

* Include tests if your patch is supposed to solve a bug, and explain clearly under which circumstances the bug happens. Make sure the test fails without your patch.
* All submissions require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@

# Harvest

`harvest` helps you understand what's inside your Redis. It samples Redis keys and returns some insightful stats. It particular it aims to answer two simple questions that are hard to answer using existing tools. The questions are:

1. What are top 10 key prefixes?
2. What are top 10 most memory consuming keys?

Answers to these questions should help you figure out why your Redis has suddenly started to eat so much memory or even reached its capacity.
`harvest` helps you understand what's inside your Redis. It samples Redis keys and shows top key prefixes.

The tool is designed to be simple and efficient. It does not require Redis [`DEBUG OBJECT`](https://redis.io/commands/debug-object) command to be available. Which is good if you're using AWS ElastiCache.

`harvest` should work with any version of Redis. Although, it's tested only with the latest stable version.

## Usage

Here is an example of how to use `harvest` with Docker and understand its output. Assuming Redis container name is `redis` and it listens on a standard port `6379`.
Here is an example of how to use `harvest` and understand its output. Assuming Redis hostname is `redis` and it listens on a standard port `6379`.

```console
$ docker run --link redis:redis -it --rm 31z4/harvest redis://redis
$ harvest redis://redis
warning: database size (12) is less than the number of samples (1000)

_kombu.binding.: 33.98% (648)
Expand All @@ -33,17 +30,25 @@ _kombu.binding.celery.pidbox: 4.72% (90)
_kombu.binding.celeryev: 4.46% (85)
```

The first line of the output warns us that the number of samples is greater than the database size. Which basically means that results may be more inaccurate.
The first line of the output warns us that the number of samples is greater than the database size. Which basically means that each key will be sampled multiple times. In future releases [`SCAN`](https://redis.io/commands/scan) will be used instead of [`RANDOMKEY`](https://redis.io/commands/randomkey) in that case.

The second line tells that from `1000` randomly sampled keys `648` start from `_kombu.binding.` and it's `33.98%` of all samples. The rest of the lines follow same pattern.

### Docker

You can use [31z4/harvest](https://hub.docker.com/r/31z4/harvest/) Docker image to run the tool. Assuming Redis container name is `redis` and it listens on a standard port `6379`.

```console
$ docker run --link redis:redis -it --rm 31z4/harvest redis://redis
```

## Feedback

Feedback is greatly appreciated. At this stage, the maintainers are most interested in feedback centered on the user experience (UX) of the tool. Do you have cases that the tool supports well, or doesn't support at all? Do any of the commands have surprising effects, output, or results?

## Contributing

Contributions are greatly appreciated. The maintainers actively manage the issues list, and try to highlight issues suitable for newcomers. The project follows the typical GitHub pull request model. Before starting any work, please either comment on an existing issue, or file a new one.
Contributions are greatly appreciated. The maintainers actively manage the issues list, and try to highlight issues suitable for newcomers. The project follows the typical GitHub pull request model. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details. Before starting any work, please either comment on an existing issue, or file a new one.

## License

Expand Down
3 changes: 2 additions & 1 deletion vendor/github.com/go-redis/redis/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 16202d9

Please sign in to comment.