2 # SPDX-License-Identifier: GPL-2.0
10 proc
= subprocess
.Popen(['sleep', '2'])
11 kdamonds
= _damon_sysfs
.Kdamonds([_damon_sysfs
.Kdamond(
12 contexts
=[_damon_sysfs
.DamonCtx(
14 targets
=[_damon_sysfs
.DamonTarget(pid
=proc
.pid
)],
15 schemes
=[_damon_sysfs
.Damos(
16 access_pattern
=_damon_sysfs
.DamosAccessPattern(
17 nr_accesses
=[200, 200]))] # schemes
21 err
= kdamonds
.start()
23 print('kdamond start failed: %s' % err
)
26 while proc
.poll() == None:
27 err
= kdamonds
.kdamonds
[0].update_schemes_tried_bytes()
29 print('tried bytes update failed: %s' % err
)
32 if __name__
== '__main__':