Skip to content

Commit

Permalink
fixup! [feature] A new and improved 'exist:time' XQuery pragma. Backp…
Browse files Browse the repository at this point in the history
…orted from FusionDB
  • Loading branch information
adamretter committed Oct 4, 2023
1 parent 7c1e865 commit 8b2a807
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public void after(final XQueryContext context, final Expression expression) thro

if (options.measurementMode == MeasurementMode.SINGLE) {
logSingleMeasurement(expression);
this.timing.reset();
}
}

Expand All @@ -101,7 +102,7 @@ public void resetState(final boolean postOptimization) {
if (timing != null && options.measurementMode == MeasurementMode.MULTIPLE) {
logMultipleMeasurement();
}
this.timing = null;
this.timing.reset();
}

/**
Expand Down Expand Up @@ -512,5 +513,22 @@ public long getLastElapsed() {
public long getTotalElapsed() {
return totalElapsed;
}

/**
* Reset the class for next use.
*/
public void reset() {
this.startTimestamp = UNSET;

this.lastStartTimestamp = UNSET;

this.firstElapsed = UNSET;
this.minElapsed = UNSET;
this.maxElapsed = UNSET;
this.lastElapsed = UNSET;
this.totalElapsed = 0;

this.iterations = 0;
}
}
}

0 comments on commit 8b2a807

Please sign in to comment.