| To: | Marko Myllynen <myllynen@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [pcp] pmrep: tweak unit string |
| From: | Nathan Scott <nathans@xxxxxxxxxx> |
| Date: | Wed, 15 Jun 2016 21:45:24 -0400 (EDT) |
| Cc: | pcp developers <pcp@xxxxxxxxxxx> |
| Delivered-to: | pcp@xxxxxxxxxxx |
| In-reply-to: | <57619FD6.4030005@xxxxxxxxxx> |
| References: | <575EBA29.90508@xxxxxxxxxx> <1171690373.54525157.1465864675562.JavaMail.zimbra@xxxxxxxxxx> <57619FD6.4030005@xxxxxxxxxx> |
| Reply-to: | Nathan Scott <nathans@xxxxxxxxxx> |
| Thread-index: | T2St9IlUA1r7211KUP+NvhLsm0V+vw== |
| Thread-topic: | pmrep: tweak unit string |
Hi Marko,
----- Original Message -----
> [...]
>
> Ok, let's switch to the compact form, the change is trivial and it
> covers all the existing metrics (in fact the millisec case is only
> needed for a metric from the sample PMDA). Change to this direction
> doesn't require QA updates.
>
> ---
> src/pmrep/pmrep.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py
> index b330ca6..d73dda2 100755
> --- a/src/pmrep/pmrep.py
> +++ b/src/pmrep/pmrep.py
> @@ -739,7 +739,8 @@ class PMReporter(object):
> label = "util"
> self.metrics[metric][2] = (label, unitstr, mult)
> else:
> - self.metrics[metric][2] = (unitstr, unitstr, 1)
> + label = unitstr.replace(" / sec", "/s").replace(" /
> millisec", "/ms")
Hmm, there's several other possible strings there - src/libpcp/src/units.c
has the full list - need to deal with those too? (microsec, nanosec, etc)
cheers.
--
Nathan
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [pcp] pmrep: tweak unit string, Marko Myllynen |
|---|---|
| Next by Date: | Re: [pcp] Build fails in docker, Nathan Scott |
| Previous by Thread: | Re: [pcp] pmrep: tweak unit string, Marko Myllynen |
| Next by Thread: | Re: [pcp] pmrep: tweak unit string, Marko Myllynen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |