Skip to content

Commit

Permalink
tmf.core: Add tracepoint for size of request
Browse files Browse the repository at this point in the history
This is useful to profile why some requests are longer than others,
as well as a sanity check.

Change-Id: I14728908cdde3aeabd753c3f4131cd45a764a456
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/201647
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
  • Loading branch information
MatthewKhouzam committed May 5, 2023
1 parent 569175f commit 6f22ec5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ public final TmfModelResponse<TimeGraphModel> fetchRowModel(Map<String, Object>
// getRowModel returns null if the query was cancelled.
return new TmfModelResponse<>(null, ITmfResponse.Status.CANCELLED, CommonStatusMessage.TASK_CANCELLED);
}
long rows = models.getRows().size();
long states = 0;
for (ITimeGraphRowModel row : models.getRows()) {
states += row.getStates().size();
}
scope.step("complete", "rows", rows, "states", states); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return new TmfModelResponse<>(models, complete ? Status.COMPLETED : Status.RUNNING,
complete ? CommonStatusMessage.COMPLETED : CommonStatusMessage.RUNNING);
} catch (StateSystemDisposedException | TimeRangeException | IndexOutOfBoundsException e) {
Expand Down

0 comments on commit 6f22ec5

Please sign in to comment.