v2 / vlib / v / slow_tests / profile / profile_test_2.v
23 lines · 19 sloc · 250 bytes · 6a32c810703f4ec0c39fe18298ebe6c40acac8f1
Raw
1import v.profile
2
3fn abc() {
4 eprintln(@FN)
5}
6
7fn main() {
8 profile.on(false)
9 for _ in 0 .. 3 {
10 abc()
11 }
12 println('>>>>>>>>>>')
13
14 profile.on(true)
15 abc()
16 profile.on(false)
17
18 println('>>>>>>>>>>')
19 for _ in 0 .. 3 {
20 abc()
21 }
22 profile.on(true)
23}
24