Index: tools/logreader.js |
diff --git a/tools/logreader.js b/tools/logreader.js |
index ceac2b826800e3375db94454fb3cf068af2107ff..157a7fc8567df8af22bf4598c387805c77c3549d 100644 |
--- a/tools/logreader.js |
+++ b/tools/logreader.js |
@@ -36,9 +36,11 @@ |
* @param {Array.<Object>} dispatchTable A table used for parsing and processing |
* log records. |
* @param {boolean} timedRange Ignore ticks outside timed range. |
+ * @param {boolean} pairwiseTimedRange Ignore ticks outside pairs of timer |
+ * markers. |
* @constructor |
*/ |
-function LogReader(dispatchTable, timedRange) { |
+function LogReader(dispatchTable, timedRange, pairwiseTimedRange) { |
/** |
* @type {Array.<Object>} |
*/ |
@@ -50,6 +52,14 @@ function LogReader(dispatchTable, timedRange) { |
this.timedRange_ = timedRange; |
/** |
+ * @type {boolean} |
+ */ |
+ this.pairwiseTimedRange_ = pairwiseTimedRange; |
+ if (pairwiseTimedRange) { |
+ this.timedRange_ = true; |
+ } |
+ |
+ /** |
* Current line. |
* @type {number} |
*/ |
@@ -109,6 +119,10 @@ LogReader.prototype.processLogLine = function(line) { |
if (this.hasSeenTimerMarker_) { |
this.processLog_(this.logLinesSinceLastTimerMarker_); |
this.logLinesSinceLastTimerMarker_ = []; |
+ // In pairwise mode, a "current-time" line ends the timed range. |
+ if (this.pairwiseTimedRange_) { |
+ this.hasSeenTimerMarker_ = false; |
+ } |
} else { |
this.hasSeenTimerMarker_ = true; |
} |