Not a quirk at all -- a bug. Any aggregate operator (as the top
left-most node in the expression tree) returning a scalar value would
suffer the same way.
I have a fix that I'll push once it passes all the rest of the pcp qa.
Here's the output for your failure case augmented with a few more test
cases ...
Fri Jan 30 18:14:10 2009: TEST1: Left-most single value: v=0.23
Fri Jan 30 18:14:10 2009: TEST2: Left-most sum_inst: v=0.52
Fri Jan 30 18:14:10 2009: TEST3: Left-most max_inst: v=0.23
Fri Jan 30 18:14:10 2009: TEST4: Left-most min_inst: v=0.12
Fri Jan 30 18:14:10 2009: TEST5: Left-most avg_inst: v=0.173333
Fri Jan 30 18:14:11 2009: TEST1: Left-most single value: v=0.23
Fri Jan 30 18:14:11 2009: TEST2: Left-most sum_inst: v=0.52
Fri Jan 30 18:14:11 2009: TEST3: Left-most max_inst: v=0.23
Fri Jan 30 18:14:11 2009: TEST4: Left-most min_inst: v=0.12
Fri Jan 30 18:14:11 2009: TEST5: Left-most avg_inst: v=0.173333
Fri Jan 30 18:14:11 2009: TEST6: Left-most max_sample: v=0.23
Fri Jan 30 18:14:11 2009: TEST7: Left-most min_sample: v=0.23
On Thu, 2009-01-29 at 15:24 +1100, Nathan Scott wrote:
> Hi all,
>
> Is there any way to extract the value from a sum_inst()
> expression in pmie? Seems to fail to print anything in
> case where a sum_inst is the left-most-expression...?
> (not even the rest of the string, let alone the value
> which is what I really wanted).
>
> A contrived example follows:
>
> $ cat sumbug
> test1 = (kernel.all.load #'1 minute') < sum_inst(kernel.all.load)
> -> print "TEST1: Left-most expression: v=%v h=%h";
> test2 = sum_inst(kernel.all.load) >= (kernel.all.load #'1 minute')
> -> print "TEST2: Left-most expression: v=%v h=%h";
>
> $ pmie -c sumbug -v -t1
> Thu Jan 29 15:23:03 2009: TEST1: Left-most expression: v=2.15 h=edge
> Thu Jan 29 15:23:03 2009: (null)
> test1: true
> test2: true
> ...
>
>
> cheers.
>
> --
> Nathan
>
> _______________________________________________
> pcp mailing list
> pcp@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/pcp
|