summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples/transport2.stp
blob: 1de90768ce41ea24c006bae0626aabdd91ce2167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This script tests normal logging - it logs a larger amount of data
# in each probe hit, enough to fill up the staging buffers, so it
# should detect anomalies in flushing the staging buffers.

global maxcount
global count
global n

function write_output()
{
	for (i = 0; i < n; i++)
		log("[".sprint(count++)."] testing 123, testing, testing. testing 123, testing, testing")
}

probe timer.jiffies(5)
{
	write_output();
	if (count >= maxcount)
		exit()
}

probe begin
{
	count = 1
	n = 500
	maxcount = 10000
}

probe end
{
	log("total records written: ".sprint(count - 1))
	log("records per iteration: ".sprint(n))
}