Yossi Lev
2010-May-07 15:51 UTC
[dtrace-discuss] Pringting distributions/histograms (quantize) with printa
Hi
I wonder if I can use a printa statement with a format string to print a
quantize aggregation (that is, a histogram), and if so, what flag should I be
using in the format string for the histogram.
In particular, I''m interested in using a single printa statement to
print multiple aggregations that have the same keys, one of which is a quantize
aggregation. E.g:
@calls[this->func] = count();
@avTime[this->func] = avg(this->time);
@timeDist[this->func] = quantize(this->time);
...
END
{
printa("%s\t%@d\t???\n", @calls, @avTime, @timeDist);
}
I''m not sure what to put instead of the "???" above for the
histogram.
Thanks,
Yossi
--
This message posted from opensolaris.org
Yossi Lev
2010-May-08 14:33 UTC
[dtrace-discuss] Pringting distributions/histograms (quantize) with printa
Never mind, I figured this one out: apparently a simple %@d does the job. When combining with other aggregations, the histogram always breaks the line and begins in a line of its own, but it still looks fine. Thanks, Yossi -- This message posted from opensolaris.org