Skip to content
Wrapping Redis's sorted set APIs for specializing ranking operations.
PHP Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
sample
src/Matsubo/Redis
tests
.coveralls.yml
.gitignore
.travis.yml
.travis_redis.sh
README.md
composer.json
composer.lock
coverage-checker.php
phpunit.xml.dist

README.md

Ranking API for Redis

Coverage Status Build Status Stable Version Download Count

Requirements

Installation

  • Using composer
{
    "require": {
       "redis/ranking": "1.0.*"
    }
}
$ php composer.phar update redis/ranking --dev

Benchmark sample

% php sample/benchmark.php
Add: 18,350 queries/s
Update: 17,876 queries/s
Get score: 21,361 queries/s
Get rank: 22,123 queries/s
php sample/benchmark.php  1.50s user 2.96s system 43% cpu 10.203 total

How to run unit test

Run with default setting.

% vendor/bin/phpunit -c phpunit.xml.dist

Currently tested with PHP 7.0.0 + Redis 2.6.12.

TODO

  • Implement following APIs
    • zRemRangeByRank, zDeleteRangeByRank - Remove all members in a sorted set within the given indexes
    • zRemRangeByScore, zDeleteRangeByScore - Remove all members in a sorted set within the given scores
  • Implement zUnion API as a static helper API.

History

  • 1.1.0
    • Code Refactoring
    • Added PHP 7.0 support
    • Library update
    • Removed PHP5.3 and PHP5.4 compatibility
  • 1.0.1
    • bugfix: correct variable name.
    • supports travis CI and passed test.
  • 1.0.0
    • Published

License

It is released under the PHP License, version 3.01.

Copyright

You can’t perform that action at this time.