1 | sclass countDispatch_Data { |
2 | int running; |
3 | long invocations, totalTime; |
4 | } |
5 | |
6 | static Map<S, countDispatch_Data> countDispatch_map = synchroMap(); |
7 | |
8 | static Closeable countDispatch(fS methodName) { |
9 | countDispatch_Data data; |
10 | synchronized(countDispatch_map) { |
11 | data = countDispatch_map.get(methodName); |
12 | if (data == null) countDispatch_map.put(methodName, data = new countDispatch_Data); |
13 | } |
14 | data.running++; |
15 | final countDispatch_Data _data = data; |
16 | final long time = sysNow(); |
17 | ret new Closeable { public void close { |
18 | _data.totalTime += sysNow()-time; |
19 | _data.running--; |
20 | _data.invocations++; |
21 | }}; |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014337 |
Snippet name: | countDispatch |
Eternal ID of this version: | #1014337/2 |
Text MD5: | 980ada37212057dd4a5a6a2e42505602 |
Author: | stefan |
Category: | javax / monitoring |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-20 05:04:59 |
Source code size: | 638 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 405 / 432 |
Version history: | 1 change(s) |
Referenced in: | [show references] |