Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker that have no duration should be open ended on the unfinished side #5208

Open
julienw opened this issue Nov 14, 2024 · 3 comments
Open
Labels
bug Very important to fix, typically this means that the tool is broken or lying markers Anything to do with marker data structures, marker chart, or the marker table

Comments

@julienw
Copy link
Contributor

julienw commented Nov 14, 2024

see example at https://share.firefox.dev/3CryCa1

There's some code to handle that already (it's working for preview selections) but obviously it doesn't work here.

┆Issue is synchronized with this Jira Task

@julienw julienw added bug Very important to fix, typically this means that the tool is broken or lying markers Anything to do with marker data structures, marker chart, or the marker table labels Nov 14, 2024
@mstange
Copy link
Contributor

mstange commented Nov 14, 2024

The code which creates interval markers from start + end markers makes it so that all interval markers have a non-null end time, by falling back to threadRange.end:

const endOfThread = threadRange.end;
// Loop over "start" markers without any "end" markers.
for (const markerBucket of openIntervalMarkers.values()) {
for (const startIndex of markerBucket) {
const start = ensureExists(
rawMarkers.startTime[startIndex],
'Encountered a marker without a startTime. Eventually this needs to be handled ' +
'for phase-style markers.'
);
addMarker([startIndex], {
start,
end: Math.max(endOfThread, start),
name: stringTable.getString(rawMarkers.name[startIndex]),
data: rawMarkers.data[startIndex],
category: rawMarkers.category[startIndex],
threadId: rawMarkers.threadId ? rawMarkers.threadId[startIndex] : null,
incomplete: true,
});
}
}

I think the derived markers don't carry any information which says "the start or end time for this marker wasn't present, pretend this marker goes beyond the start/end of the profile".

@julienw
Copy link
Contributor Author

julienw commented Nov 14, 2024

We have the incomplete: true boolean, but we don't know which side it's open-ended indeed.

@julienw
Copy link
Contributor Author

julienw commented Nov 14, 2024

it would probably be good to set it to incomplete: 'start' | 'end' | 'both', and then use it when drawing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Very important to fix, typically this means that the tool is broken or lying markers Anything to do with marker data structures, marker chart, or the marker table
Projects
None yet
Development

No branches or pull requests

2 participants