Skip to content

Commit

Permalink
Merge 2d626db into 1c0935b
Browse files Browse the repository at this point in the history
  • Loading branch information
williamjoy committed Mar 30, 2017
2 parents 1c0935b + 2d626db commit fd4076d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/collectors/mesos/mesos.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import json
import urllib2
from urlparse import urlparse
from collections import Counter

import diamond.collector

Expand Down Expand Up @@ -169,12 +170,7 @@ def _group_and_publish_tasks_statistics(self, result):
self._publish(r)

def _sum_statistics(self, x, y):
stats = set(x) | set(y)
summed_stats = {
key: x.get(key, 0) + y.get(key, 0)
for key in stats
}
return summed_stats
return dict(Counter(x) + Counter(y))

def _collect_slave_statistics(self):
result = self._get('monitor/statistics')
Expand Down

0 comments on commit fd4076d

Please sign in to comment.