From 8ecca5bae4ccdd9af021ba6af3fa5c8bd26c34be Mon Sep 17 00:00:00 2001 From: hunt Date: Fri, 6 Jul 2007 19:03:12 +0000 Subject: 2007-07-06 Martin Hunt * systemtap.maps/linear*: New tests of linear histograms. --- testsuite/systemtap.maps/linear_empty.stp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 testsuite/systemtap.maps/linear_empty.stp (limited to 'testsuite/systemtap.maps/linear_empty.stp') diff --git a/testsuite/systemtap.maps/linear_empty.stp b/testsuite/systemtap.maps/linear_empty.stp new file mode 100644 index 00000000..f20bf470 --- /dev/null +++ b/testsuite/systemtap.maps/linear_empty.stp @@ -0,0 +1,16 @@ +# test that we can check the count of an empty array + +global agg + +probe begin +{ + 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() +} -- cgit