Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 59 of 59 for ResetTimer (0.23 sec)

  1. internal/s3select/select_benchmark_test.go

            </CSV>
        </OutputSerialization>
        <RequestProgress>
            <Enabled>FALSE</Enabled>
        </RequestProgress>
    </SelectObjectContentRequest>
    `)
    
    	csvData := genSampleCSVData(count)
    
    	b.ResetTimer()
    	b.ReportAllocs()
    	b.SetBytes(int64(count))
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			s3Select, err := NewS3Select(bytes.NewReader(requestXML))
    			if err != nil {
    				b.Fatal(err)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 14 13:54:47 UTC 2022
    - 5K bytes
    - Viewed (0)
  2. internal/dsync/drwmutex_test.go

    	}()
    	mu.Lock(id, source)
    	mu.RUnlock(context.Background())
    }
    
    // Borrowed from rwmutex_test.go
    func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    	b.RunParallel(func(pb *testing.PB) {
    		foo := 0
    		for pb.Next() {
    			rwm := NewDRWMutex(ds, "test")
    			foo++
    			if foo%writeRatio == 0 {
    				rwm.Lock(id, source)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  3. internal/s3select/csv/reader_contrib_test.go

    	r, err := NewReader(io.NopCloser(bytes.NewBuffer(f)), &args)
    	if err != nil {
    		b.Fatalf("Reading init failed with %s", err)
    	}
    	defer r.Close()
    	b.ReportAllocs()
    	b.ResetTimer()
    	b.SetBytes(int64(len(f)))
    	var record sql.Record
    	for i := 0; i < b.N; i++ {
    		r, err = NewReader(io.NopCloser(bytes.NewBuffer(f)), &args)
    		if err != nil {
    			b.Fatalf("Reading init failed with %s", err)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 38.5K bytes
    - Viewed (0)
  4. src/archive/zip/writer_test.go

    	}
    
    	b.ReportAllocs()
    	// Run once and then reset the timer.
    	// This effectively discards the very large initial flate setup cost,
    	// as well as the initialization of bigBuf.
    	runOnce(&bytes.Buffer{})
    	b.ResetTimer()
    
    	b.RunParallel(func(pb *testing.PB) {
    		var buf bytes.Buffer
    		for pb.Next() {
    			runOnce(&buf)
    		}
    	})
    }
    
    func writeTestsToFS(tests []WriteTest) fs.FS {
    	fsys := fstest.MapFS{}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Sep 23 14:32:33 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  5. cmd/erasure-encode_test.go

    	content := make([]byte, size)
    
    	for i := 0; i < dataDown; i++ {
    		disks[i] = OfflineDisk
    	}
    	for i := data; i < data+parityDown; i++ {
    		disks[i] = OfflineDisk
    	}
    
    	b.ResetTimer()
    	b.SetBytes(size)
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		writers := make([]io.Writer, len(disks))
    		for i, disk := range disks {
    			if disk == OfflineDisk {
    				continue
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  6. cmd/erasure-decode_test.go

    		b.Fatalf("failed to create erasure test file: %v", err)
    	}
    
    	for i := 0; i < dataDown; i++ {
    		writers[i] = nil
    	}
    	for i := data; i < data+parityDown; i++ {
    		writers[i] = nil
    	}
    
    	b.ResetTimer()
    	b.SetBytes(size)
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		bitrotReaders := make([]io.ReaderAt, len(disks))
    		for index, disk := range disks {
    			if writers[index] == nil {
    				continue
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  7. src/bytes/bytes_test.go

    		name  string
    		input []byte
    	}{
    		{"Valid", []byte("typical")},
    		{"InvalidASCII", []byte("foo\xffbar")},
    		{"InvalidNonASCII", []byte("日本語\xff日本語")},
    	}
    	replacement := []byte("\uFFFD")
    	b.ResetTimer()
    	for _, test := range tests {
    		b.Run(test.name, func(b *testing.B) {
    			for i := 0; i < b.N; i++ {
    				ToValidUTF8(test.input, replacement)
    			}
    		})
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 19 19:09:04 UTC 2024
    - 61.2K bytes
    - Viewed (0)
  8. cmd/object-api-listobjects_test.go

    		_, err = obj.PutObject(context.Background(), bucket, key, mustGetPutObjReader(b, bytes.NewBufferString(key), int64(len(key)), "", ""), ObjectOptions{})
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    
    	b.ResetTimer()
    
    	// List the buckets over and over and over.
    	for i := 0; i < b.N; i++ {
    		_, err = obj.ListObjects(context.Background(), bucket, "", "obj9000", "", -1)
    		if err != nil {
    			b.Fatal(err)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 01 11:07:40 UTC 2024
    - 73.1K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg testing, method (*B) Fatalf(string, ...interface{})
    pkg testing, method (*B) Log(...interface{})
    pkg testing, method (*B) Logf(string, ...interface{})
    pkg testing, method (*B) ResetTimer()
    pkg testing, method (*B) SetBytes(int64)
    pkg testing, method (*B) StartTimer()
    pkg testing, method (*B) StopTimer()
    pkg testing, method (*T) Error(...interface{})
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top