Skip to content

PHP library to store time series analytics data into Redis

Notifications You must be signed in to change notification settings

acostes/php-redis-timeseries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Redis TimeSeries Build Status

PHP library to store time series analytics data into Redis

Install

    composer require acostes/php-redis-timeseries

Usage

    use RedisAnalytics\TimeSeries;

    // You also can add parameters to the constructor to connect to your redis intance
    // __construct($host = '127.0.0.1', $port = '6379', $database = 0)
    $ts = new TimeSeries();

    // Add a new entry to you key at a specific timestamp
    $ts->add($myKey, $timestamp, $value);

    // Retrieve all data for a specific interval $from / $to
    $ts->get($myKey, $from, $to);

Dependencies

  • PHP >= 5.6
  • Redis >= 2.6

Author

License

The code for Redistats is distributed under the terms of the MIT license (see LICENSE).

About

PHP library to store time series analytics data into Redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages