Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for makeBenchString (0.13 sec)

  1. src/cmd/link/internal/benchmark/bench.go

    }
    
    // shouldPProf returns true if we should be doing pprof runs.
    func (m *Metrics) shouldPProf() bool {
    	return m != nil && len(m.filebase) > 0
    }
    
    // makeBenchString makes a benchmark string consumable by Go's benchmarking tools.
    func makeBenchString(name string) string {
    	needCap := true
    	ret := []rune("Benchmark")
    	for _, r := range name {
    		if unicode.IsSpace(r) {
    			needCap = true
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 30 18:10:36 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. src/cmd/link/internal/benchmark/bench_test.go

    		have, want string
    	}{
    		{"foo", "BenchmarkFoo"},
    		{"  foo  ", "BenchmarkFoo"},
    		{"foo bar", "BenchmarkFooBar"},
    	}
    	for i, test := range tests {
    		if v := makeBenchString(test.have); test.want != v {
    			t.Errorf("test[%d] makeBenchString(%q) == %q, want %q", i, test.have, v, test.want)
    		}
    	}
    }
    
    func TestPProfFlag(t *testing.T) {
    	tests := []struct {
    		name string
    		want bool
    	}{
    		{"", false},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 17 09:45:44 UTC 2020
    - 1.2K bytes
    - Viewed (0)
Back to top