Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for benchtime (0.14 sec)

  1. src/cmd/go/testdata/script/test_benchmark_1x.txt

    # Test that -benchtime 1x only runs a total of 1 loop iteration.
    # See golang.org/issue/32051.
    
    go test -run ^$ -bench . -benchtime 1x
    
    -- go.mod --
    module bench
    
    go 1.16
    -- x_test.go --
    package bench
    
    import (
    	"fmt"
    	"os"
    	"testing"
    )
    
    var called = false
    
    func TestMain(m *testing.M) {
    	m.Run()
    	if !called {
    		fmt.Println("benchmark never called")
    		os.Exit(1)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 21:46:33 UTC 2021
    - 532 bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/test_cache_inputs.txt

    go test testcache -run=ExternalFile
    stdout '\(cached\)'
    
    # The -benchtime flag without -bench should not affect caching.
    go test testcache -run=Benchtime -benchtime=1x
    go test testcache -run=Benchtime -benchtime=1x
    stdout '\(cached\)'
    
    go test testcache -run=Benchtime -bench=Benchtime -benchtime=1x
    go test testcache -run=Benchtime -bench=Benchtime -benchtime=1x
    ! stdout '\(cached\)'
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 22:23:53 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. src/testing/benchmark.go

    	}()
    
    	// Run the benchmark for at least the specified amount of time.
    	if b.benchTime.n > 0 {
    		// We already ran a single iteration in run1.
    		// If -benchtime=1x was requested, use that result.
    		// See https://golang.org/issue/32051.
    		if b.benchTime.n > 1 {
    			b.runN(b.benchTime.n)
    		}
    	} else {
    		d := b.benchTime.d
    		for n := int64(1); !b.failed && b.duration < d && n < 1e9; {
    			last := n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  4. hack/jenkins/benchmark-dockerized.sh

    ./hack/install-etcd.sh
    
    # Run the benchmark tests and pretty-print the results into a separate file.
    # Log output of the tests go to stderr.
    make test-integration WHAT="$*" KUBE_TEST_ARGS="-run='XXX' -bench=${TEST_PREFIX:-.} -benchtime=${BENCHTIME:-1s} -benchmem  -data-items-dir=${ARTIFACTS}" \
      | (go run test/integration/benchmark/extractlog/main.go) \
      | tee \
       >(prettybench -no-passthrough > "${ARTIFACTS}/BenchmarkResults.txt") \
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 02 22:40:10 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  5. src/go/doc/testdata/benchmark.go

    			runtime.GOMAXPROCS(procs)
    			b := &B{
    				common: common{
    					signal: make(chan any),
    				},
    				benchmark: Benchmark,
    			}
    			benchName := Benchmark.Name
    			if procs != 1 {
    				benchName = fmt.Sprintf("%s-%d", Benchmark.Name, procs)
    			}
    			fmt.Printf("%s\t", benchName)
    			r := b.run()
    			if b.failed {
    				// The output could be very long here, but probably isn't.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  6. hack/benchmark-go.sh

    set -o errexit
    set -o nounset
    set -o pipefail
    
    make test \
        WHAT="$*" \
        KUBE_COVER="" \
        KUBE_RACE=" " \
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 27 02:13:09 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/goflags.txt

    env GO111MODULE=off
    
    # GOFLAGS sets flags for commands
    
    env GOFLAGS='-e -f={{.Dir}} --test.benchtime=1s -count=10'
    go list asdfasdfasdf  # succeeds because of -e
    go list runtime
    stdout '[\\/]runtime$'
    
    env GOFLAGS=-race OLDGOARCH=$GOARCH OLDGOOS=$GOOS GOARCH=386 GOOS=linux
    ! go list runtime
    stderr 'race is not supported on linux/386'
    
    env GOARCH=$OLDGOARCH GOOS=$OLDGOOS
    
    # go env succeeds even though -f={{.Dir}} is inappropriate
    go env
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 16:47:27 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  8. src/cmd/go/internal/test/flagdefs.go

    package test
    
    // passFlagToTest contains the flags that should be forwarded to
    // the test binary with the prefix "test.".
    var passFlagToTest = map[string]bool{
    	"bench":                true,
    	"benchmem":             true,
    	"benchtime":            true,
    	"blockprofile":         true,
    	"blockprofilerate":     true,
    	"count":                true,
    	"coverprofile":         true,
    	"cpu":                  true,
    	"cpuprofile":           true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 01:02:40 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. test/fixedbugs/bug369.dir/main.go

    	}
    }
    
    func BenchmarkSlowNonASCII(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		slow.NonASCII(buf, 0)
    	}
    }
    
    func main() {
    	testing.Init()
    	os.Args = []string{os.Args[0], "-test.benchtime=100ms"}
    	flag.Parse()
    
    	rslow := testing.Benchmark(BenchmarkSlowNonASCII)
    	rfast := testing.Benchmark(BenchmarkFastNonASCII)
    	tslow := rslow.NsPerOp()
    	tfast := rfast.NsPerOp()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 19:54:30 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  10. src/cmd/go/testdata/script/test_regexps.txt

    ! stdout  '^    z_test.go:18: LOG: XX running N=\d\d+'
    ! stdout 'BenchmarkXX\s+\d+'
    
    # BenchmarkX/Y is run in full twice due to -count=2.
    # "Run in full" means that it runs for approximately the default benchtime,
    # but may cap out at N=1e9.
    # We don't actually care what the final iteration count is, but it should be
    # a large number, and the last iteration count prints right before the results.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 17 13:25:29 UTC 2020
    - 1.9K bytes
    - Viewed (0)
Back to top