Changeset ddb2448 in tol
- Timestamp:
- Dec 9, 2014, 2:36:49 PM (12 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 88956f8
- Parents:
- e019cec
- Location:
- tol_tests/tol/Bugzilla/bug_001815
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol_tests/tol/Bugzilla/bug_001815/chk.tol
re019cec rddb2448 1 Real nObj0 = Copy(NObject); 2 Real nCor0 = Copy(NCore); 1 Set optionDef = 2 {[[ 3 Set WordLebgth = [[8,16,24]]; 4 Set SetCard = [[10,100,1000]]; 5 Set Repeat = [[10,20,30]]; 6 Set Searches = [[1000,5000,10000]] 7 ]]}; 3 8 4 Set listado = For(1, 1000, Anything (Real i) { 5 Text name = SetSum(For(1, 10, Text (Real j) { Char(Rand(97,122)) })); 6 PutName(name, i) 9 Set options = Group("CartProd",optionDef); 10 11 //Real k = 1; 12 //Set opt = options[k]; 13 14 Set checkInfo = EvalSet(options,Set(Set opt) 15 { 16 Real WordLebgth = opt[1]; 17 Real SetCard = opt[2]; 18 Real Repeat = opt[3]; 19 Real Searches = opt[4]; 20 WriteLn("Checking "<<opt); 21 Text target = Sub("abcdefghijklmnopqrstuvxyz",1,WordLebgth); 22 Text listado.target = "listado::"+target; 23 24 Real nObj0 = Copy(NObject); 25 Real nCor0 = Copy(NCore); 26 Real t0 = Copy(Time); 27 Set mem0 = MemoryStatus(?); 28 29 Set listado = For(1, SetCard, Text (Real i) { 30 Text name = SetSum(For(1, WordLebgth, Text (Real j) { Char(Rand(97,122)) })); 31 PutName(name, name) 32 }); 33 Real SetIndexByName(listado); 34 35 36 Real nObj1 = Copy(NObject); 37 Real nCor1 = Copy(NCore); 38 Real t1 = Copy(Time); 39 Set mem1 = MemoryStatus(?); 40 41 Set For(1, Repeat, Real (Real n) { 42 SetSum(For(1, Searches, Real (Real i) { 43 ObjectExist("Text", listado.target) 44 })) 45 }); 46 47 Real nObj2 = Copy(NObject); 48 Real nCor2 = Copy(NCore); 49 Real t2 = Copy(Time); 50 Set mem2 = MemoryStatus(?); 51 52 Set For(1, Repeat, Real (Real n) { 53 SetSum(For(1, Searches, Real (Real i) { 54 FindIndexByName(listado, target) 55 })) 56 }); 57 58 Real nObj3 = Copy(NObject); 59 Real nCor3 = Copy(NCore); 60 Real t3 = Copy(Time); 61 Set mem3 = MemoryStatus(?); 62 63 Set info = [[ 64 Real WordLebgth; 65 Real SetCard; 66 Real Repeat; 67 Real Searches; 68 Real TotSearches = Repeat*Searches; 69 Real OE.obj = nObj2-nObj1; 70 Real FI.obj = nObj3-nObj2; 71 Real OE.cor = nCor2-nCor1; 72 Real FI.cor = nCor3-nCor2; 73 Real OE.mem = mem1::AvailVirtual-mem2::AvailVirtual; 74 Real FI.mem = mem2::AvailVirtual-mem3::AvailVirtual; 75 Real OE.time = t2-t1; 76 Real FI.time = t3-t2 77 ]] 7 78 }); 79 80 /* */ 8 81 9 Real nObj1 = Copy(NObject);10 Real nCor1 = Copy(NCore);11 Set For(1, 10, Real (Real n) {12 SetSum(For(1, 100000, Real (Real i) {13 ObjectExist("Anything", "listado::abcdefgh")14 }))15 }); // incremento de unos 55500 KB de RAM16 Real nObj2 = Copy(NObject);17 Real nCor2 = Copy(NCore);18 19 Set For(1, 10, Real (Real n) {20 SetSum(For(1, 100000, Real (Real i) {21 FindIndexByName(listado, "abcdefgh")22 }))23 }); // no se aprecia incremento de RAM24 25 Real nObj3 = Copy(NObject);26 Real nCor3 = Copy(NCore);27
Note: See TracChangeset
for help on using the changeset viewer.
