1 IN: tools.profiler.tests
2 USING: tools.profiler tools.test kernel memory math threads
3 alien tools.profiler.private sequences ;
6 \ length profile-counter
7 10 [ { } length drop ] times
8 \ length profile-counter =
11 [ ] [ [ 10 [ gc ] times ] profile ] unit-test
13 [ ] [ [ 1000 sleep ] profile ] unit-test
15 [ ] [ profile. ] unit-test
17 [ ] [ vocabs-profile. ] unit-test
19 [ ] [ "kernel.private" vocab-profile. ] unit-test
21 [ ] [ \ + usage-profile. ] unit-test
23 : callback-test "void" { } "cdecl" [ ] alien-callback ;
25 : indirect-test "void" { } "cdecl" alien-indirect ;
30 [ ] [ callback-test indirect-test ] unit-test
34 [ 1 ] [ \ foobar profile-counter ] unit-test
36 : fooblah { } [ ] each ;
38 : foobaz fooblah fooblah ;
42 [ 1 ] [ \ foobaz profile-counter ] unit-test
44 [ 2 ] [ \ fooblah profile-counter ] unit-test