launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25665
[Merge] ~pappacena/turnip:py3-metric-operation-format into turnip:master
Thiago F. Pappacena has proposed merging ~pappacena/turnip:py3-metric-operation-format into turnip:master.
Commit message:
Making metric operation name compatible with py3
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/393774
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/turnip:py3-metric-operation-format into turnip:master.
diff --git a/turnip/pack/git.py b/turnip/pack/git.py
index 5f9dde4..8647d03 100644
--- a/turnip/pack/git.py
+++ b/turnip/pack/git.py
@@ -328,31 +328,23 @@ class GitProcessProtocol(protocol.ProcessProtocol, object):
repository = re.sub(
'[^0-9a-zA-Z]+', '-',
six.ensure_text(self.peer.raw_pathname))
+ command = six.ensure_text(self.peer.command)
environment = config.get("statsd_environment")
gauge_name = (
"git,operation={},repo={},env={},metric=max_rss"
- .format(
- self.peer.command,
- repository,
- environment))
+ .format(command, repository, environment))
self.statsd_client.gauge(gauge_name, resource_usage['max_rss'])
gauge_name = (
"git,operation={},repo={},env={},metric=system_time"
- .format(
- self.peer.command,
- repository,
- environment))
+ .format(command, repository, environment))
self.statsd_client.gauge(gauge_name,
resource_usage['system_time'])
gauge_name = (
"git,operation={},repo={},env={},metric=user_time"
- .format(
- self.peer.command,
- repository,
- environment))
+ .format(command, repository, environment))
self.statsd_client.gauge(gauge_name,
resource_usage['user_time'])