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

[JENKINS-52075] Track the cumulative execution time of Pipeline jobs #39

Merged
merged 2 commits into from Jun 21, 2018

Conversation

@stephenc
Copy link
Member

commented Jun 21, 2018

Copy link

left a comment

Looks good. A few minor comments though.

@Exported(visibility = 2)
public double getExecutorUtilization() {
long buildingDurationMillis = getBuildingDurationMillis();
return buildingDurationMillis > 0 ? (getExecutingTimeMillis() * 100 / buildingDurationMillis) / 100.0 : 1.0;

This comment has been minimized.

Copy link
@stephen-badger

stephen-badger Jun 21, 2018

You probably want to cast one of the operands to double to keep precision?

This comment has been minimized.

Copy link
@stephenc

stephenc Jun 21, 2018

Author Member

no, i want to force it to 2 decimals ;-)

This comment has been minimized.

Copy link
@stephenc

stephenc Jun 21, 2018

Author Member

but I should add a comment to that effect

// remove the currently known IDs from the previous list of known IDs
previousIds.removeAll(currentIds);
// now remove from the totals the ones that were previously known (at last trim) but are
// no longer known, we need to do it this was as otherwise any IDs that are added while

This comment has been minimized.

Copy link
@stephen-badger

stephen-badger Jun 21, 2018

There is confusing comment grammar here. Also possibly the comment is incomplete?

@stephenc stephenc merged commit c31f960 into jenkinsci:master Jun 21, 2018
1 check passed
1 check passed
continuous-integration/jenkins/pr-merge This commit looks good
Details
@stephenc stephenc deleted the stephenc:jenkins-52075 branch Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.