Libraryless. Click here for Pure Java version (5807L/33K).
1 | sS profileThisThreadToString(int interval default poorMansProfiling_defaultInterval(), Runnable r) { |
2 | poorMansProfiling(interval, currentThread()); |
3 | pcall { |
4 | r.run(); |
5 | } |
6 | ret poorMansProfiling_stopAndRenderResults(); |
7 | } |
8 | |
9 | static <A> Pair<A, S> profileThisThreadToString(int interval default poorMansProfiling_defaultInterval(), IF0<A> f) { |
10 | new Var<A> var; |
11 | S profile = profileThisThreadToString(interval, r { var.set(callF(f)) }); |
12 | ret pair(var!, profile); |
13 | } |
Began life as a copy of #1021947
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022009 |
Snippet name: | profileThisThreadToString - takes a Runnable or IF0 |
Eternal ID of this version: | #1022009/5 |
Text MD5: | 238e5d8242ce40b2ef5e6e054d94f7b1 |
Transpilation MD5: | 1d4dd3eb3c93cae969c28cb12fb05a50 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-06 01:04:56 |
Source code size: | 479 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 299 / 387 |
Version history: | 4 change(s) |
Referenced in: | [show references] |