Changeset: 5e9c5d0a5f0e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e9c5d0a5f0e
Modified Files:
        monetdb5/mal/Tests/All
        monetdb5/mal/Tests/recycle05.stable.out
        monetdb5/mal/Tests/recycle06.stable.out
        monetdb5/mal/Tests/recycle07.stable.out
        monetdb5/mal/Tests/recycle08.mal
        monetdb5/mal/Tests/recycle08.stable.out
        monetdb5/mal/Tests/recycle10.stable.out
        monetdb5/mal/mal_recycle.c
Branch: default
Log Message:

More recycler tests enabled.


diffs (truncated from 470 to 300 lines):

diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -236,10 +236,10 @@ recycle02
 recycle03
 recycle04
 recycle05
-#recycle06
-#recycle07
-#recycle08
-#recycle10
+recycle06
+recycle07
+recycle08
+recycle10
 #recycle11
 #recycle12
 venks
diff --git a/monetdb5/mal/Tests/recycle05.stable.out 
b/monetdb5/mal/Tests/recycle05.stable.out
--- a/monetdb5/mal/Tests/recycle05.stable.out
+++ b/monetdb5/mal/Tests/recycle05.stable.out
@@ -81,11 +81,10 @@ end main;
 #RECYCLEcleanCache: policy=PROFIT usedmem=12000
 #Target memory 12000KB Available 16741151008KB
 #Candidates for eviction
-#(# LRU                Ticks   Life    SZ      Cnt     Wgt     Ben     Prof)
-  3 898472     38       898.40  12000    1       0.1
+#LRU           Ticks   Life    SZ      Cnt     Wgt     Ben     Prof)
+#  3 257359    56       257.30  12000    1       0.1
 #Evicted 1 instruction(s) 
- 3     =#  3     X_7:BAT  := 
algebra.subselect(<tmp_1034>,<tmp_1033>,100,120,true,true,false);#  3 _7:BAT := 
ALGsubselect2(_4:BAT, _1:BAT, _8:int, _9:int, _10:bit, _10:bit, _11:bit) {GR}
-
+#3     =#  3     X_7:BAT  := 
algebra.subselect(<tmp_1034>,<tmp_1033>,100,120,true,true,false);#  3 _7:BAT := 
ALGsubselect2(_4:BAT, _1:BAT, _8:int, _9:int, _10:bit, _10:bit, _11:bit) {GR}
 #RECYCLE [  3]     X_7 := 
algebra.subselect(<tmp_1034>,<tmp_1033>,700,710,true,true,false);
 #RECYCLER  CATALOG admission ADM_ALL
 #CACHE= policy PROFIT limit= 4 
@@ -104,11 +103,10 @@ end main;
 #RECYCLEcleanCache: policy=PROFIT usedmem=12000
 #Target memory 12000KB Available 16741151008KB
 #Candidates for eviction
-#(# LRU                Ticks   Life    SZ      Cnt     Wgt     Ben     Prof)
-  3 898547     61       898.72  12000    1       0.1
+#LRU           Ticks   Life    SZ      Cnt     Wgt     Ben     Prof)
+#  3 257452    62       257.64  12000    1       0.1
 #Evicted 1 instruction(s) 
- 3     =#  3     X_7:BAT  := 
algebra.subselect(<tmp_1034>,<tmp_1033>,700,710,true,true,false);#  3 _7:BAT := 
ALGsubselect2(_4:BAT, _1:BAT, _8:int, _9:int, _10:bit, _10:bit, _11:bit) {GR}
-
+#3     =#  3     X_7:BAT  := 
algebra.subselect(<tmp_1034>,<tmp_1033>,700,710,true,true,false);#  3 _7:BAT := 
ALGsubselect2(_4:BAT, _1:BAT, _8:int, _9:int, _10:bit, _10:bit, _11:bit) {GR}
 #RECYCLE [  3]     X_7 := 
