summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.maps/linear_under.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.maps/linear_under.stp')
-rw-r--r--testsuite/systemtap.maps/linear_under.stp22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/systemtap.maps/linear_under.stp b/testsuite/systemtap.maps/linear_under.stp
new file mode 100644
index 00000000..59566cf0
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_under.stp
@@ -0,0 +1,22 @@
+# test of histogram where all the values are
+# under the start of the histogram
+
+global agg
+
+probe begin
+{
+ # Add items to the aggregate
+ for (key=0; key < 100; key++) {
+ agg <<< key
+ }
+
+ 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, 1800, 2500, 100))
+
+ exit()
+}