summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.maps/linear_empty.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.maps/linear_empty.stp')
-rw-r--r--testsuite/systemtap.maps/linear_empty.stp16
1 files changed, 16 insertions, 0 deletions
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()
+}