algebra.subselect(<tmp_1034>,<tmp_1033>,400,700,true,true,false);
 #RECYCLER  CATALOG admission ADM_ALL
 #CACHE= policy PROFIT limit= 4 
diff --git a/monetdb5/mal/Tests/recycle06.stable.out 
b/monetdb5/mal/Tests/recycle06.stable.out
--- a/monetdb5/mal/Tests/recycle06.stable.out
+++ b/monetdb5/mal/Tests/recycle06.stable.out
@@ -8,20 +8,27 @@ stdout of test 'recycle06` in directory 
 # MonetDB server v5.7.0, based on kernel v1.25.0
 # Serving database 'mTests_src_mal'
 # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Copyright (c) 1993-2008 CWI, all rights reserved
-# Visit http://monetdb.cwi.nl/ for further information
-# Listening for connection requests on mapi:monetdb://modi.ins.cwi.nl:34583/
-## Test of LRU cache policy in limited cache (10 lines, 1 is always taken by 
fake 0)
-#
-#function user.bind(s:str,t:str,c:str,i:int):bat[:oid,:int];
-#b:= bat.new(:oid,:int);
-#barrier (go,i):= language.newRange(0:int);
-#      bat.append(b,i);
-#      redo (go,i):= language.nextElement(1:int,1000:int);
-#exit (go,i);
-#return bind:=b;
-#end bind;
-function user.bind(s:str,t:str,c:str,i:int):bat[:oid,:int];
+# Found 15.591 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:30041/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21946/.s.monetdb.30041
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+function sql.mvc():int;
+    return mvc := 1;
+end mvc;
+function sql.tid(mvc:int,s:str,t:str):bat[:oid,:oid];
+    b := bat.new(:oid,:oid);
+barrier i := 0@0:oid;
+    bat.append(b,i);
+    redo i := iterator.next(1@0:oid,1000@0:oid);
+exit i;
+    return tid := b;
+end tid;
+function sql.bind(m:int,s:str,t:str,c:str,i:int):bat[:oid,:int];
     b := bat.new(:oid,:int);
 barrier i := 0:int;
     bat.append(b,i);
@@ -29,18 +36,11 @@ barrier i := 0:int;
 exit i;
     return bind := b;
 end bind;
-#
-#function qry(low:int, hgh:int);
-#      b:= user.bind("schema","table","column",0);
-#      s1:= algebra.select(b,low,hgh);
-#      m0:= algebra.markT(s1, 0@0);
-#      mr:= bat.reverse(m0);
-#end qry;
-function user.qry(low:int,hgh:int):void;
-    b := user.bind("schema","table","column",0);
-    s1 := algebra.select(b,low,hgh);
-    m0 := algebra.markT(s1,0@0);
-    mr := bat.reverse(m0);
+function sql.qry(low:int,hgh:int):void;
+    m := sql.mvc();
+    x:bat[:oid,:oid]  := sql.tid(m,"sys","tbl");
+    b:bat[:oid,:int]  := sql.bind(m,"sys","tbl","col",0);
+    s1 := algebra.subselect(b,x,low,hgh,true,true,false);
 end qry;
 #
 #recycle.setRetainPolicy(1);
@@ -58,9 +58,7 @@ end qry;
 #
 function user.main():void;
 # Test of LRU cache policy in limited cache (10 lines, 1 is always taken by 
fake 0) 
-    recycle.setAdmPolicy(1);
-    recycle.setReusePolicy(1);
-    recycle.setCachePolicy(1,9);
+    recycle.setCache(4);
     io.print("start");
     user.qry(100,120);
     user.qry(700,710);
diff --git a/monetdb5/mal/Tests/recycle07.stable.out 
b/monetdb5/mal/Tests/recycle07.stable.out
--- a/monetdb5/mal/Tests/recycle07.stable.out
+++ b/monetdb5/mal/Tests/recycle07.stable.out
@@ -93,13 +93,12 @@ end main;
 #RECYCLEcleanCache: policy=PROFIT usedmem=24000
 #Target memory 12000KB Available 16741139008KB
 #Candidates for eviction
