Merge "carbonara: remove unused class"

This commit is contained in:
Jenkins 2016-08-09 16:30:32 +00:00 committed by Gerrit Code Review
commit 2df8f95f6e
1 changed files with 8 additions and 11 deletions

View File

@ -77,17 +77,7 @@ class UnknownAggregationMethod(Exception):
"Unknown aggregation method `%s'" % agg)
class SerializableMixin(object):
@classmethod
def unserialize(cls, data):
return cls.from_dict(msgpack.loads(data, encoding='utf-8'))
def serialize(self):
return msgpack.dumps(self.to_dict())
class TimeSerie(SerializableMixin):
class TimeSerie(object):
"""A representation of series of a timestamp with a value.
Duplicate timestamps are not allowed and will be filtered to use the
@ -185,6 +175,13 @@ class TimeSerie(SerializableMixin):
except IndexError:
return
@classmethod
def unserialize(cls, data):
return cls.from_dict(msgpack.loads(data, encoding='utf-8'))
def serialize(self):
return msgpack.dumps(self.to_dict())
class BoundTimeSerie(TimeSerie):
def __init__(self, ts=None, block_size=None, back_window=0):