[ARVADOS] updated: 6eae76355f346740cc50ddba4656239c507461ac

Git user git at public.curoverse.com
Tue May 23 19:13:53 EDT 2017


Summary of changes:
 apps/workbench/app/models/container.rb             |   4 +-
 apps/workbench/app/models/container_request.rb     |   4 +-
 apps/workbench/app/models/container_work_unit.rb   |  24 +-
 apps/workbench/app/models/proxy_work_unit.rb       |  28 +-
 .../app/views/work_units/_show_status.html.erb     |  19 +-
 build/run-tests.sh                                 |   7 +-
 doc/user/cwl/cwl-style.html.textile.liquid         |   5 +
 sdk/go/keepclient/block_cache.go                   |   4 +
 sdk/go/keepclient/hashcheck.go                     |  10 +-
 sdk/go/manifest/manifest.go                        |   1 -
 services/api/app/models/container.rb               |  87 +++--
 services/api/app/models/job.rb                     |  21 +-
 services/api/lib/log_reuse_info.rb                 |  16 +
 services/api/test/unit/container_test.rb           |  13 +
 services/keep-web/handler.go                       |   2 +-
 vendor/.gitignore                                  |   3 +
 vendor/vendor.json                                 | 370 +++++++++++++++++++++
 17 files changed, 550 insertions(+), 68 deletions(-)
 create mode 100644 services/api/lib/log_reuse_info.rb
 create mode 100644 vendor/.gitignore
 create mode 100644 vendor/vendor.json

       via  6eae76355f346740cc50ddba4656239c507461ac (commit)
       via  b310fc04b9e60b974f4bfc2c86a5c45ecd7c65f2 (commit)
       via  8045ed8ae35f2436cb3330de028294654af91c7b (commit)
       via  89bf20191626c26dba2fcbdb4d660cd7c4063168 (commit)
       via  b22ff6242148a9b37baef6c74701fa85a8765adf (commit)
       via  a9b15a2f041744c8fac8c0b12fa8b61d1a7292f8 (commit)
       via  138eedbea2658ef397c7a58ce48d6f06077ba140 (commit)
       via  83b73a4718f09b106f225d45f08e10ae92ce3f38 (commit)
       via  303424c3f3ed01f65c9f880ff1ff32bc7a46621b (commit)
       via  cad24bba2240b47f59bc5719a035e85ff5eb60ef (commit)
       via  1e7d0d5fe2d2ec5c4fdbbe18d047ab70d8ae5db1 (commit)
       via  49a9c33ea6119c42ad3d2d585ed7b2f9e4339132 (commit)
       via  fe7467555e7d6843bea4ede99bd07c1476df7d0d (commit)
       via  642e59798974a4c3bb0ecfebd3fa790c912d1187 (commit)
       via  d956fd4fa88796c80edff99d4b1dcf97cbd0011d (commit)
       via  dfe5c5a6a288f59ffed7268458e1a09f26594215 (commit)
       via  d95ccc6bbbf94e957b939ca9d9aea71cda345944 (commit)
       via  02d1074b356837f1a06a25ac3dc353ecf541b444 (commit)
       via  627fbeb0406fcdd9cdc9e90a6e9529f48dc37321 (commit)
       via  865d1b22bb42a6c89ca9aa9a3513f3c61c6547c7 (commit)
       via  b1b7a0be3c789795675e731c8c64bee3cb6d718c (commit)
       via  37470b030384ebe8a73e6d1e725cbde4abb924da (commit)
       via  513b7af1bfe31c0056129abebf60671810a0ef40 (commit)
      from  2e83bfa0e38b87632871f91cead42c9ead3d7bb7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 6eae76355f346740cc50ddba4656239c507461ac
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Tue May 23 20:11:14 2017 -0300

    11501: When calculating a work unit's running time, only include 'leaf' children, filtering those that were reused.

diff --git a/apps/workbench/app/models/proxy_work_unit.rb b/apps/workbench/app/models/proxy_work_unit.rb
index eb83238..86e8b7c 100644
--- a/apps/workbench/app/models/proxy_work_unit.rb
+++ b/apps/workbench/app/models/proxy_work_unit.rb
@@ -222,20 +222,28 @@ class ProxyWorkUnit < WorkUnit
     state_label == 'Failed'
   end
 
-  def all_children
+  def runtime_contributors
+    contributors = []
     if children.any?
-      children + children.collect{|c| c.all_children}.flatten
+      children.each{|c| contributors << c.runtime_contributors}
     else
-      []
+      contributors << self
+    end
+    # Avoid counting reused containers
+    if started_at
+      contributors.flatten.reject{|c| c.started_at ? c.started_at < started_at : true}
+    else
+      contributors.flatten
     end
   end
 
   def runningtime
-    ApplicationController.helpers.determine_wallclock_runtime(if children.any? then all_children else [self] end)
+    ApplicationController.helpers.determine_wallclock_runtime(if children.any? then runtime_contributors else [self] end)
   end
 
   def show_runtime
     walltime = 0
+    running_time = runningtime
     if started_at
       walltime = if finished_at then (finished_at - started_at) else (Time.now - started_at) end
     end
@@ -253,10 +261,10 @@ class ProxyWorkUnit < WorkUnit
         resp << "has been active for "
       end
 
-      if walltime > runningtime
+      if walltime > running_time
         resp << ApplicationController.helpers.render_time(walltime, false)
       else
-        resp << ApplicationController.helpers.render_time(runningtime, false)
+        resp << ApplicationController.helpers.render_time(running_time, false)
       end
 
       if finished_at
@@ -289,10 +297,10 @@ class ProxyWorkUnit < WorkUnit
 
       cpu_time = cputime
 
-      resp << ApplicationController.helpers.render_time(runningtime, false)
-      if (walltime - runningtime) > 0
+      resp << ApplicationController.helpers.render_time(running_time, false)
+      if (walltime - running_time) > 0
         resp << "("
-        resp << ApplicationController.helpers.render_time(walltime - runningtime, false)
+        resp << ApplicationController.helpers.render_time(walltime - running_time, false)
         resp << "queued)"
       end
       if cpu_time == 0
@@ -301,7 +309,7 @@ class ProxyWorkUnit < WorkUnit
         resp << " and used "
         resp << ApplicationController.helpers.render_time(cpu_time, false)
         resp << " of node allocation time ("
-        resp << (cpu_time/runningtime).round(1).to_s
+        resp << (cpu_time/running_time).round(1).to_s
         resp << "⨯ scaling)."
       end
     end

commit b310fc04b9e60b974f4bfc2c86a5c45ecd7c65f2
Merge: 2e83bfa 8045ed8
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Tue May 23 11:26:33 2017 -0300

    11501: Merge branch 'master' into 11501-job-stats-discrepancy


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list