Not sure what happened here, I guess I was much too focused on
cumulative counters and those earlier seen archive issues that
I became blind to this.
When reporting rate, the first output is N/A as rate can't be
calculated yet. But for everything else the value should be
printed already for the first sample.
(I didn't adjust QA yet, getting QA going on here is pretty
much next on my todo list.)
---
src/pmrep/pmrep.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py
index a885e2d..e04e23a 100644
--- a/src/pmrep/pmrep.py
+++ b/src/pmrep/pmrep.py
@@ -1231,15 +1231,15 @@ class PMReporter(object):
k += 1
# Raw or rate
- if not self.metrics[metric][3] and \
- (self.prevvals == None or list(self.prevvals[i])[j][2] ==
NO_VAL):
- # Rate not yet possible
- value = NO_VAL
- elif self.metrics[metric][3] or \
+ if self.metrics[metric][3] or \
self.descs[i].sem != PM_SEM_COUNTER or \
list(values[i])[j][2] == NO_VAL:
# Raw
value = list(values[i])[j][2]
+ elif not self.metrics[metric][3] and \
+ (self.prevvals == None or list(self.prevvals[i])[j][2] ==
NO_VAL):
+ # Rate not yet possible
+ value = NO_VAL
else:
# Rate
scale = 1
Thanks,
--
Marko Myllynen
|