class Entry

A adaptive, multi-scale compressed time series of event counter buckets

Properties

$timestart The earliest time for the first bucket - default first entry
$maxlen The default maximum length of a serialized set of buckets
$scale The scale in seconds
$total The total number of clicks
$buckets The buckets key->value

Methods

__construct($timestart = null, $scale = 900, $maxlen = 1024)

No description

click($time = null)

Record a click.

reconstruct()

Reconstruct to the actual times

viewModel()

Produce an view model of the entire object

reScale($factor = 2)

Double the Scale - Return copy of new buckets

static 
uncompressEntry($text)

Optionally uncompress a serialized entry if it is compressed

deSerialize($data)

De-Serialize scale, timestart and buckets (can be compressed)

serialize($maxlength = null, $compress = false)

Serialize to a key=value pair

Details

at line 39
__construct($timestart = null, $scale = 900, $maxlen = 1024)

Parameters

$timestart
$scale
$maxlen

at line 48
click($time = null)

Record a click.

..

Parameters

$time

at line 67
reconstruct()

Reconstruct to the actual times

at line 82
viewModel()

Produce an view model of the entire object

This is a "view model" in that it is intended to be easily used in rendering situations.

at line 108
reScale($factor = 2)

Double the Scale - Return copy of new buckets

Parameters

$factor

at line 128
static uncompressEntry($text)

Optionally uncompress a serialized entry if it is compressed

Parameters

$text

at line 147
deSerialize($data)

De-Serialize scale, timestart and buckets (can be compressed)

Does not set total

Parameters

$data

at line 166
serialize($maxlength = null, $compress = false)

Serialize to a key=value pair

Parameters

$maxlength
$compress