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

x33g5p2x  于2022-01-28 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(90)

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

Run.getEstimatedDuration介绍

[英]Returns the estimated duration for this run if it is currently running. Default to Job#getEstimatedDuration(), may be overridden in subclasses if duration may depend on run specific parameters (like incremental Maven builds).
[中]如果当前正在运行,则返回此运行的估计持续时间。如果持续时间可能取决于运行特定参数(如增量Maven构建),则子类中可能会覆盖默认的作业#getEstimatedDuration()。

代码示例

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

public long superGetEstimatedDuration() {
  return super.getEstimatedDuration();
}

代码示例来源:origin: io.jenkins.plugins/docker-slaves

@Override public long getEstimatedDuration() {
  Run<?,?> r = run();
  // Not accurate if there are multiple slaves in one build, but better than nothing:
  return r != null ? r.getEstimatedDuration() : -1;
}

代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-durable-task-step

@Override public long getEstimatedDuration() {
  Run<?,?> r = run();
  // Not accurate if there are multiple slaves in one build, but better than nothing:
  return r != null ? r.getEstimatedDuration() : -1;
}

代码示例来源:origin: jenkinsci/docker-slaves-plugin

@Override public long getEstimatedDuration() {
  Run<?,?> r = run();
  // Not accurate if there are multiple slaves in one build, but better than nothing:
  return r != null ? r.getEstimatedDuration() : -1;
}

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

@Override
@Exported
public long getEstimatedDuration() {
  initPython();
  if (pexec.isImplemented(82)) {
    return pexec.execPythonLong("get_estimated_duration");
  } else {
    return super.getEstimatedDuration();
  }
}

相关文章

微信公众号

最新文章

更多

Run类方法