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

8
LINES

< > BotCompany Repo | #1029241 // test_recursiveObjectSizeWithManagedObjects

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5057L/33K).

1  
svoid test_recursiveObjectSizeWithManagedObjects() {
2  
  new RecursiveObjectSize ros;
3  
  ManagedIntObjects_v1 mo = new(1024*1024);
4  
  long size = print(size := ros.recurse(mo));
5  
  assertTrue(ros.hasSeen(mo.mem));
6  
  assertTrue(size > 1024*1024*4);
7  
  assertTrue(size < 1024*1024*5);
8  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029241
Snippet name: test_recursiveObjectSizeWithManagedObjects
Eternal ID of this version: #1029241/4
Text MD5: eed9ef8406c73b7857433114d8440653
Transpilation MD5: 3d43fa1f9f4d6a22bda599908044c682
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-26 23:29:53
Source code size: 285 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 164 / 252
Version history: 3 change(s)
Referenced in: [show references]