- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for niddle (0.23 sec)
-
src/bytes/example_test.go
} func ExampleCompare_search() { // Binary search to find a matching byte slice. var needle []byte var haystack [][]byte // Assume sorted i := sort.Search(len(haystack), func(i int) bool { // Return haystack[i] >= needle. return bytes.Compare(haystack[i], needle) >= 0 }) if i < len(haystack) && bytes.Equal(haystack[i], needle) { // Found it! } } func ExampleContains() {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
cmd/metrics-v3-system-cpu.go
import ( "context" "math" ) const ( sysCPUAvgIdle = "avg_idle" sysCPUAvgIOWait = "avg_iowait" sysCPULoad = "load" sysCPULoadPerc = "load_perc" sysCPUNice = "nice" sysCPUSteal = "steal" sysCPUSystem = "system" sysCPUUser = "user" ) var ( sysCPUAvgIdleMD = NewGaugeMD(sysCPUAvgIdle, "Average CPU idle time") sysCPUAvgIOWaitMD = NewGaugeMD(sysCPUAvgIOWait, "Average CPU IOWait time")
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 23 23:56:12 GMT 2024 - 3K bytes - Viewed (0) -
cmd/metrics-resource.go
if ts != nil { tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal cpuUserVal := math.Round(ts.User/tot*100*100) / 100 updateResourceMetrics(cpuSubsystem, cpuUser, cpuUserVal, labels, false) cpuSystemVal := math.Round(ts.System/tot*100*100) / 100 updateResourceMetrics(cpuSubsystem, cpuSystem, cpuSystemVal, labels, false) cpuIdleVal := math.Round(ts.Idle/tot*100*100) / 100
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 23 23:56:12 GMT 2024 - 17.4K bytes - Viewed (0) -
internal/http/listener.go
type TCPOptions struct { UserTimeout int // this value is expected to be in milliseconds // When the net.Conn is idle for more than ReadTimeout duration, we close the connection on the client proactively. ClientReadTimeout time.Duration // When the net.Conn is idle for more than WriteTimeout duration, we close the connection on the client proactively. ClientWriteTimeout time.Duration
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Apr 24 04:08:47 GMT 2024 - 5.6K bytes - Viewed (0) -
src/bytes/bytes_test.go
} } } func TestLastIndexByte(t *testing.T) { testCases := []BinOpTest{ {"", "q", -1}, {"abcdef", "q", -1}, {"abcdefabcdef", "a", len("abcdef")}, // something in the middle {"abcdefabcdef", "f", len("abcdefabcde")}, // last byte {"zabcdefabcdef", "z", 0}, // first byte {"a☺b☻c☹d", "b", len("a☺")}, // non-ascii } for _, test := range testCases {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/cmd/asm/internal/asm/endtoend_test.go
} return true } // It would be nice if the error messages always began with // the standard file:line: prefix, // but that's not where we are today. // It might be at the beginning but it might be in the middle of the printed instruction. var fileLineRE = regexp.MustCompile(`(?:^|\()(testdata[/\\][\da-z]+\.s:\d+)(?:$|\)|:)`) // Same as in test/run.go var ( errRE = regexp.MustCompile(`// ERROR ?(.*)`)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Dec 07 18:42:59 GMT 2023 - 11.6K bytes - Viewed (0) -
internal/http/transports.go
// if trhttp2 != nil { // // ReadIdleTimeout is the timeout after which a health check using ping // // frame will be carried out if no frame is received on the // // connection. 5 minutes is sufficient time for any idle connection. // trhttp2.ReadIdleTimeout = 5 * time.Minute // // PingTimeout is the timeout after which the connection will be closed // // if a response to Ping is not received. // trhttp2.PingTimeout = dialTimeout
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Apr 24 04:08:47 GMT 2024 - 5.9K bytes - Viewed (0) -
internal/rest/client.go
} return nil, errors.New(resp.Status) } if !c.NoMetrics { resp.Body = &respBodyMonitor{ReadCloser: resp.Body, expectTimeouts: expectTimeouts} } return resp.Body, nil } // Close closes all idle connections of the underlying http client func (c *Client) Close() { atomic.StoreInt32(&c.connected, closed) } // NewClient - returns new REST client.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 14.4K bytes - Viewed (0) -
cmd/common-main.go
ctxt.RecvBufSize = ctx.Int("recv-buf-size") ctxt.ShutdownTimeout = ctx.Duration("shutdown-timeout") ctxt.IdleTimeout = ctx.Duration("idle-timeout") ctxt.ReadHeaderTimeout = ctx.Duration("read-header-timeout") ctxt.MaxIdleConnsPerHost = ctx.Int("max-idle-conns-per-host") if conf := ctx.String("config"); len(conf) > 0 { err = mergeServerCtxtFromConfigFile(conf, ctxt) } else {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat May 04 00:17:57 GMT 2024 - 35.8K bytes - Viewed (2) -
cmd/storage-rest-client.go
return true // Corner case, the server closed the connection with a keep-alive timeout // some requests are not retried internally, such as POST request with written body case strings.Contains(err.Error(), "server closed idle connection"): return true } return false } // Converts network error to storageErr. This function is // written so that the storageAPI errors are consistent // across network disks.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 26.1K bytes - Viewed (0)