Changeset: 25ae61333a97 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=25ae61333a97
Modified Files:
        monetdb5/modules/mal/xid.c
Branch: xid
Log Message:

xid.c: GDKusec() return lng; use correct type and format string;
also fixed calculation of time difference


diffs (66 lines):

diff --git a/monetdb5/modules/mal/xid.c b/monetdb5/modules/mal/xid.c
--- a/monetdb5/modules/mal/xid.c
+++ b/monetdb5/modules/mal/xid.c
@@ -127,7 +127,8 @@ XIDcompress(Client cntxt, MalBlkPtr mb, 
        BAT *b, *bn;
        oid *p,*q;
        XIDcolumn col;
-       xid clk, i=0;
+       xid i=0;
+       lng clk;
 
        (void) mb;
        (void) cntxt;
@@ -153,8 +154,8 @@ XIDcompress(Client cntxt, MalBlkPtr mb, 
                i= XIDencode(col,p,q);
                col[0].tag  = XIDBASE;
                col[0].value = i+1; /* keep compression size */
-               mnstr_printf(cntxt->fdout,"#xid, %d, tail compress, %ld,%ld,  
clk %ld ms %ld usec\n",
-                       getArg(pci,0), BATcount(b), i, (xid) 
GDKusec()/1000,(xid) GDKusec()-clk);
+               mnstr_printf(cntxt->fdout,"#xid, %d, tail compress, %ld,%ld,  
clk " LLFMT " usec\n",
+                       getArg(pci,0), BATcount(b), i, GDKusec()-clk);
 
                bn->T->heap.xidcompressed = 1;
                bn->batDirty =1;
@@ -176,8 +177,8 @@ XIDcompress(Client cntxt, MalBlkPtr mb, 
                i= XIDencode(col,p,q);
                col[0].tag  = XIDBASE;
                col[0].value = i+1; /* keep compression size */
-               mnstr_printf(cntxt->fdout,"#xid, %d, head compress, %ld,%ld,  
clk %ld ms %ld usec\n",
-                       getArg(pci,0), BATcount(b), i, (xid) 
GDKusec()/1000,(xid) GDKusec()-clk);
+               mnstr_printf(cntxt->fdout,"#xid, %d, head compress, %ld,%ld,  
clk " LLFMT " usec\n",
+                       getArg(pci,0), BATcount(b), i, GDKusec()-clk);
                bn->H->heap.xidcompressed = 1;
                bn->batDirty =1;
        }
@@ -234,7 +235,7 @@ XIDdecompress(Client cntxt, MalBlkPtr mb
        xid cnt, lim;
        XIDcolumn col;
        oid *o;
-       xid clk;
+       lng clk;
 
        (void) mb;
        if ((b = BATdescriptor(*bid)) == NULL)
@@ -260,8 +261,8 @@ XIDdecompress(Client cntxt, MalBlkPtr mb
 
                clk = GDKusec();
                cnt = XIDdecode(col,o,lim);
-               mnstr_printf(cntxt->fdout,"#xid, %d, decompress, %ld, %ld, clk 
%ld %ld usec\n",
-                       getArg(pci,1), lim, cnt, (xid) GDKusec()/1000, (xid) 
GDKusec()-clk);
+               mnstr_printf(cntxt->fdout,"#xid, %d, decompress, %ld, %ld, clk 
" LLFMT " usec\n",
+                       getArg(pci,1), lim, cnt, GDKusec()-clk);
 
                BATsetcount(bn, cnt);
                bn->batDirty =1;
@@ -283,8 +284,8 @@ XIDdecompress(Client cntxt, MalBlkPtr mb
 
                clk = GDKusec();
                cnt = XIDdecode(col,o,lim);
-               mnstr_printf(cntxt->fdout,"#xid, %d, decompress, %ld, %ld , clk 
%ld %ld usec\n",
-                       getArg(pci,1), lim, cnt, (xid) GDKusec()/1000, (xid) 
GDKusec()-clk);
+               mnstr_printf(cntxt->fdout,"#xid, %d, decompress, %ld, %ld , clk 
" LLFMT " usec\n",
+                       getArg(pci,1), lim, cnt, GDKusec()-clk);
 
                BATsetcount(bn, cnt);
                bn->batDirty =1;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to