This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Dealing with empty aggregates?
- From: "Bryn M. Reeves" <bmr at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Thu, 19 May 2011 15:46:09 +0100
- Subject: Re: Dealing with empty aggregates?
- References: <4DD4FF2A.2060809@redhat.com> <y0moc2yzrik.fsf@fche.csb>
On 05/19/2011 03:36 PM, Frank Ch. Eigler wrote:
> The canonical construct doesn't require a hand-maintained flag:
>
> probe timer.ms(1000) {
> if (@count(stuff))
> printf("Sum of stuff: %d\n", @sum(stuff))
> else
> printf("No stuff.")
> }
Exactly what I was looking for, thanks! A count is not especially useful for the
stuff I'm looking at (nfsd operations fwiw) and it didn't occur to me to gate on
count (obvious really since it's the only one defined on an empty aggregate.. duh!).
Cheers,
Bryn.