2017 © Pedro Peláez
 

library statistico

image

fieg/statistico

  • Thursday, June 16, 2016
  • by fieg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 35,972 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Statistico

Library to track statistics., (*1)

Build Status, (*2)

Installation

Using composer:, (*3)

composer require fieg/statistico:dev-master

Usage

Tracking statistics:, (*4)

use Fieg\Statistico\Statistico;

$redis = new \Redis();
$driver = new Fieg\Statistico\Driver\RedisDriver($redis);
$statistico = new Statistico($driver);

// increment
$statistico->increment('your.bucket.name'); // increments with 1

// gauge
$statistico->gauge('your.bucket.name', 500); // sets bucket value to 500

// timing
$statistico->timing('your.bucket.name', 300); // sets bucket value to 300ms

Reading statistics:, (*5)

use Fieg\Statistico\Reader;

$redis = new \Redis();
$driver = new Fieg\Statistico\Driver\RedisDriver($redis);
$reader = new Reader($driver);

// query counts from 7 days ago to now
$counts = $reader->queryCounts('your.bucket.name', 'seconds', new \DateTime('-7 days'), new \DateTime());

// $counts would now contain an array of (unix) timestamps and counts
// [[10000000, 4], [10000001, 6], ...]

// query timings from 7 days ago to now
$timings = $reader->queryTimings('your.bucket.name', 'seconds', new \DateTime('-7 days'), new \DateTime());

// query gauges from 7 days ago to now
$gauges = $reader->queryGauges('your.bucket.name', 'seconds', new \DateTime('-7 days'), new \DateTime());

Available granularities are: seconds, minutes, hours and days., (*6)

The Versions

16/06 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

16/06 2016

2.1.0

2.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

19/04 2016

2.0.3

2.0.3.0

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

03/11 2015

2.0.2

2.0.2.0

  Sources   Download

MIT

The Development Requires

05/10 2015

2.0.1

2.0.1.0

  Sources   Download

MIT

The Development Requires

03/07 2015

2.0

2.0.0.0

  Sources   Download

MIT

The Development Requires

30/10 2014

1.0

1.0.0.0

  Sources   Download

MIT

The Development Requires