Skip to content

Commit

Permalink
Only include caveat about target names missing, if there is at least …
Browse files Browse the repository at this point in the history
…one bottleneck reported.

Remove some newlines.

Signed-off-by: Sara Adams <sara.e.adams@gmail.com>
  • Loading branch information
saraadams committed Nov 26, 2023
1 parent 722f228 commit 5d14941
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ public SuggestionOutput getSuggestions(DataManager dataManager) {
final List<Caveat> caveats = new ArrayList<>();
var flagForTargetInclusionEnabled =
dataManager.getDatum(FlagValueExperimentalProfileIncludeTargetLabel.class);
if (!flagForTargetInclusionEnabled.isProfileIncludeTargetLabelEnabled()) {
if (suggestions.size() > 0
&& !flagForTargetInclusionEnabled.isProfileIncludeTargetLabelEnabled()) {
caveats.add(
SuggestionProviderUtil.createCaveat(
String.format(
Expand Down Expand Up @@ -274,11 +275,9 @@ private String suggestTargetsOrActions(BottleneckStats bottleneck) {
}
sb.append("\t\tAction duration: ");
sb.append(formatDuration(event.completeEvent.duration));
sb.append("\n");
if (event.isCropped()) {
sb.append("\t\tDuration within bottleneck: ");
sb.append("\n\t\tDuration within bottleneck: ");
sb.append(formatDuration(event.croppedDuration));
sb.append("\n");
}
return sb.toString();
})
Expand Down

0 comments on commit 5d14941

Please sign in to comment.