doc/SystemTap_Beginners_Guide/testsuite/systemtap.maps/linear_over.stp
raw| 1 | # test of histogram where all the values are |
| 2 | # over the histogram |
| 3 | |
| 4 | global agg |
| 5 | |
| 6 | probe begin |
| 7 | { |
| 8 | # Add items to the aggregate |
| 9 | for (key=1000; key < 10000; key++) { |
| 10 | agg <<< key |
| 11 | } |
| 12 | |
| 13 | printf("count=%d\n", @count(agg)) |
| 14 | printf("sum=%d\n", @sum(agg)) |
| 15 | printf("min=%d\n", @min(agg)) |
| 16 | printf("max=%d\n", @max(agg)) |
| 17 | printf("avg=%d\n", @avg(agg)) |
| 18 | printf("variance=%d\n", @variance(agg)) |
| 19 | |
| 20 | print(@hist_linear(agg, 0, 100, 10)) |
| 21 | |
| 22 | exit() |
| 23 | } |