Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine committed Dec 20, 2021
1 parent 8a21614 commit 07e8457
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/lib/apps/ContinuousProfiling/pages/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ export default function Page() {

let startIndex = 0
const profiles = groupProfileDetail?.target_profiles || []
// rename profile to cpu for profile_type
profiles.forEach((p) => {
if (p.profile_type === 'profile') {
p.profile_type = 'cpu'
}
})
profiles.sort((a, b) => {
if (a.target!.component! > b.target!.component!) {
return 1
Expand Down Expand Up @@ -87,7 +93,7 @@ export default function Page() {
maxWidth: 300,
onRender: (record) => {
const profileType = record.profile_type
if (profileType === 'profile') {
if (profileType === 'cpu') {
return `CPU Profiling - ${profileDuration}s`
}
return upperFirst(profileType)
Expand Down

0 comments on commit 07e8457

Please sign in to comment.