Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1024097 // cumulativeObjectSizeByClass

JavaX fragment (include)

static Map<Class, Long> cumulativeObjectSizeByClass(Iterable l) {
  new Map<Class, Long> map;
  fOr (O o : l) {
    continue if o == null;
    Class c = o.getClass();
    map.put(c, toLong(map.get(c)) + unsafe_sizeOf2(o));
  }
  ret map;
}

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: #1024097
Snippet name: cumulativeObjectSizeByClass
Eternal ID of this version: #1024097/2
Text MD5: 97de440ca83e1787a0e890780e22a0fa
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 19:02:05
Source code size: 247 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 167 / 203
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)