com.netflix.spinnaker.orca.pipeline.model.Execution.getStartTime()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(110)

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

Execution.getStartTime介绍

暂无

代码示例

代码示例来源:origin: spinnaker/kayenta

Long startTime = pipeline.getStartTime();
if (startTime != null) {
 canaryExecutionStatusResponseBuilder

代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis

map.put("limitConcurrent", String.valueOf(execution.isLimitConcurrent()));
map.put("buildTime", String.valueOf(execution.getBuildTime() != null ? execution.getBuildTime() : 0L));
map.put("startTime", execution.getStartTime() != null ? execution.getStartTime().toString() : null);
map.put("endTime", execution.getEndTime() != null ? execution.getEndTime().toString() : null);
map.put("startTimeExpiry", execution.getStartTimeExpiry() != null ? String.valueOf(execution.getStartTimeExpiry()) : null);

代码示例来源:origin: spinnaker/kayenta

Long startTime = pipeline.getStartTime();
if (startTime != null) {
 responseBuilder

代码示例来源:origin: com.netflix.spinnaker.orca/orca-core

@Override
 public int compare(Execution a, Execution b) {
  Long aStartTime = a.getStartTime();
  Long bStartTime = b.getStartTime();
  if (aStartTime == null) {
   return -1;
  }
  if (bStartTime == null) {
   return 0;
  }
  int startCompare = bStartTime.compareTo(aStartTime);
  if (startCompare == 0) {
   return b.getId().compareTo(a.getId());
  }
  return startCompare;
 }
},

代码示例来源:origin: com.netflix.spinnaker.orca/orca-core

@Override
 public Boolean call(Execution execution) {
  if (!COMPLETED_STATUSES.contains(execution.getStatus().toString())) {
   return false;
  }
  long startTime = execution.getStartTime() == null ? execution.getBuildTime() : execution.getStartTime();
  return startTime <= (Instant.ofEpochMilli(clock.millis()).minus(thresholdDays, ChronoUnit.DAYS).toEpochMilli());
 }
};

代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis

@Nonnull
@Override
public List<Execution> retrieveOrchestrationsForApplication(@Nonnull String application,
                              @Nonnull ExecutionCriteria criteria,
                              @Nullable ExecutionComparator sorter) {
 List<Execution> executions = retrieveOrchestrationsForApplication(application, criteria)
  .filter((orchestration) -> {
   if (criteria.getStartTimeCutoff() != null) {
    long startTime = Optional.ofNullable(orchestration.getStartTime()).orElse(0L);
    return startTime == 0 || (startTime > criteria.getStartTimeCutoff().toEpochMilli());
   }
   return true;
  })
  .subscribeOn(Schedulers.io())
  .toList()
  .toBlocking()
  .single();
 if (sorter != null) {
  executions.sort(sorter);
 }
 return executions.subList(0, Math.min(executions.size(), criteria.getPageSize()));
}

代码示例来源:origin: com.netflix.spinnaker.orca/orca-core

@Override
 public void afterExecution(Persister persister,
               Execution execution,
               ExecutionStatus executionStatus,
               boolean wasSuccessful) {
  if (execution.getType() != ORCHESTRATION) {
   // not concerned with pipelines right now (pipelines can have wait stages / manual judgments which skew execution time)
   return;
  }

  if (execution.getApplication() == null || execution.getStartTime() == null || execution.getEndTime() == null) {
   // should normally have all attributes but a guard just in case
   return;
  }

  Id id = registry
   .createId("executions.totalTime")
   .withTag("executionType", "orchestration")
   .withTag("successful", Boolean.valueOf(wasSuccessful).toString())
   .withTag("application", execution.getApplication().toLowerCase());

  registry.timer(id).record(execution.getEndTime() - execution.getStartTime(), TimeUnit.MILLISECONDS);
 }
}

代码示例来源:origin: com.netflix.kayenta/kayenta-core

Long startTime = pipeline.getStartTime();
if (startTime != null) {
 canaryExecutionStatusResponseBuilder

代码示例来源:origin: com.netflix.kayenta/kayenta-standalone-canary-analysis

Long startTime = pipeline.getStartTime();
if (startTime != null) {
 responseBuilder

相关文章