- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,345 for onDone (0.11 sec)
-
pkg/test/loadbalancersim/network/connection.go
) type Connection interface { Name() string Request(onDone func()) TotalRequests() uint64 ActiveRequests() uint64 Latency() *timeseries.Instance } func NewConnection(name string, request func(onDone func())) Connection { return &connection{ request: request, helper: NewConnectionHelper(name), } } type connection struct { request func(onDone func()) helper *ConnectionHelper }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 1.4K bytes - Viewed (0) -
pkg/test/loadbalancersim/network/helper.go
func (c *ConnectionHelper) Request(request func(onDone func()), onDone func()) { start := time.Now() c.total.Inc() c.active.Inc() wrappedDone := func() { // Calculate the latency for this request. latency := time.Since(start) // Add the latency observation. c.hist.AddObservation(latency.Seconds(), time.Now()) c.active.Dec() // Invoke the caller's handler. onDone() } request(wrappedDone)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 1.7K bytes - Viewed (0) -
pkg/test/loadbalancersim/loadbalancer/leastrequest.go
if index2 == index1 { index2 = (index2 + 1) % numConnections } return lb.get(index1), lb.get(index2) } func (lb *unweightedLeastRequest) Request(onDone func()) { if len(lb.conns) == 1 { lb.doRequest(lb.get(0), onDone) return } // Pick 2 endpoints at random. c1, c2 := lb.pick2() // Choose the endpoint with fewer active requests. selected := c1
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Nov 14 20:23:34 UTC 2022 - 3.4K bytes - Viewed (0) -
pkg/test/loadbalancersim/mesh/mesh.go
Src: src.Locality(), Dest: dest.Locality(), }] request := dest.Request if networkLatency > time.Duration(0) { request = func(onDone func()) { m.networkQ.Schedule(func() { dest.Request(onDone) }, time.Now().Add(networkLatency)) } } return network.NewConnection(dest.Name(), request) } func (m *Instance) ShutDown() { m.networkQ.ShutDown()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jan 27 20:55:37 UTC 2022 - 2.3K bytes - Viewed (0) -
pkg/test/loadbalancersim/loadbalancer/roundrobin.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 1.5K bytes - Viewed (0) -
pkg/test/loadbalancersim/loadbalancer/weight.go
} } return true } func (lb *weightedConnections) get(index int) *WeightedConnection { return lb.conns[index] } func (lb *weightedConnections) doRequest(c *WeightedConnection, onDone func()) { lb.helper.Request(c.Request, onDone) } func (lb *weightedConnections) Name() string { return lb.helper.Name() } func (lb *weightedConnections) TotalRequests() uint64 { return lb.helper.TotalRequests() }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 2.8K bytes - Viewed (0) -
pkg/test/loadbalancersim/mesh/node.go
func (n *Node) Latency() *timeseries.Instance { return n.helper.Latency() } func (n *Node) Request(onDone func()) { n.helper.Request(func(wrappedOnDone func()) { deadline := time.Now().Add(n.calcRequestDuration()) // Schedule the done function to be called after the deadline. n.q.Schedule(wrappedOnDone, deadline) }, onDone) } func (n *Node) Locality() locality.Instance { return n.locality }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 3.7K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/impl/none.h
namespace libtf { namespace impl { /// @brief The Singleton `None` class. /// /// This class is not user-constructible. To create a `None` instance, use /// None::GetInstance(). class None final { public: /// Retrieves the `None` instance. /// /// @return Returns the `None` singleton. static None& GetInstance(); /// Equality operator. bool operator==(const None& other) const { return true; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Aug 03 20:03:31 UTC 2021 - 1.6K bytes - Viewed (0) -
pkg/controlplane/reconcilers/none.go
Wojciech TyczyĆski <******@****.***> 1651518157 +0200
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 05 11:45:48 UTC 2022 - 1.5K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/impl/none.cc
limitations under the License. ==============================================================================*/ #include "tensorflow/cc/experimental/libtf/impl/none.h" namespace tf { namespace libtf { namespace impl { None& None::GetInstance() { static None* none_inst = new None(); return *none_inst; } } // namespace impl } // namespace libtf
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Aug 03 20:03:31 UTC 2021 - 930 bytes - Viewed (0)