Libraryless. Click here for Pure Java version (16505L/119K).
1 | !7 |
2 | |
3 | sclass ModuleInfo { |
4 | S name; |
5 | long code, data; |
6 | } |
7 | |
8 | module ModuleRAMSizes extends DynObjectTable<ModuleInfo> { |
9 | start { |
10 | itemToMap = func(ModuleInfo m) -> Map { |
11 | litorderedmap( |
12 | Name := m.name, |
13 | "Code (+submodules)" := str_toM_questionMarkIfZero(m.code), |
14 | "Data" := str_toM_questionMarkIfZero(m.data), |
15 | "Sum" := str_toM_questionMarkIfZero(m.code + m.data)) |
16 | }; |
17 | |
18 | doEvery(dm_osStarting() ? 10.0 : 0.0, 60.0, r calcIt); |
19 | } |
20 | |
21 | void calcIt { |
22 | temp enter(); |
23 | new L<ModuleInfo> l; |
24 | time "Calculate Module Sizes" { |
25 | for (O mod : dm_listModules()) { |
26 | long code = 0, data = 0; |
27 | pcall-short { code = dm_moduleCodeSizeWithSubModules(mod); } |
28 | pcall-short { data = dm_moduleSize_debug(mod); } |
29 | l.add(nu(ModuleInfo, |
30 | name := dm_moduleName(mod), |
31 | +code, |
32 | +data)); |
33 | } |
34 | } |
35 | setData(sortedByCalculatedFieldDesc(func(ModuleInfo m) { m.code+m.data }, l)); |
36 | } |
37 | } |
Began life as a copy of #1018937
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: | #1022104 |
Snippet name: | Module RAM Sizes v3, debug version |
Eternal ID of this version: | #1022104/3 |
Text MD5: | f19f533497c04665e0ae6a9a5ec49c3b |
Transpilation MD5: | b320d73fa963f92853449896e8edece3 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-07 22:16:48 |
Source code size: | 1010 bytes / 37 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 275 / 492 |
Version history: | 2 change(s) |
Referenced in: | [show references] |