-#(# LRU                Ticks   Life    SZ      Cnt     Wgt     Ben     Prof)
-  3 612312     59       611.41  12000    2       0.1
-  4 612363     28       612.53  12000    2       0.1
+#LRU           Ticks   Life    SZ      Cnt     Wgt     Ben     Prof)
+#  3 902532    51       901.62  12000    2       0.1
+#  4 902575    28       902.75  12000    2       0.1
 #Evicted 1 instruction(s) 
- 4     =#  4     X_12:BAT  := 
algebra.subselect(<tmp_455>,<tmp_535>,700,710,true,true,false);#  4 _12:BAT := 
ALGsubselect2(_4:BAT, _1:BAT, _13:int, _14:int, _10:bit, _10:bit, _11:bit) {GR}
-
-#RECYCLE [  4]     X_12 := 
algebra.subselect(<tmp_455>,<tmp_535>,400,700,true,true,false);
+#4     =#  4     X_12:BAT  := 
algebra.subselect(<tmp_1034>,<tmp_1033>,700,710,true,true,false);#  4 _12:BAT 
:= ALGsubselect2(_4:BAT, _1:BAT, _13:int, _14:int, _10:bit, _10:bit, _11:bit) 
{GR}
+#RECYCLE [  4]     X_12 := 
algebra.subselect(<tmp_1034>,<tmp_1033>,400,700,true,true,false);
 #RECYCLER  CATALOG admission ADM_ALL
 #CACHE= policy PROFIT limit= 5 
 #RESOURCES hard stmt = 20000 hard var = 100000 hard mem=16741163008
diff --git a/monetdb5/mal/Tests/recycle08.mal b/monetdb5/mal/Tests/recycle08.mal
--- a/monetdb5/mal/Tests/recycle08.mal
+++ b/monetdb5/mal/Tests/recycle08.mal
@@ -31,7 +31,7 @@ function qry(low:int, hgh:int);
     s1:= algebra.subselect(b,x,low,hgh,true,true,false);
 end qry;
 
-recycle.setCache(t);
+recycle.setCache(4);
 optimizer.recycler("user","qry");
 
 io.print("start");
diff --git a/monetdb5/mal/Tests/recycle08.stable.out 
b/monetdb5/mal/Tests/recycle08.stable.out
--- a/monetdb5/mal/Tests/recycle08.stable.out
+++ b/monetdb5/mal/Tests/recycle08.stable.out
@@ -8,21 +8,27 @@ stdout of test 'recycle08` in directory 
 # MonetDB server v5.7.0, based on kernel v1.25.0
 # Serving database 'mTests_src_mal'
 # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Copyright (c) 1993-2008 CWI, all rights reserved
-# Visit http://monetdb.cwi.nl/ for further information
-# Listening for connection requests on mapi:monetdb://modi.ins.cwi.nl:34583/
-## Test of CREDIT cache policy in limited memory (8 RU)
-## Evicts the leaf instruction with smallest credit= cnt*(0.5*ticks + 
0.5(wr+rd))
-#
-#function user.bind(s:str,t:str,c:str,i:int):bat[:oid,:int];
-#b:= bat.new(:oid,:int);
-#barrier (go,i):= language.newRange(0:int);
-#      bat.append(b,i);
-#      redo (go,i):= language.nextElement(1:int,1000:int);
-#exit (go,i);
-#return bind:=b;
-#end bind;
-function user.bind(s:str,t:str,c:str,i:int):bat[:oid,:int];
+# Found 15.591 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:30041/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21946/.s.monetdb.30041
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+function sql.mvc():int;
+    return mvc := 1;
+end mvc;
+function sql.tid(mvc:int,s:str,t:str):bat[:oid,:oid];
+    b := bat.new(:oid,:oid);
+barrier i := 0@0:oid;
+    bat.append(b,i);
+    redo i := iterator.next(1@0:oid,1000@0:oid);
+exit i;
+    return tid := b;
+end tid;
+function sql.bind(m:int,s:str,t:str,c:str,i:int):bat[:oid,:int];
     b := bat.new(:oid,:int);
 barrier i := 0:int;
     bat.append(b,i);
