Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 338 for setTypes (0.18 sec)

  1. internal/bucket/bandwidth/monitor_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalBucketBandwidthReport(b *testing.B) {
    	v := BucketBandwidthReport{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. cmd/tier-last-day-stats_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalDailyAllTierStats(b *testing.B) {
    	v := DailyAllTierStats{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. src/runtime/memmove_test.go

    		y := buf[len(buf)/2:]
    		for _, off := range []int{0, 1, 4, 7} {
    			b.Run(fmt.Sprint("f_", n, off), func(b *testing.B) {
    				b.SetBytes(int64(n))
    				for i := 0; i < b.N; i++ {
    					copy(x[off:n+off], y[off:n+off])
    				}
    			})
    
    			b.Run(fmt.Sprint("b_", n, off), func(b *testing.B) {
    				b.SetBytes(int64(n))
    				for i := 0; i < b.N; i++ {
    					copy(y[off:n+off], x[off:n+off])
    				}
    			})
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:12 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. src/go/parser/performance_test.go

    		panic(err)
    	}
    	return data
    }
    
    func BenchmarkParse(b *testing.B) {
    	b.SetBytes(int64(len(src)))
    	for i := 0; i < b.N; i++ {
    		if _, err := ParseFile(token.NewFileSet(), "", src, ParseComments); err != nil {
    			b.Fatalf("benchmark failed due to parse error: %s", err)
    		}
    	}
    }
    
    func BenchmarkParseOnly(b *testing.B) {
    	b.SetBytes(int64(len(src)))
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 01 22:35:46 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  5. src/encoding/binary/binary_test.go

    }
    
    func BenchmarkPutUint16(b *testing.B) {
    	b.SetBytes(2)
    	for i := 0; i < b.N; i++ {
    		BigEndian.PutUint16(putbuf[:2], uint16(i))
    	}
    }
    
    func BenchmarkAppendUint16(b *testing.B) {
    	b.SetBytes(2)
    	for i := 0; i < b.N; i++ {
    		putbuf = BigEndian.AppendUint16(putbuf[:0], uint16(i))
    	}
    }
    
    func BenchmarkPutUint32(b *testing.B) {
    	b.SetBytes(4)
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. internal/config/cache/remote_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalCondCheck(b *testing.B) {
    	v := CondCheck{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Nov 22 21:46:17 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/expr.go

    	if t == nil || r.Type() == nil {
    		n.SetType(nil)
    		return n
    	}
    	switch t.Kind() {
    	default:
    		base.Errorf("invalid operation: %v (type %v does not support indexing)", n, t)
    		n.SetType(nil)
    		return n
    
    	case types.TSTRING, types.TARRAY, types.TSLICE:
    		n.Index = indexlit(n.Index)
    		if t.IsString() {
    			n.SetType(types.ByteType)
    		} else {
    			n.SetType(t.Elem())
    		}
    		why := "string"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. cmd/metrics-v2_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalMetricDescription(b *testing.B) {
    	v := MetricDescription{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Mar 10 09:15:15 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  9. src/crypto/internal/nistec/nistec_test.go

    			if _, err := nistec.NewP521Point().SetBytes(out); err != nil {
    				t.Fatal(err)
    			}
    			out = p.BytesCompressed()
    			if _, err := p.SetBytes(out); err != nil {
    				t.Fatal(err)
    			}
    		}); allocs > 0 {
    			t.Errorf("expected zero allocations, got %0.1f", allocs)
    		}
    	})
    }
    
    type nistPoint[T any] interface {
    	Bytes() []byte
    	SetGenerator() T
    	SetBytes([]byte) (T, error)
    	Add(T, T) T
    	Double(T) T
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 12 18:48:23 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  10. src/crypto/elliptic/nistec.go

    	byteLen := (curve.params.BitSize + 7) / 8
    	x = new(big.Int).SetBytes(data[1 : 1+byteLen])
    	y = new(big.Int).SetBytes(data[1+byteLen:])
    	return x, y
    }
    
    func (curve *nistCurve[Point]) UnmarshalCompressed(data []byte) (x, y *big.Int) {
    	if len(data) == 0 || (data[0] != 2 && data[0] != 3) {
    		return nil, nil
    	}
    	p, err := curve.newPoint().SetBytes(data)
    	if err != nil {
    		return nil, nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 16:19:34 UTC 2022
    - 9.6K bytes
    - Viewed (0)
Back to top