Skip to content

Commit

Permalink
[perforator] Do not use default event type on atomic profile tasks fr…
Browse files Browse the repository at this point in the history
…om preview table

commit_hash:53e736eddfdc64b47b87ad018ce5114afa5561f4
  • Loading branch information
BigRedEye committed Feb 20, 2025
1 parent c918a80 commit 1e455f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const prepareProfileColumns = ({ compact }: { compact?: boolean } = {}) => {
id: 'ProfileID',
name: 'Profile ID',
template: (profile: Profile) => {
const href = `/profile/${profile.ProfileID}?timestamp=${parseDate(profile.Timestamp ?? '')!.valueOf()}`;
const href = `/profile/${profile.ProfileID}?timestamp=${parseDate(profile.Timestamp ?? '')!.valueOf()}&event_type=${profile.EventType}`;
return renderLink(href, profile.ProfileID, true);
},
},
Expand Down
3 changes: 2 additions & 1 deletion perforator/ui/app/src/pages/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const Profile: React.FC<ProfileProps> = () => {

const [searchParams] = useSearchParams();
const timestamp = Number(searchParams.get('timestamp') ?? 0);
const eventType = searchParams.get('event_type');


React.useEffect(() => {
Expand All @@ -26,7 +27,7 @@ export const Profile: React.FC<ProfileProps> = () => {
const query: ProfileTaskQuery = {
from: new Date(timestamp - 1).toISOString(),
to: new Date(timestamp + 1).toISOString(),
profileId: profileId!,
selector: `{id = "${profileId!}", event_type = "${eventType}"}`,
maxProfiles: 1,
};

Expand Down

0 comments on commit 1e455f7

Please sign in to comment.