Skip to content

Add timings to stage view#814

Merged
timja merged 23 commits intojenkinsci:mainfrom
timja:display-timings
Jun 11, 2025
Merged

Add timings to stage view#814
timja merged 23 commits intojenkinsci:mainfrom
timja:display-timings

Conversation

@timja
Copy link
Member

@timja timja commented Jun 2, 2025

Fixes #688

Most of these aren't solved yet but will be done with this PR:

Before

image

After

image

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@timja timja added the enhancement New feature or request label Jun 2, 2025
Copy link
Member Author

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


const layout: LayoutInfo = {
...defaultLayout,
nodeSpacingH: 45,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be re-added behind a setting, possibly we can calculate it based on longest stage name too so we don't have to lose all the value by shortening it


return (
<div className="pgv-single-run">
<div className="pgv-single-run" style={{ height: "100px" }}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be dynamic based on a setting

}

.pgw-user-specified-text {
.pgv-user-specified-text {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo I noticed

for (const node of row) {
measuredWidth = Math.max(measuredWidth, node.x + nodeSpacingH / 2);
measuredHeight = collapsed
? 60
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may need re-adding behind setting

if (collapsed) {
return [];
}
// if (collapsed) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be re-added behind a setting

): Array<NodeLabelInfo> {
const labels: Array<NodeLabelInfo> = [];

// if (collapsed) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be re-added behind a setting

left: x + "px",
};

const classNames = ["PWGx-pipeline-big-label"];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could review if all these classes and features are needed, its mostly a copy of big label

@felipecrs
Copy link
Contributor

This is looking great!

timja and others added 7 commits June 3, 2025 09:10
Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
@DreamPWJ
Copy link

DreamPWJ commented Jun 9, 2025

Looks really good. When will it be released? @timja

@timja
Copy link
Member Author

timja commented Jun 9, 2025

Looks really good. When will it be released? @timja

Hopefully this week, just had a couple of other things to sort first.

@DreamPWJ
Copy link

DreamPWJ commented Jun 9, 2025

This plugin is great, but there are a few obvious issues.

  1. It would be best if the git change log could be displayed by mouse over or by clicking on it.
  2. If there are a lot of pipeline steps (30+), they should all be displayed (based on the screen size). You can consider wrapping or folding unexecuted steps.
  3. If the display is incomplete, can the view automatically scroll according to the specific steps executed? The pipeline-overview log can also automatically scroll.
  4. It is recommended that the pipeline view be unified on the top and the log be displayed below. @timja

@timja
Copy link
Member Author

timja commented Jun 9, 2025

This plugin is great, but there are a few obvious issues.

  1. It would be best if the git change log could be displayed by mouse over or by clicking on it.
  2. If there are a lot of pipeline steps (30+), they should all be displayed (based on the screen size). You can consider wrapping or folding unexecuted steps.
  3. If the display is incomplete, can the view automatically scroll according to the specific steps executed? The pipeline-overview log can also automatically scroll.
  4. It is recommended that the pipeline view be unified on the top and the log be displayed below. @timja

Can you please file these as issues (if they don't exist already) so these can be unpicked to understand what you mean, thanks.

- Merged settings and console functionality
- Kept error handling in useMessages function
- Combined localization keys from both branches
@DreamPWJ
Copy link

Thank you. I will review the issues and submit issues after experiencing this PR release.

@timja timja marked this pull request as ready for review June 10, 2025 11:20
@timja timja requested a review from a team as a code owner June 10, 2025 11:20
@timja
Copy link
Member Author

timja commented Jun 10, 2025

Happy to do a bit more here if people think its needed, should be good for review now though

timja and others added 2 commits June 10, 2025 12:30
Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
Copy link
Contributor

@lewisbirks lewisbirks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good and seems to work after some manual testing

Comment on lines +32 to +33
showNames: boolean,
showDurations: boolean,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to combine these with collapse in some sort of DisplayConfig object?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be a little worried that it complicates getting everything to re-render properly but if you think its worth it I can take a look.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah, it's nothing major, was just thinking about potentially grouping logical params into a parent object is all

…ort/labels.tsx

Co-authored-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
@lewisbirks
Copy link
Contributor

I noticed in #343 it mentions the following

Global average time IMHO are to complicated to be added on the current layout and least interesting for build with optional step. Nonetheless some global metrics (build duration median/min/max, latest build success, ...) could be added as an header.

Do we want that? And if so would it be better to split out into it's own issue once this is merged?

@timja
Copy link
Member Author

timja commented Jun 10, 2025

I noticed in #343 it mentions the following

Global average time IMHO are to complicated to be added on the current layout and least interesting for build with optional step. Nonetheless some global metrics (build duration median/min/max, latest build success, ...) could be added as an header.

Do we want that? And if so would it be better to split out into it's own issue once this is merged?

Yeah new issue I think

@felipecrs
Copy link
Contributor

Duration overlaps a bit with the stages line for skipped stages:

image

But this is not a big deal, I don't mind.

@timja
Copy link
Member Author

timja commented Jun 10, 2025

Duration overlaps a bit with the stages line for skipped stages:

image

But this is not a big deal, I don't mind.

I gave it a bit of a go but didn't get something working, would probably be possible to stop the skipped line and just draw a regular one, might be the easiest thing but I don't think its a blocker.

@felipecrs
Copy link
Contributor

Yeah, it is not a blocker for sure.

@DreamPWJ
Copy link

DreamPWJ commented Jun 11, 2025

Can you test the display effect of more than 30 stages and automatically distribute them according to the size of the computer screen, without shrinking them together ,Display date and time on one line at the same time. For example, '2025-06-11 08:30' instead of displaying them separately. The picture shows unfriendly
image

@DreamPWJ
Copy link

I suggest abbreviating all time units like ‘’4min 25 seg to ‘’4m25s’’ so it looks more friendly.

@felipecrs
Copy link
Contributor

Can you test the display effect of more than 30 stages and automatically distribute them according to the size of the computer screen, without shrinking them together

I agree with this one, but I think it deserves its own issue. It's not related to this. Maybe there should be a toggle to show all stages or not, which can otherwise be problematic for performance reasons.

@DreamPWJ
Copy link

The stages that do not need to be executed can be hidden, but the stages that are executed are displayed in one view, and you don’t need to scroll to see them.

@felipecrs
Copy link
Contributor

felipecrs commented Jun 11, 2025

The stages that do not need to be executed can be hidden, but the stages that are executed are displayed in one view, and you don’t need to scroll to see them.

I don't think this is a good idea because it would make comparisons harder if different builds skips different stages.

@DreamPWJ
Copy link

DreamPWJ commented Jun 11, 2025

Technical implementation may be difficult, but this is the best user experience, Too many stages are hidden. When I can't see the stage I'm currently building, this view becomes meaningless.

@DreamPWJ
Copy link

image
image
Many key deployment steps are hidden, information transmission efficiency is low, and users have to perform multiple operations (click or slide) to see them.

@timja
Copy link
Member Author

timja commented Jun 11, 2025

Too many stages are hidden. When I can't see the stage I'm currently building, this view becomes meaningless.

That's part of #650, which is in the priority epic so will look to improve this soon.

@timja timja merged commit c540550 into jenkinsci:main Jun 11, 2025
17 checks passed
@timja timja deleted the display-timings branch June 11, 2025 07:55
@henriduflot
Copy link

Hello @timja

Thanks for the work!

Is it possible to not show timings on skipped stages? I assume that skipped stages are not executed, which could save space on the graph.

image

Another question: The configuration to display stage names and their duration is set per user. Is it possible to enable this globally?

@timja
Copy link
Member Author

timja commented Jun 11, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle to display stage name in Stages view

5 participants