Skip to content

Commit

Permalink
tmf: Fix for times requested before start time
Browse files Browse the repository at this point in the history
[Fixes] #18

Signed-off-by: Arnaud Fiorini <fiorini.arnaud@gmail.com>
  • Loading branch information
arfio authored and bhufmann committed Feb 27, 2024
1 parent 8e9f76e commit b1dd6ec
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@ public void dispose() {
}
List<Long> times = new ArrayList<>();
for (int i = 0; i < timeRequested.length; i++) {
if (timeRequested[i] > fTotalsStats.getCurrentEndTime()) {
if (timeRequested[i] < fTotalsStats.getStartTime()) {
times.add(fTotalsStats.getStartTime());
} else if (timeRequested[i] < fTotalsStats.getCurrentEndTime()) {
times.add(timeRequested[i]);
} else {
times.add(fTotalsStats.getCurrentEndTime());
break;
}
times.add(timeRequested[i]);
}
try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "StateStatistics:histogramQuery").build()) { //$NON-NLS-1$
Iterable<@NonNull ITmfStateInterval> intervals = fTotalsStats.query2D(Collections.singletonList(quark), times);
Expand Down

0 comments on commit b1dd6ec

Please sign in to comment.