Skip to content

Commit

Permalink
Merge pull request #255 from DataDog/sum_dogstream_counters
Browse files Browse the repository at this point in the history
Sum Dogstream Counters
  • Loading branch information
conorbranagan committed Nov 27, 2012
2 parents ba01fc3 + c5bf8dc commit a1408fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion checks/datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _aggregate(self, values):
if metric_type == 'gauge':
val = float(val)
elif metric_type == 'counter':
val = int(val)
val = sum(vals)

output.append((metric, timestamp, val, attributes))

Expand Down
4 changes: 2 additions & 2 deletions tests/test_datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def test_dogstream_counter(self):

expected_output = {
"dogstream": [
('test.metric.a', 1000000000, 5, self.counter),
('test.metric.a', 1000000005, 8, self.counter),
('test.metric.a', 1000000000, 42, self.counter),
('test.metric.a', 1000000005, 27, self.counter),
]
}

Expand Down

0 comments on commit a1408fa

Please sign in to comment.