Transpiled version (11177L) is out of date.
1 | sclass SingleThreadProfiler extends AbstractProfiler { |
2 | // config |
3 | settable Thread threadToSample = currentThread(); |
4 | |
5 | toString { |
6 | ret threadToSample == null |
7 | ? shortClassName(this) |
8 | : "Profiler for " + threadToSample; |
9 | } |
10 | |
11 | void stepImpl() { |
12 | samples++; |
13 | StackTraceElement[] stackTrace = threadToSample.getStackTrace(); |
14 | if (skipSleeping && !isThreadRunnable_x(stackTrace)) ret; |
15 | lock lock; |
16 | addSample(stackTrace); |
17 | } |
18 | |
19 | @Override void assertCanStart { assertNotNull(+threadToSample); } |
20 | } |
Began life as a copy of #1011686
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035050 |
Snippet name: | SingleThreadProfiler |
Eternal ID of this version: | #1035050/18 |
Text MD5: | f8670064be9d5c1668ea8dae53f8b462 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-11-30 11:59:49 |
Source code size: | 545 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 183 / 329 |
Version history: | 17 change(s) |
Referenced in: | [show references] |