public String getExecutionDurationText(Execution ex){ if(ex.getDuration() == null){ return "[duration not available]"; } else if(ex.getDuration() < 1025){ return ex.getDuration()+"ms"; } else { return String.format("%.2fsec",(ex.getDuration().floatValue()/1000)); } } public String getExecutionStartTime(Execution ex){
public String getExecutionOffsetText(Execution ex){ if(ex.getChain() == null || ex.getChain().getStarted() == null || ex.getStarted() == null){ return null; } else { return String.format("%6dms",ex.getStarted().getTime() - ex.getChain().getStarted().getTime()); } } public String getExecutionDurationText(Execution ex){
public String getExecutionCompletionTime(Execution ex){ if(ex.getCompleted() != null){ return format.format(ex.getCompleted()); } else { return "unknown"; } } public String getExecutionStatusText(Execution ex){
private ExecutionMetadata(Graph executionMetadata, IRI contentItemUri, BlankNodeOrIRI ce){ chainExecution = new ChainExecution(executionMetadata, ce); engineExecutions = new HashMap<String,Execution>(); for(BlankNodeOrIRI ex : ExecutionMetadataHelper.getExecutions(executionMetadata, ce)){ Execution execution = new Execution(chainExecution,executionMetadata, ex); engineExecutions.put(execution.getExecutionNode().getEngineName(),execution); } }
message.append(", "); long ed = ee.getDuration(); eds = eds + ed; int edp = Math.round(ed*100/(float)cd); message.append(ee.getExecutionNode().getEngineName()) .append(": ").append(ed).append("ms (").append(edp).append("%)");
public abstract class Example { public abstract void example(Execution e); public final void run(boolean b, String s) { example(new Execution(b, s); } }
@Override public int compare(Execution e1, Execution e2) { return e1.getStarted().compareTo(e2.getStarted()); } });
public String getExecutionStatusText(Execution ex){ if(ExecutionMetadata.STATUS_COMPLETED.equals(ex.getStatus())){ return "completed"; } else if(ExecutionMetadata.STATUS_FAILED.equals(ex.getStatus())){ return "failed"; } else if(ExecutionMetadata.STATUS_IN_PROGRESS.equals(ex.getStatus())){ return "in-progress"; } else if(ExecutionMetadata.STATUS_SCHEDULED.equals(ex.getStatus())){ return "scheduled"; } else if(ExecutionMetadata.STATUS_SKIPPED.equals(ex.getStatus())){ return "skipped"; } else { return "unknown"; } } public static class EntityExtractionSummary implements Comparable<EntityExtractionSummary> {
private ExecutionMetadata(Graph executionMetadata, IRI contentItemUri, BlankNodeOrIRI ce){ chainExecution = new ChainExecution(executionMetadata, ce); engineExecutions = new HashMap<String,Execution>(); for(BlankNodeOrIRI ex : ExecutionMetadataHelper.getExecutions(executionMetadata, ce)){ Execution execution = new Execution(chainExecution,executionMetadata, ex); engineExecutions.put(execution.getExecutionNode().getEngineName(),execution); } }
engineExecutions = new ArrayList<Execution>(); for(BlankNodeOrIRI ex : ExecutionMetadataHelper.getExecutions(executionMetadata, ce)){ engineExecutions.add(new Execution(chainExecution,executionMetadata, ex));
public String getExecutionStartTime(Execution ex){ if(ex.getStarted() != null){ return format.format(ex.getStarted()); } else { return "unknown"; } } public String getExecutionCompletionTime(Execution ex){
public String getExecutionStatusText(Execution ex){ if(ExecutionMetadata.STATUS_COMPLETED.equals(ex.getStatus())){ return "completed"; } else if(ExecutionMetadata.STATUS_FAILED.equals(ex.getStatus())){ return "failed"; } else if(ExecutionMetadata.STATUS_IN_PROGRESS.equals(ex.getStatus())){ return "in-progress"; } else if(ExecutionMetadata.STATUS_SCHEDULED.equals(ex.getStatus())){ return "scheduled"; } else if(ExecutionMetadata.STATUS_SKIPPED.equals(ex.getStatus())){ return "skipped"; } else { return "unknown"; } } public static class EntityExtractionSummary implements Comparable<EntityExtractionSummary> {
engineExecutions = new ArrayList<Execution>(); for(BlankNodeOrIRI ex : ExecutionMetadataHelper.getExecutions(executionMetadata, ce)){ engineExecutions.add(new Execution(chainExecution,executionMetadata, ex));
public String getExecutionOffsetText(Execution ex){ if(ex.getChain() == null || ex.getChain().getStarted() == null || ex.getStarted() == null){ return null; } else { return String.format("%6dms",ex.getStarted().getTime() - ex.getChain().getStarted().getTime()); } } public String getExecutionDurationText(Execution ex){
public String getExecutionStartTime(Execution ex){ if(ex.getStarted() != null){ return format.format(ex.getStarted()); } else { return "unknown"; } } public String getExecutionCompletionTime(Execution ex){
ExecutionMetadata em = ExecutionMetadata.parseFrom(job.getExecutionMetadata(), ci.getUri()); for(Entry<String,Execution> ex : em.getEngineExecutions().entrySet()){ sb.append(" -").append(ex.getKey()).append(": ").append(ex.getValue().getStatus()).append('\n');
public String getExecutionDurationText(Execution ex){ if(ex.getDuration() == null){ return "[duration not available]"; } else if(ex.getDuration() < 1025){ return ex.getDuration()+"ms"; } else { return String.format("%.2fsec",(ex.getDuration().floatValue()/1000)); } } public String getExecutionStartTime(Execution ex){
public String getExecutionCompletionTime(Execution ex){ if(ex.getCompleted() != null){ return format.format(ex.getCompleted()); } else { return "unknown"; } } public String getExecutionStatusText(Execution ex){