Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 59 of 59 for ReportAllocs (0.13 sec)

  1. internal/s3select/csv/reader_contrib_test.go

    	}
    	f := openTestFile(b, "nyc-taxi-data-100k.csv")
    	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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 38.5K bytes
    - Viewed (0)
  2. src/archive/zip/writer_test.go

    		zw := NewWriter(buf)
    		for j := 0; j < 3; j++ {
    			w, _ := zw.CreateHeader(&FileHeader{
    				Name:   "foo",
    				Method: Deflate,
    			})
    			w.Write(bigBuf)
    		}
    		zw.Close()
    	}
    
    	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()
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Sep 23 14:32:33 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. src/bytes/buffer_test.go

    		b.Run(fmt.Sprintf("N%d", n), func(b *testing.B) {
    			b.ReportAllocs()
    			for i := 0; i < b.N; i++ {
    				var bb Buffer
    				for bb.Len() < n {
    					bb.Write(block)
    				}
    			}
    		})
    	}
    }
    
    func BenchmarkBufferAppendNoCopy(b *testing.B) {
    	var bb Buffer
    	bb.Grow(16 << 20)
    	b.SetBytes(int64(bb.Available()))
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		bb.Reset()
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Sep 03 20:55:15 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. src/archive/tar/tar_test.go

    			[]byte("hello"),
    		}},
    	}}
    
    	b.Run("Writer", func(b *testing.B) {
    		for _, v := range vectors {
    			b.Run(v.label, func(b *testing.B) {
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    					// Writing to io.Discard because we want to
    					// test purely the writer code and not bring in disk performance into this.
    					tw := NewWriter(io.Discard)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jul 25 00:25:45 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  5. cmd/erasure-encode_test.go

    	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. src/bufio/bufio_test.go

    	r := strings.NewReader("       foo       foo        42        42        42        42        42        42        42        42       4.2       4.2       4.2       4.2\n")
    	buf := NewReader(r)
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		r.Seek(0, io.SeekStart)
    		buf.Reset(r)
    
    		_, err := buf.ReadString('\n')
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  7. cmd/erasure-decode_test.go

    	}
    
    	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)
  8. src/bytes/bytes_test.go

    func BenchmarkFields(b *testing.B) {
    	for _, sd := range bytesdata {
    		b.Run(sd.name, func(b *testing.B) {
    			for j := 1 << 4; j <= 1<<20; j <<= 4 {
    				b.Run(fmt.Sprintf("%d", j), func(b *testing.B) {
    					b.ReportAllocs()
    					b.SetBytes(int64(j))
    					data := sd.data[:j]
    					for i := 0; i < b.N; i++ {
    						Fields(data)
    					}
    				})
    			}
    		})
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 19 19:09:04 UTC 2024
    - 61.2K bytes
    - Viewed (0)
  9. api/go1.1.txt

    pkg syscall, type RawSockaddrInet6 struct, Scope_id uint32
    pkg testing, func AllocsPerRun(int, func()) float64
    pkg testing, func Verbose() bool
    pkg testing, method (*B) ReportAllocs()
    pkg testing, method (*B) Skip(...interface{})
    pkg testing, method (*B) SkipNow()
    pkg testing, method (*B) Skipf(string, ...interface{})
    pkg testing, method (*B) Skipped() bool
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 2.6M bytes
    - Viewed (0)
Back to top