Skip to content

Commit

Permalink
perforator: add pprof button for flamegraph page
Browse files Browse the repository at this point in the history
commit_hash:77c867a8e6080d61094cf361c99bc8e6ee045a25
  • Loading branch information
gearoffortune committed Feb 7, 2025
1 parent d893797 commit 9c0153e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion perforator/ui/app/src/components/TaskCard/TaskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { useNavigate } from 'react-router-dom';
import { Button, Card, ClipboardButton, Link } from '@gravity-ui/uikit';

import { uiFactory } from 'src/factory';
import type { TaskResult } from 'src/models/Task';
import type { ProfileTaskQuery, TaskResult } from 'src/models/Task';
import { TaskState } from 'src/models/Task';
import { redirectToTaskPage } from 'src/utils/profileTask';
import { getFormat, isDiffTaskResult } from 'src/utils/renderingFormat';
import { setPageTitle } from 'src/utils/title';

Expand Down Expand Up @@ -117,6 +118,17 @@ export const TaskCard: React.FC<TaskCardProps> = props => {
{'Compare with\u2026'}
</Button>
) : null}
{format !== 'RawProfile' && !isDiff ? (
<Button
onClick={() =>
redirectToTaskPage(navigate, {
selector: query?.Selector,
maxProfiles: spec?.MaxSamples,
rawProfile: 'true',
} as ProfileTaskQuery)
}
>Get pprof...</Button>
) : null}
</div>
<h2 className="task-card__title">Task {props.taskId}</h2>
<DefinitionList items={properties} />
Expand Down

0 comments on commit 9c0153e

Please sign in to comment.