hudson.model.AbstractBuild.getEstimatedDuration()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中hudson.model.AbstractBuild.getEstimatedDuration()方法的一些代码示例,展示了AbstractBuild.getEstimatedDuration()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBuild.getEstimatedDuration()方法的具体详情如下:
包路径:hudson.model.AbstractBuild
类名称:AbstractBuild
方法名:getEstimatedDuration

AbstractBuild.getEstimatedDuration介绍

暂无

代码示例

代码示例来源:origin: Diabol/delivery-pipeline-plugin

private static int calculateBuildProgress(AbstractBuild build) {
  return calculateBuildProgress(
      currentTimeMillis(), build.getTimestamp().getTimeInMillis(), build.getEstimatedDuration());
}

代码示例来源:origin: org.jenkins-ci.plugins/build-pipeline-plugin

/**
 * Returns the estimated percentage complete of the current build.
 *
 * @return - Estimated percentage complete of the current build.
 */
public long getBuildProgress() {
  if (this.currentBuild != null && this.currentBuild.isBuilding()) {
    final long duration = new Date().getTime() - this.currentBuild.getTimestamp().getTimeInMillis();
    return calculatePercentage(duration, this.currentBuild.getEstimatedDuration());
  } else {
    return 0;
  }
}

代码示例来源:origin: openstack-infra/gearman-plugin

int estimatedDuration = (int) currBuild.getEstimatedDuration();
jobData = buildStatusData(currBuild);

相关文章

微信公众号

最新文章

更多

AbstractBuild类方法