Merge "proxy: Get rid of MetricsPrefixLoggerAdapter"

This commit is contained in:
Zuul
2023-09-11 05:10:00 +00:00
committed by Gerrit Code Review
10 changed files with 136 additions and 187 deletions

@ -85,7 +85,8 @@ class FakeStatsdClient(utils.StatsdClient):
counts = defaultdict(int)
for metric in self.get_increments():
counts[metric] += 1
return counts
# convert to normal dict for better failure messages
return dict(counts)
def get_update_stats(self):
return [call[0][:2] for call in self.calls['update_stats']]
@ -94,7 +95,8 @@ class FakeStatsdClient(utils.StatsdClient):
counts = defaultdict(int)
for metric, step in self.get_update_stats():
counts[metric] += step
return counts
# convert to normal dict for better failure messages
return dict(counts)
class CaptureLog(object):