@@ -30,14 +36,11 @@ barrier i := 0:int;
 exit i;
     return bind := b;
 end bind;
-#
-#function qry(low:int, hgh:int);
-#      b:= user.bind("schema","table","column",0);
-#      s1:= algebra.select(b,low,hgh);
-#end qry;
-function user.qry(low:int,hgh:int):void;
-    b := user.bind("schema","table","column",0);
-    s1 := algebra.select(b,low,hgh);
+function sql.qry(low:int,hgh:int):void;
+    m := sql.mvc();
+    x:bat[:oid,:oid]  := sql.tid(m,"sys","tbl");
+    b:bat[:oid,:int]  := sql.bind(m,"sys","tbl","col",0);
+    s1 := algebra.subselect(b,x,low,hgh,true,true,false);
 end qry;
 #
 #recycle.setRetainPolicy(1);
@@ -59,9 +62,7 @@ end qry;
 function user.main():void;
 # Test of CREDIT cache policy in limited memory (8 RU) 
 # Evicts the leaf instruction with smallest credit= cnt*(0.5*ticks + 
0.5(wr+rd)) 
-    recycle.setAdmPolicy(1);
-    recycle.setReusePolicy(1);
-    recycle.setCachePolicy(2,0,8);
+    recycle.setCache(4);
     io.print("start");
     user.qry(100,150);
     user.qry(200,240);
diff --git a/monetdb5/mal/Tests/recycle10.stable.out 
b/monetdb5/mal/Tests/recycle10.stable.out
--- a/monetdb5/mal/Tests/recycle10.stable.out
+++ b/monetdb5/mal/Tests/recycle10.stable.out
@@ -8,29 +8,27 @@ stdout of test 'recycle10` in directory 
 # MonetDB server v5.7.0, based on kernel v1.25.0
 # Serving database 'mTests_src_mal', using 4 threads
 # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Copyright (c) 1993-2008 CWI, all rights reserved
-# Visit http://monetdb.cwi.nl/ for further information
-# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:33756/
-##test the basics of the recycler
-## testing reuse-cover with different selection instructions
-#
-#function user.bind(s:str,t:str,c:str,i:int):bat[:oid,:int];
-#      b:= bat.new(:oid,:int);
-#      bat.insert(b,0@0,0);
-#      bat.insert(b,1@0,1);
-#      bat.insert(b,2@0,2);
-#      bat.insert(b,3@0,3);
-#      bat.insert(b,4@0,4);
-#      bat.insert(b,5@0,5);
-#      bat.insert(b,6@0,6);
-#      bat.insert(b,7@0,7);
-#      bat.insert(b,8@0,8);
-#      bat.insert(b,9@0,9);
-#      bat.insert(b,10@0,10);
-#      bat.insert(b,11@0,11);
-#      return bind:=b;
-#end bind;
-function user.bind(s:str,t:str,c:str,i:int):bat[:oid,:int];
+# Found 15.591 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:30041/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21946/.s.monetdb.30041
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+function sql.mvc():int;
+    return mvc := 1;
+end mvc;
+function sql.tid(mvc:int,s:str,t:str):bat[:oid,:oid];
+    b := bat.new(:oid,:oid);
+barrier i := 0@0:oid;
+    bat.append(b,i);
+    redo i := iterator.next(1@0:oid,11@0:oid);
+exit i;
+    return tid := b;
+end tid;
+function sql.bind(m:int,s:str,t:str,c:str,i:int):bat[:oid,:int];
     b := bat.new(:oid,:int);
     bat.insert(b,0@0,0);
     bat.insert(b,1@0,1);
@@ -46,30 +44,17 @@ function user.bind(s:str,t:str,c:str,i:i
     bat.insert(b,11@0,11);
     return bind := b;
 end bind;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to