summaryrefslogtreecommitdiff
path: root/jarmonbuild
diff options
context:
space:
mode:
authorRichard Wall <richard@largo>2010-08-28 22:34:26 +0100
committerRichard Wall <richard@largo>2010-08-28 22:34:26 +0100
commit333dfba10d99e5a2eec391c2481156329e2949dc (patch)
treef890b13f90e2d2b8dc0a3058542accc01e921846 /jarmonbuild
parent64f965d74374f3a15342bf6e807ac50513a69f68 (diff)
the start of a builder of simple, testable rrd files
Diffstat (limited to 'jarmonbuild')
-rw-r--r--jarmonbuild/commands.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/jarmonbuild/commands.py b/jarmonbuild/commands.py
index 5071a46..91b266a 100644
--- a/jarmonbuild/commands.py
+++ b/jarmonbuild/commands.py
@@ -185,10 +185,31 @@ class BuildReleaseCommand(BuildCommand):
z.close()
+class BuildTestDataCommand(object):
+ def __init__(self, buildversion):
+ self.log = logging.getLogger(
+ '%s.%s' % (__name__, self.__class__.__name__))
+
+ def main(self, argv):
+ from pyrrd.rrd import DataSource, RRA, RRD
+
+ dss = []
+ rras = []
+ filename = '/tmp/test.rrd'
+ dss.append(DataSource(dsName='speed', dsType='COUNTER', heartbeat=600))
+ rras.append(RRA(cf='AVERAGE', xff=0.5, steps=1, rows=24))
+ rras.append(RRA(cf='AVERAGE', xff=0.5, steps=6, rows=10))
+ my_rrd = RRD(filename, ds=dss, rra=rras, start=0)
+ my_rrd.create()
+ my_rrd.bufferValue(1, '12363')
+ my_rrd.bufferValue(2, '12363')
+ my_rrd.update()
+
# The available sub commands
build_commands = {
'apidocs': BuildApidocsCommand,
'release': BuildReleaseCommand,
+ 'testdata': BuildTestDataCommand,
}