Coder Social home page Coder Social logo

Comments (4)

dcoraboeuf avatar dcoraboeuf commented on August 14, 2024

In a declarative pipeline, when using:

stage("x") {
   agent { }
}

the time to create the agent if not available is taken into account when measuring the timing of the x stage:

image

It's a same issue with a scripted pipeline written this way:

stage("x") {
   node {
   }
}

image

When inverting the syntax:

node {
   stage("x") {}
}

then the computation is OK:

image

So it means that have to take into account the cases of:

i) declarative pipeline
ii) node creation inside a declarative stage

The case iii) node creation outside of a stage is already correct.

from ontrack-plugin.

dcoraboeuf avatar dcoraboeuf commented on August 14, 2024

Proposal: when computing the execution time of a stage, we go up the step tree until we find the stage step itself. We take its execution time s.

On the way up the tree, we collect each "Allocate node" step execution time into the n time.

The computed stage execution time will be x = s - t.

This will solve cases i) and ii) (and also work for iii) where t = 0)

from ontrack-plugin.

dcoraboeuf avatar dcoraboeuf commented on August 14, 2024

"Allocate Node: Start" (n) and "Allocate Node: Body: Start" (b) have to be taken into account.

If no such step is seen before we get to the stage, t = s.

If not, t = sum(b) where b is the list of "Node: Body: Start" steps.

from ontrack-plugin.

dcoraboeuf avatar dcoraboeuf commented on August 14, 2024

Fixed in 3.4

from ontrack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.