Libraryless. Click here for Pure Java version (2546L/17K).
1 | static Pair<guessDeepObjectSize_recursive_Data, Long> estimateWebBotSize(O o) { |
2 | Collection<S> fields = fields(o); |
3 | new L l; |
4 | for (S field : fields) { |
5 | if (sizeCalculation_shouldIgnoreProgramField(field)) continue; |
6 | O value = get(o, field); |
7 | if (value == null) continue; |
8 | l.add(value); |
9 | } |
10 | |
11 | O[] array = asObjectArray(l); |
12 | new guessDeepObjectSize_recursive_Data data; |
13 | data.seen.add(o); |
14 | ret pair(data, |
15 | guessDeepObjectSize_recursive(data, array) |
16 | -inMemorySizeOfArray(array) |
17 | +unsafe_sizeOf(o)); |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024089 |
Snippet name: | estimateWebBotSize [might work] |
Eternal ID of this version: | #1024089/11 |
Text MD5: | a53677d3990496732c71ed96db3cce79 |
Transpilation MD5: | 235916fec9e706f01229eb3cabd10eb0 |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-20 18:56:43 |
Source code size: | 549 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 196 / 303 |
Version history: | 10 change(s) |
Referenced in: | [show references] |