-
Notifications
You must be signed in to change notification settings - Fork 6
Test
Ric Lister edited this page May 24, 2013
·
1 revision
The test source generates fake time-series data for fun and profit. Can also be used to generate sparse test events.
-
type
:test
-
target
: a fake name for the metric; can append&sparsity=0.5
to specify the sparsity of the data as a ratio
Dash.stats()
.add({
title: 'Fake data',
type: 'test',
target: 'foo.bar.baz&sparsity=0.2'
})
The .find()
method returns the number of fake metric names requested in the target
param.
Dash.stats()
.config({
type: 'test',
display: 'last'
})
.find({
type: 'test', // fake data
target: '3', // number of metrics to return
add: function(metric) {
return {
title: Dash.capitalize(metric.replace(/\./g, ' ')),
target: metric + '&sparsity=' + Math.random()
}
}
})
Use a very high sparsity to generate realistic events:
Dash.events()
.add(
{
title: 'FakeEvent',
type: 'test',
target: 'test.event&sparsity=0.98'
}
)