| 3 | |
| 4 | enable(); |
| 5 | class TestClass { |
| 6 | @profile('__func_decorator__') |
| 7 | doNothing() { |
| 8 | //noop |
| 9 | } |
| 10 | |
| 11 | @profile('__func_decorator_error__') |
| 12 | throwError() { |
| 13 | throw new Error('This error is expected'); |
| 14 | } |
| 15 | |
| 16 | @profile |
| 17 | unnamed1() { |
| 18 | // noop |
| 19 | } |
| 20 | |
| 21 | @profile() |
| 22 | unnamed2() { |
| 23 | // noop |
| 24 | } |
| 25 | |
| 26 | private isInReentrant = false; |
| 27 | |
| 28 | @profile |
| 29 | reentrant() { |
| 30 | try { |
| 31 | if (!this.isInReentrant) { |
| 32 | this.isInReentrant = true; |
| 33 | this.reentrant(); |
| 34 | } |
| 35 | } finally { |
| 36 | this.isInReentrant = false; |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | const testFunction1 = profile(function testFunction1() { |
| 42 | // noop |