git://git.onelab.eu
/
plstackapi.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
minidashboard, WIP
[plstackapi.git]
/
planetstack
/
monitor
/
monitordriver.py
1
# Implement this interface
2
# to serve as a driver for analytics
3
4
class DashboardStatistics(dict):
5
def __init__(self):
6
self['stat_list'] = []
7
self['average'] = 0
8
self['sum'] = 0
9
self['unit'] = 'units'
10
self['stat_list']=[]
11
# stat_list is a list of dicts
12
# [ {'timestamp': datetime, 'value': value} ]
13
14
15
class MonitorDriver:
16
def __init__(self):
17
pass
18
19
def get_meter(self, meter_name, obj, pk, credentials=None):
20
pass