Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for n2 (0.12 sec)

  1. cmd/dummy-data-generator_test.go

    	bufLen := 32 * 1024
    	b1, b2 := make([]byte, bufLen), make([]byte, bufLen)
    	for i := 0; true; i++ {
    		n1, e1 := io.ReadFull(r1, b1)
    		n2, e2 := io.ReadFull(r2, b2)
    		if n1 != n2 {
    			return false, fmt.Sprintf("Read %d != %d bytes from the readers", n1, n2)
    		}
    		if !bytes.Equal(b1[:n1], b2[:n2]) {
    			return false, fmt.Sprintf("After reading %d equal buffers (32Kib each), we got the following two strings:\n%v\n%v\n",
    				i, b1, b2)
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  2. cmd/bucket-replication-metrics.go

    		Peak:    peak,
    		Curr:    curr,
    		measure: rx.measure,
    		N:       rx.N + o.N,
    	}
    }
    
    func calcAvg(x, y float64, n1, n2 int64) float64 {
    	if n1+n2 == 0 {
    		return 0
    	}
    	avg := (x*float64(n1) + y*float64(n2)) / float64(n1+n2)
    	return avg
    }
    
    // Add a new transfer
    func (rx *XferStats) addSize(sz int64, t time.Duration) {
    	if rx.measure == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top