[ARVADOS] updated: db55813cc9f24c699db1d3386a56bc0a36debab0

git at public.curoverse.com git at public.curoverse.com
Wed Nov 18 13:48:41 EST 2015


Summary of changes:
 sdk/cli/bin/crunch-job      | 2 +-
 services/fuse/bin/arv-mount | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

       via  db55813cc9f24c699db1d3386a56bc0a36debab0 (commit)
      from  c112d8551b75514b9ccbde44ee3e37904051dbb1 (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 db55813cc9f24c699db1d3386a56bc0a36debab0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Nov 18 13:48:35 2015 -0500

    3137: Change --stats to --crunchstat-interval as specified on the ticket.

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index fcaef36..65cbfd6 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -896,7 +896,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
         .q{&& SWAP=$(awk '($1 == "SwapTotal:"){print $2}' </proc/meminfo) }
         ."&& MEMLIMIT=\$(( (\$MEM * 95) / ($ENV{CRUNCH_NODE_SLOTS} * 100) )) "
         ."&& let SWAPLIMIT=\$MEMLIMIT+\$SWAP ";
-    $command .= "&& exec arv-mount --by-pdh --stats --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
+    $command .= "&& exec arv-mount --by-pdh --crunchstat-interval=10 --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
     if ($docker_hash)
     {
       my $containername = "$Jobstep->{arvados_task}->{uuid}-$Jobstep->{failures}";
diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index a8d00c9..6e22c9f 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -48,8 +48,7 @@ class Stat(object):
                                                              self.ing_name,
                                                              delta))
 
-def statlogger(keep, ops):
-    interval = 10
+def statlogger(interval, keep, ops):
     calls = Stat("keepcalls", interval, "put", "get",
                  keep.put_counter.get,
                  keep.get_counter.get)
@@ -114,7 +113,7 @@ with "--".
     parser.add_argument('--read-only', action='store_false', help="Mount will be read only (default)", dest="enable_write", default=False)
     parser.add_argument('--read-write', action='store_true', help="Mount will be read-write", dest="enable_write", default=False)
 
-    parser.add_argument('--stats', action='store_true', help="Write stats to stderr", default=False)
+    parser.add_argument('--crunchstat-interval', type=float, help="Write stats to stderr every N seconds (default disabled)", default=0)
 
     parser.add_argument('--exec', type=str, nargs=argparse.REMAINDER,
                         dest="exec_args", metavar=('command', 'args', '...', '--'),
@@ -162,8 +161,8 @@ with "--".
         api = ThreadSafeApiCache(apiconfig=arvados.config.settings(),
                                  keep_params={"block_cache": arvados.keep.KeepBlockCache(args.file_cache)})
 
-        if args.stats:
-            statsthread = threading.Thread(target=statlogger, args=(api.keep, operations))
+        if args.crunchstat_interval:
+            statsthread = threading.Thread(target=statlogger, args=(args.crunchstat_interval, api.keep, operations))
             statsthread.daemon = True
             statsthread.start()
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list