Skip to content

Commit

Permalink
timing_card: get profile from structured flag (#6465)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Duffany <brandon@buildbuddy.io>
  • Loading branch information
sluongng and bduffany committed Apr 30, 2024
1 parent 1e5da20 commit 3c25550
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/invocation/invocation_timing_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,14 @@ export default class InvocationTimingCardComponent extends React.Component<Props
}

getProfileFile(): build_event_stream.File | undefined {
const profileName =
this.props.model.structuredCommandLine
?.find((scl) => scl.commandLineLabel == "canonical")
?.sections?.find((s) => s.sectionLabel == "command options")
?.optionList?.option?.find((o) => o.optionName == "profile")?.optionValue ?? "command.profile.gz";

return this.props.model.buildToolLogs?.log.find(
(log: build_event_stream.File) => log.name != "execution.log" && log.uri
(log: build_event_stream.File) => log.name == profileName && log.uri
);
}

Expand Down

0 comments on commit 3c25550

Please sign in to comment.