Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for benchmarkRead (0.3 sec)

  1. src/crypto/rand/rand_test.go

    	}
    	n, err = Reader.Read(nil)
    	if n != 0 || err != nil {
    		t.Fatalf("Read(nil) = %d, %v", n, err)
    	}
    }
    
    func BenchmarkRead(b *testing.B) {
    	b.Run("32", func(b *testing.B) {
    		benchmarkRead(b, 32)
    	})
    	b.Run("4K", func(b *testing.B) {
    		benchmarkRead(b, 4<<10)
    	})
    }
    
    func benchmarkRead(b *testing.B, size int) {
    	b.SetBytes(int64(size))
    	buf := make([]byte, size)
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 20:02:21 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  2. src/encoding/csv/reader_test.go

    "x","y","z",""
    "x","y","",""
    "x","","",""
    "","","",""
    `
    
    func BenchmarkRead(b *testing.B) {
    	benchmarkRead(b, nil, benchmarkCSVData)
    }
    
    func BenchmarkReadWithFieldsPerRecord(b *testing.B) {
    	benchmarkRead(b, func(r *Reader) { r.FieldsPerRecord = 4 }, benchmarkCSVData)
    }
    
    func BenchmarkReadWithoutFieldsPerRecord(b *testing.B) {
    	benchmarkRead(b, func(r *Reader) { r.FieldsPerRecord = -1 }, benchmarkCSVData)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 14 04:25:13 UTC 2022
    - 19.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope_test.go

    	benchmarkRead(b, envelopeTransformer, 1024)
    }
    
    func BenchmarkAESCBCRead(b *testing.B) {
    	block, err := aes.NewCipher(bytes.Repeat([]byte("a"), 32))
    	if err != nil {
    		b.Fatal(err)
    	}
    
    	aesCBCTransformer := aestransformer.NewCBCTransformer(block)
    	benchmarkRead(b, aesCBCTransformer, 1024)
    }
    
    func BenchmarkEnvelopeGCMRead(b *testing.B) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 14:23:50 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  4. src/log/slog/internal/benchmarks/benchmarks.go

    //
    // These benchmarks are loosely based on github.com/uber-go/zap/benchmarks.
    // They have the following desirable properties:
    //
    //   - They test a complete log event, from the user's call to its return.
    //
    //   - The benchmarked code is run concurrently in multiple goroutines, to
    //     better simulate a real server (the most common environment for structured
    //     logs).
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 25 12:14:46 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. pkg/api/testing/serialization_test.go

    			t.Fatalf("%s: did not match after frame decoding: %s", info.MediaType, cmp.Diff(secret, outEvent.Object.Object))
    		}
    	}
    }
    
    const benchmarkSeed = 100
    
    func benchmarkItems(b *testing.B) []v1.Pod {
    	apiObjectFuzzer := fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(benchmarkSeed), legacyscheme.Codecs)
    	items := make([]v1.Pod, 10)
    	for i := range items {
    		var pod api.Pod
    		apiObjectFuzzer.Fuzz(&pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 11:04:08 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  6. pkg/api/testing/conversion_test.go

    	"k8s.io/kubernetes/pkg/api/legacyscheme"
    	api "k8s.io/kubernetes/pkg/apis/core"
    )
    
    func BenchmarkPodConversion(b *testing.B) {
    	apiObjectFuzzer := fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(benchmarkSeed), legacyscheme.Codecs)
    	items := make([]api.Pod, 4)
    	for i := range items {
    		apiObjectFuzzer.Fuzz(&items[i])
    		items[i].Spec.InitContainers = nil
    		items[i].Status.InitContainerStatuses = nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 30 06:49:09 UTC 2021
    - 3.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

    import com.google.common.collect.Sets;
    import java.util.Map;
    import java.util.Random;
    import java.util.Set;
    import junit.framework.TestCase;
    
    /**
     * Tests that the different algorithms benchmarked in {@link QuantilesBenchmark} are actually all
     * returning more-or-less the same answers.
     */
    public class QuantilesAlgorithmTest extends TestCase {
    
      private static final Random RNG = new Random(82674067L);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  8. src/log/slog/internal/benchmarks/benchmarks_test.go

    	"testing"
    )
    
    func init() {
    	flag.BoolVar(&internal.IgnorePC, "nopc", false, "do not invoke runtime.Callers")
    }
    
    // We pass Attrs inline because it affects allocations: building
    // up a list outside of the benchmarked code and passing it in with "..."
    // reduces measured allocations.
    
    func BenchmarkAttrs(b *testing.B) {
    	ctx := context.Background()
    	for _, handler := range []struct {
    		name     string
    		h        slog.Handler
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 04 18:32:54 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	nSwitchStmt
    	nTypeAssertExpr
    	nTypeSpec
    	nTypeSwitchStmt
    	nUnaryExpr
    	nValueSpec
    )
    
    // typeOf returns a distinct single-bit value that represents the type of n.
    //
    // Various implementations were benchmarked with BenchmarkNewInspector:
    //
    //	                                                                GOGC=off
    //	- type switch					4.9-5.5ms	2.1ms
    //	- binary search over a sorted list of types	5.5-5.9ms	2.5ms
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    	"k8s.io/apimachinery/pkg/util/uuid"
    	"k8s.io/apiserver/pkg/features"
    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    	featuregatetesting "k8s.io/component-base/featuregate/testing"
    )
    
    const benchmarkSeed = 100
    
    func TestSerializeObjectParallel(t *testing.T) {
    	largePayload := bytes.Repeat([]byte("0123456789abcdef"), defaultGzipThresholdBytes/16+1)
    	type test struct {
    		name string
    
    		mediaType  string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
Back to top