1 USING: byte-arrays calendar kernel math memory namespaces
2 random threads tools.profiler.sampling
3 tools.profiler.sampling.private tools.test sequences ;
4 IN: tools.profiler.sampling.tests
6 ! Make sure the profiler doesn't blow up the VM
8 { } [ 10 [ [ ] profile ] times ] unit-test
9 [ 10 [ [ boom new throw ] profile ] times ] [ boom? ] must-fail-with
10 { } [ 10 [ [ 100 [ 1000 random (byte-array) drop ] times gc ] profile ] times ] unit-test
11 { } [ 10 [ [ 100 [ 1000 random (byte-array) drop ] times compact-gc ] profile ] times ] unit-test
12 { } [ 2 [ [ 1 seconds sleep ] profile ] times ] unit-test
14 { } [ [ 300,000 iota [ sq sq sq ] map drop ] profile flat profile. ] unit-test
15 { } [ [ 300,000 iota [ sq sq sq ] map drop ] profile top-down profile. ] unit-test
18 f raw-profile-data set-global