diff options
author | fche <fche> | 2007-09-22 16:45:13 +0000 |
---|---|---|
committer | fche <fche> | 2007-09-22 16:45:13 +0000 |
commit | 2fa08ae4a89a80af291bca046626b035be0ea569 (patch) | |
tree | 5b8f826879b91c28dfc5db474ecd8920613ad291 /testsuite/systemtap.maps/linear_nearlyempty.stp | |
parent | 051286ecc4321199897351004dca9a84760c2cec (diff) | |
download | systemtap-steved-2fa08ae4a89a80af291bca046626b035be0ea569.tar.gz systemtap-steved-2fa08ae4a89a80af291bca046626b035be0ea569.tar.xz systemtap-steved-2fa08ae4a89a80af291bca046626b035be0ea569.zip |
PR 5057: histogram zero elision
2007-09-22 Frank Ch. Eigler <fche@elastic.org>
PR 5057.
* stat-common.c (_stp_stat_print_histogram): Elide consecutive
zero rows beyond 2*STAT_ELISION+1.
(STAT_ELISION): New parameter, default 2.
2007-09-22 Frank Ch. Eigler <fche@elastic.org>
PR 5057.
* systemtap.maps/linear_nearlyempty.*: New test for
histogram printing elision.
Diffstat (limited to 'testsuite/systemtap.maps/linear_nearlyempty.stp')
-rw-r--r-- | testsuite/systemtap.maps/linear_nearlyempty.stp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/systemtap.maps/linear_nearlyempty.stp b/testsuite/systemtap.maps/linear_nearlyempty.stp new file mode 100644 index 00000000..f0b70607 --- /dev/null +++ b/testsuite/systemtap.maps/linear_nearlyempty.stp @@ -0,0 +1,18 @@ +# test that we can check the count of an empty array + +global agg + +probe begin +{ + agg <<< 444 + agg <<< 999 + printf("count=%d\n", @count(agg)) + if (@count(agg) > 0) { + printf("sum=%d\n", @sum(agg)) + printf("min=%d\n", @min(agg)) + printf("max=%d\n", @max(agg)) + printf("avg=%d\n", @avg(agg)) + print(@hist_linear(agg, 0, 1500, 50)) + } + exit() +} |