Changeset: 1f175ca92142 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f175ca92142
Modified Files:
        monetdb5/extras/crackers/crackers_selectpl_ops.mx
Branch: holindex
Log Message:

Measure copy time also in concurrent cracking.


diffs (48 lines):

diff --git a/monetdb5/extras/crackers/crackers_selectpl_ops.mx 
b/monetdb5/extras/crackers/crackers_selectpl_ops.mx
--- a/monetdb5/extras/crackers/crackers_selectpl_ops.mx
+++ b/monetdb5/extras/crackers/crackers_selectpl_ops.mx
@@ -1137,7 +1137,10 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi
        oid cl2=0, ch2=0;
        bit HBound,foundHgh=0;
        int gapH = 1;
-       int createIndex=0;      
+       int createIndex=0;
+       FILE *ofp_copy;
+       char *outputFilename;   
+       struct timeval tv0_copy, tv1_copy;
        struct Node *lowNode=NULL;
        pthread_rwlock_t *plock=0;
        BUN idxFirst = BUN_NONE;
@@ -1148,6 +1151,12 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi
         MT_lock_set(&CRKIndexLock[mod_bid],"Cracker Index Lock");
         //MT_lock_set(&CRKIndexLock,"Cracker Index Lock");
 
+        outputFilename = getenv("CRACKING_COPY_TIME");
+        if (outputFilename == NULL){
+                fprintf(stderr, "Error: CRACKING_COPY_TIME\n");
+                exit(1);
+        }
+
        if (*inclusiveHgh == TRUE) HBound = FALSE;
        else    HBound = TRUE;                          
 
@@ -1159,9 +1168,19 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi
        if (m == -1){
                if ((bo = BATdescriptor(*bid)) == NULL)
                        throw(MAL, "crackers.crackRange", "Cannot access 
descriptor");
+               ofp_copy = fopen(outputFilename,"a");
+                if (ofp_copy == NULL) {
+                        fprintf(stderr, "Can't open output file!\n");
+                        exit(1);
+                }
+
+                gettimeofday(&tv0_copy, 0);
                b = BATcopy(bo, bo->htype, bo->ttype, TRUE);
                if ( bo->htype == TYPE_void)
                        b = BATmaterializeh(b);
+                gettimeofday(&tv1_copy, 0);
+                fprintf(ofp_copy,"%d\n",(int)dt(tv0_copy,tv1_copy));
+               fclose(ofp_copy);
                b->hsorted = FALSE;
                b->tsorted = FALSE;
                b->hdense = FALSE;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to