flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkirsch <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-1974] JobExecutionResult NetRuntime - d...
Date Wed, 06 May 2015 19:54:07 GMT
Github user jkirsch commented on a diff in the pull request:

    https://github.com/apache/flink/pull/652#discussion_r29795245
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java
---
    @@ -47,12 +48,23 @@ public JobExecutionResult(JobID jobID, long netRuntime, Map<String,
Object> accu
     	 * Gets the net execution time of the job, i.e., the execution time in the parallel
system,
     	 * without the pre-flight steps like the optimizer.
     	 *
    -	 * @return The net execution time.
    +	 * @return The net execution time in milliseconds.
     	 */
     	public long getNetRuntime() {
     		return this.netRuntime;
     	}
     
    +    /**
    +     * Gets the net execution time of the job, i.e., the execution time in the parallel
system,
    +     * without the pre-flight steps like the optimizer in a desired unit.
    +     *
    +     * @param desiredUnit the unit of the <tt>NetRuntime</tt>
    +     * @return The net execution time in the desired unit.
    +     */
    +	public long elapsedNetRuntime(TimeUnit desiredUnit) {
    --- End diff --
    
    Sure, I just based it on the [Guava StopWatch ](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Stopwatch.html)
functionality which has elapsed.
    
    In hindsight I noticed that the runtime for the org.apache.flink.runtime.jobmanager is
now reporting the runtime in seconds `org.apache.flink.runtime.jobmanager.JobInfo` which is
a change from the 0.8.1 release, which I used and noticed the missing documentation.
    
    ```scala
      def duration: Long = {
        if(end != -1){
          (end - start)/1000
        }else{
          -1
        }
    ```
    introduced with commit 241c1ca4db1e5f4b3f81b3cdf694246062f032d1
    
    So I either update the code to the current state (seconds) or propose for high accuracy
to revert back to the old behaviour  ?
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message