Changeset: e5be4aa6c7b5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5be4aa6c7b5
Modified Files:
monetdb5/extras/crackers/crackers_selectst_ops.mx
Branch: holindex
Log Message:
Add file to read copy time for stochastic cracking.
diffs (52 lines):
diff --git a/monetdb5/extras/crackers/crackers_selectst_ops.mx
b/monetdb5/extras/crackers/crackers_selectst_ops.mx
--- a/monetdb5/extras/crackers/crackers_selectst_ops.mx
+++ b/monetdb5/extras/crackers/crackers_selectst_ops.mx
@@ -1007,8 +1007,16 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi
int gapH = 1;
/*k and randomoid are used for DD1R*/
@1 k,temp_h;
-
-
+ char *outputFilename;
+ FILE *ofp_copy;
+ struct timeval tv0_copy, tv1_copy;
+
+ outputFilename = getenv("STOCHASTIC_COPY_TIME");
+ if (outputFilename == NULL){
+ fprintf(stderr, "Error: STOCHASTIC_COPY_TIME\n");
+ exit(1);
+ }
+
if (*inclusiveHgh == TRUE) HBound = FALSE;
else HBound = TRUE;
@@ -1020,9 +1028,20 @@ 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)*1000000);
+
b->hsorted = FALSE;
b->tsorted = FALSE;
b->hdense = FALSE;
@@ -1041,7 +1060,7 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi
@:crkTwoRTree(@1)@
if (gapH>0) addCrackerIndex_@1(m,hgh,HBound,vh,c);
vl = BUNfirst(b);
-
+ fclose(ofp_copy);
BBPincref(b->batCacheid,TRUE);
BBPunfix(bo->batCacheid);
goto createView;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list