diff options
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() +} |