| Index: infra_libs/ts_mon/common/metric_store.py
|
| diff --git a/infra_libs/ts_mon/common/metric_store.py b/infra_libs/ts_mon/common/metric_store.py
|
| index c40333f7ae519ca58ca5c08425b60ae07fb1c776..5bb6c30681c1637394f55809b2ac168d3913dd88 100644
|
| --- a/infra_libs/ts_mon/common/metric_store.py
|
| +++ b/infra_libs/ts_mon/common/metric_store.py
|
| @@ -24,26 +24,6 @@ Modification = collections.namedtuple(
|
| 'Modification', ['name', 'fields', 'mod_type', 'args'])
|
|
|
|
|
| -def combine_modifications(old, new):
|
| - """Combines two modifications into one.
|
| -
|
| - The returned modification will be the result as if the second modification had
|
| - been applied after the first.
|
| - """
|
| -
|
| - if old is None or new.mod_type == 'set':
|
| - # A 'set' will override any previous value.
|
| - return new
|
| - elif new.mod_type == 'incr':
|
| - # For two 'incr's sum their delta args, for an 'incr' on top of a 'set' add
|
| - # the delta to the set value.
|
| - return Modification(
|
| - old.name, old.fields, old.mod_type,
|
| - (old.args[0] + new.args[0], old.args[1]))
|
| - else:
|
| - raise errors.UnknownModificationTypeError(new.mod_type)
|
| -
|
| -
|
| class MetricStore(object):
|
| """A place to store values for each metric.
|
|
|
|
|