Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for bw (0.14 sec)

  1. cmd/bitrot.go

    func closeBitrotWriters(ws []io.Writer) {
    	for _, w := range ws {
    		if w != nil {
    			if bw, ok := w.(io.Closer); ok {
    				bw.Close()
    			}
    		}
    	}
    }
    
    // Returns hash sum for whole-bitrot, nil for streaming-bitrot.
    func bitrotWriterSum(w io.Writer) []byte {
    	if bw, ok := w.(*wholeBitrotWriter); ok {
    		return bw.Sum(nil)
    	}
    	return nil
    }
    
    // Returns the size of the file with bitrot protection
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  2. cmd/bitrot_test.go

    		t.Fatal(err)
    	}
    	_, err = writer.Write([]byte("aaaaaaaaaa"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = writer.Write([]byte("aaaaa"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	if bw, ok := writer.(io.Closer); ok {
    		bw.Close()
    	}
    
    	reader := newBitrotReader(disk, nil, volume, filePath, 35, bitrotAlgo, bitrotWriterSum(writer), 10)
    	b := make([]byte, 10)
    	if _, err = reader.ReadAt(b, 0); err != nil {
    		t.Fatal(err)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. cmd/bitrot-streaming.go

    	r, w := io.Pipe()
    	h := algo.New()
    
    	bw := &streamingBitrotWriter{
    		iow:          ioutil.NewDeadlineWriter(w, globalDriveConfig.GetMaxTimeout()),
    		closeWithErr: w.CloseWithError,
    		h:            h,
    		shardSize:    shardSize,
    		canClose:     &sync.WaitGroup{},
    	}
    	bw.canClose.Add(1)
    	go func() {
    		defer bw.canClose.Done()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  4. cmd/bucket-replication-handlers.go

    	bwMap := bwRpt.BucketStats
    	for arn, st := range stats.ReplicationStats.Stats {
    		for opts, bw := range bwMap {
    			if opts.ReplicationARN != "" && opts.ReplicationARN == arn {
    				st.BandWidthLimitInBytesPerSecond = bw.LimitInBytesPerSecond
    				st.CurrentBandwidthInBytesPerSecond = bw.CurrentBandwidthInBytesPerSecond
    				stats.ReplicationStats.Stats[arn] = st
    			}
    		}
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 28 04:08:53 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  5. src/bufio/bufio_test.go

    	bs := []byte(str)
    	for i := 0; i < b.N; i++ {
    		bw := NewWriter(io.Discard)
    		bw.Flush()
    		bw.WriteByte('a')
    		bw.Flush()
    		bw.WriteRune('B')
    		bw.Flush()
    		bw.Write(bs)
    		bw.Flush()
    		bw.WriteString(str)
    		bw.Flush()
    	}
    }
    
    func BenchmarkWriterFlush(b *testing.B) {
    	b.ReportAllocs()
    	bw := NewWriter(io.Discard)
    	str := strings.Repeat("x", 50)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  6. src/cmd/api/main_test.go

    		}
    		comma := strings.Index(f, ",")
    		for cname := range cmap {
    			f2 := fmt.Sprintf("%s (%s)%s", f[:comma], cname, f[comma:])
    			features = append(features, f2)
    		}
    	}
    
    	bw := bufio.NewWriter(os.Stdout)
    	defer bw.Flush()
    
    	var required []string
    	for _, file := range checkFiles {
    		required = append(required, fileFeatures(file, needApproval(file))...)
    	}
    	for _, file := range nextFiles {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  7. cmd/metacache-set.go

    					exit = true
    				}
    			}
    			metaMu.Unlock()
    		}
    	}()
    
    	const retryDelay = 200 * time.Millisecond
    	const maxTries = 5
    
    	// Keep destination...
    	// Write results to disk.
    	bw := newMetacacheBlockWriter(entries, func(b *metacacheBlock) error {
    		// if the block is 0 bytes and its a first block skip it.
    		// skip only this for Transient caches.
    		if len(b.data) == 0 && b.n == 0 && o.Transient {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:59:08 GMT 2024
    - 30.4K bytes
    - Viewed (0)
Back to top