coffeescript-rrd
coffeescript-rrd copied to clipboard
Tidy up output slightly
The current output format seem overly verbose:
[ { fieldNames: [ 'test-ds', 'test-two' ],
timestamp: '1317132300',
'test-ds': '-nan',
'test-two': '-nan' },
{ fieldNames: [ 'test-ds', 'test-two' ],
timestamp: '1317133200',
'test-ds': '-nan',
'test-two': '-nan' } ]
Technically, the fieldNames
is redundant, as they can be deducted from the actual data names:
[ { timestamp: '1317132300',
'test-ds': '-nan',
'test-two': '-nan' },
{ timestamp: '1317133200',
'test-ds': '-nan',
'test-two': '-nan' } ]
Otherwise, they could be added in a header (possibly along with other helpful meta-data):
{ fieldNames: ['test-ds', 'test-two']
firstTimestamp: '1317132300',
lastTimestamp: '1317133200',
data: {
// The usual data.
}
}