From f9ba9bfd6eb2ac6a870ebaa58c874fc466574670 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 12 Mar 2019 18:13:25 -0700 Subject: [PATCH] adds |mass to %lient and %rver --- sys/vane/dill.hoon | 48 ++++++++++++++++++++++++++++----------------- sys/vane/lient.hoon | 14 +++++++++++++ sys/vane/rver.hoon | 14 +++++++++++++ sys/zuse.hoon | 12 ++++++++++++ 4 files changed, 70 insertions(+), 18 deletions(-) diff --git a/sys/vane/dill.hoon b/sys/vane/dill.hoon index 3cdb1764d5..432275eced 100644 --- a/sys/vane/dill.hoon +++ b/sys/vane/dill.hoon @@ -16,10 +16,11 @@ $: a/(unit mass) :: b/(unit mass) :: c/(unit mass) :: - e/(unit mass) :: f/(unit mass) :: g/(unit mass) :: j/(unit mass) :: + l/(unit mass) :: + r/(unit mass) :: == :: == :: ++ axon :: dill per duct @@ -56,9 +57,6 @@ {$veer p/@ta q/path r/@t} :: install vane {$verb $~} :: verbose mode == :: -++ note-eyre :: - $% {$wegh $~} :: - == :: ++ note-ford :: $% {$wegh $~} :: == :: @@ -78,17 +76,24 @@ snap=(unit snapshot:jael) :: head start == :: [%fake our=ship] :: boot fake - [%wegh ~] + [%wegh ~] :: + == :: +++ note-lient :: + $% [%wegh ~] :: + == :: +++ note-rver :: + $% [%wegh ~] :: == :: ++ note :: out request $-> $% {$a note-ames} :: {$b note-behn} :: {$c note-clay} :: {$d note-dill} :: - {$e note-eyre} :: {$f note-ford} :: {$g note-gall} :: {$j note-jael} :: + {$l note-lient} :: + {$r note-rver} :: == :: ++ sign-ames :: $% {$nice $~} :: @@ -108,9 +113,6 @@ ++ sign-dill :: $% {$blit p/(list blit)} :: == :: -++ sign-eyre :: - $% {$mass p/mass} :: - == :: ++ sign-ford :: $% {$mass p/mass} :: == :: @@ -121,17 +123,24 @@ == :: ++ sign-jael :: $% [%init p=ship] :: - [%mass p=mass] + [%mass p=mass] :: + == :: +++ sign-lient :: + $% [%mass p=mass] :: + == :: +++ sign-rver :: + $% [%mass p=mass] :: == :: ++ sign :: in result $<- $% {$a sign-ames} :: {$b sign-behn} :: {$c sign-clay} :: {$d sign-dill} :: - {$e sign-eyre} :: {$f sign-ford} :: {$g sign-gall} :: {%j sign-jael} :: + {$l sign-lient} :: + {$r sign-rver} :: == :::::::: :: dill tiles -- @@ -279,10 +288,11 @@ :* [hen %pass /heft/ames %a %wegh ~] [hen %pass /heft/behn %b %wegh ~] [hen %pass /heft/clay %c %wegh ~] - [hen %pass /heft/eyre %e %wegh ~] [hen %pass /heft/ford %f %wegh ~] [hen %pass /heft/gall %g %wegh ~] [hen %pass /heft/jael %j %wegh ~] + [hen %pass /heft/lient %l %wegh ~] + [hen %pass /heft/rver %r %wegh ~] moz == == @@ -377,7 +387,7 @@ |= sih/sign ^+ +> ?- sih - {?($a $b $c $e $f $g $j) $mass *} + {?($a $b $c $f $g $j $l $r) $mass *} (wegh -.sih p.sih) :: {$a $nice *} @@ -432,7 +442,7 @@ :: +wegh: receive a memory report from a vane and maybe emit full report :: ++ wegh - |= {lal/?($a $b $c $e $f $g $j) mas/mass} + |= {lal/?($a $b $c $f $g $j $l $r) mas/mass} ^+ +> :: update our listing of vane responses with this new one :: @@ -441,20 +451,22 @@ $a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas)) $b ~?(?=(^ b.hef.all) %double-mass-b hef.all(b `mas)) $c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas)) - $e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas)) $f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas)) $g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas)) $j ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas)) + $l ~?(?=(^ l.hef.all) %double-mass-l hef.all(l `mas)) + $r ~?(?=(^ r.hef.all) %double-mass-r hef.all(r `mas)) == :: if not all vanes have responded yet, no-op :: ?. ?& ?=(^ a.hef.all) ?=(^ b.hef.all) ?=(^ c.hef.all) - ?=(^ e.hef.all) ?=(^ f.hef.all) ?=(^ g.hef.all) ?=(^ j.hef.all) + ?=(^ l.hef.all) + ?=(^ r.hef.all) == +>.$ :: clear vane reports from our state before weighing ourself @@ -462,8 +474,8 @@ :: Otherwise, the state of vanes printed after this one get absorbed :: into Dill's %dot catchall report. :: - =/ ven=(list mass) ~[u.a u.b u.c u.e u.g u.f u.j]:hef.all - => .(hef.all [~ ~ ~ ~ ~ ~ ~]) + =/ ven=(list mass) ~[u.a u.b u.c u.g u.f u.j u.l u.r]:hef.all + => .(hef.all [~ ~ ~ ~ ~ ~ ~ ~]) :: wegh ourself now that our state doesn't include other masses :: =/ self=mass diff --git a/sys/vane/lient.hoon b/sys/vane/lient.hoon index ac113cb7dc..9f0ab74531 100644 --- a/sys/vane/lient.hoon +++ b/sys/vane/lient.hoon @@ -342,6 +342,20 @@ %receive =^ moves state.ax (receive:client +.task) [moves light-gate] + :: + %wegh + :_ light-gate + :~ :* duct + %give + %mass + ^- mass + :+ %lient %| + :~ nex+&+next-id.state.ax + outbound+&+outbound-duct.state.ax + by-id+&+connection-by-id.state.ax + by-duct+&+connection-by-duct.state.ax + axle+&+ax + == == == == :: http-client issues no requests to other vanes :: diff --git a/sys/vane/rver.hoon b/sys/vane/rver.hoon index 37de209ab6..b4efa164b8 100644 --- a/sys/vane/rver.hoon +++ b/sys/vane/rver.hoon @@ -1666,6 +1666,20 @@ %disconnect =. server-state.ax (remove-binding:server binding.task) [~ http-server-gate] + :: + %wegh + :_ http-server-gate + :~ :* duct + %give + %mass + ^- mass + :+ %rver %| + :~ bindings+&+bindings.server-state.ax + auth+&+authentication-state.server-state.ax + connections+&+connections.server-state.ax + channels+&+channel-state.server-state.ax + axle+&+ax + == == == == :: ++ take diff --git a/sys/zuse.hoon b/sys/zuse.hoon index 002699b10e..bb2cf33565 100644 --- a/sys/zuse.hoon +++ b/sys/zuse.hoon @@ -2057,6 +2057,9 @@ :: %response: response to the caller :: [%http-response =client-response] + :: memory usage report + :: + [%mass =mass] == :: ++ task @@ -2075,6 +2078,9 @@ :: receives http data from outside :: [%receive id=@ud =http-event:http] + :: memory usage request + :: + [%wegh ~] == -- :: +client-response: one or more client responses given to the caller @@ -2162,6 +2168,9 @@ :: not allowed. :: [%bound accepted=? =binding] + :: memory usage report + :: + [%mass =mass] == :: ++ task @@ -2197,6 +2206,9 @@ :: the first place. :: [%disconnect =binding] + :: memory usage request + :: + [%wegh ~] == :: --