From c04d7a74fef8a5e9751db280ebfdf8245694d0e0 Mon Sep 17 00:00:00 2001 From: hunt Date: Fri, 21 Sep 2007 19:11:41 +0000 Subject: 2007-09-21 Martin Hunt * systemtap.maps/linear*: Updated linear histogram tests. --- testsuite/systemtap.maps/linear_overunder.stp | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 testsuite/systemtap.maps/linear_overunder.stp (limited to 'testsuite/systemtap.maps/linear_overunder.stp') diff --git a/testsuite/systemtap.maps/linear_overunder.stp b/testsuite/systemtap.maps/linear_overunder.stp new file mode 100644 index 00000000..3350f982 --- /dev/null +++ b/testsuite/systemtap.maps/linear_overunder.stp @@ -0,0 +1,33 @@ +global agg + +probe begin +{ + # Add items to the aggregate + for (key=0; key < 100; key++) { + agg <<< key + agg <<< key * 2 + agg <<< key * 3 + agg <<< key * 4 + agg <<< key * 5 + agg <<< key * 6 + agg <<< key * 7 + agg <<< key * 8 + agg <<< key * 9 + agg <<< key * 10 + agg <<< key * 11 + agg <<< key * 12 + agg <<< key * 12 + agg <<< key * 13 + agg <<< key * 14 + agg <<< key * 15 + } + + printf("count=%d\n", @count(agg)) + 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, 250, 1000, 50)) + + exit() +} -- cgit