Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 240 for startTimer (0.22 sec)

  1. src/sort/sort_slices_benchmark_test.go

    func BenchmarkSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		Sort(IntSlice(ints))
    	}
    }
    
    func BenchmarkSlicesSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		slices.Sort(ints)
    	}
    }
    
    func BenchmarkSortIsSorted(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 22:59:40 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/server/stats/DaemonRunningStats.java

    import org.gradle.internal.time.Timer;
    
    @ServiceScope(Scope.Global.class)
    public class DaemonRunningStats {
    
        private final long startTime = System.currentTimeMillis();
        private final Timer daemonTimer = Time.startTimer();
        private final Timer currentBuildTimer = Time.startTimer();
    
        private int buildCount;
        private long allBuildsTime;
    
        public int getBuildCount() {
            return buildCount;
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun May 05 22:23:18 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram_test.go

    				Name:      "testhist",
    				Help:      "Me",
    				Buckets:   []float64{1, 2, 4, 8, 16, 32},
    			},
    			1})
    	registry := compbasemetrics.NewKubeRegistry()
    	registry.MustRegister(th)
    	var x int
    	b.StartTimer()
    	for i := 0; i < b.N; i++ {
    		delta := (i % 6) + 1
    		now = now.Add(time.Duration(delta) * time.Millisecond)
    		clk.SetTime(now)
    		th.Set(float64(x))
    		x = (x + i) % 60
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 13 16:03:06 UTC 2022
    - 8.7K bytes
    - Viewed (0)
  4. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/Time.java

         * For the gory details, see {@link MonotonicClock}.
         *
         * For timing activities, where correlation with the current time is not required, use {@link #startTimer()}.
         */
        public static Clock clock() {
            return CLOCK;
        }
    
        /**
         * Replacement for System.currentTimeMillis(), based on {@link #clock()}.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. platforms/jvm/language-java/src/main/java/org/gradle/api/internal/tasks/compile/incremental/recomp/CurrentCompilationAccess.java

            this.classSetAnalyzer = classSetAnalyzer;
            this.buildOperationExecutor = buildOperationExecutor;
        }
    
        public ClassSetAnalysisData analyzeOutputFolder(File outputFolder) {
            Timer clock = Time.startTimer();
            ClassSetAnalysisData snapshot = classSetAnalyzer.analyzeOutputFolder(outputFolder);
            LOG.info("Class dependency analysis for incremental compilation took {}.", clock.getElapsed());
            return snapshot;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Aug 28 11:40:18 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. pilot/pkg/config/memory/store_test.go

    			},
    			Namespace: "ns",
    		},
    		Spec: &v1alpha3.ServiceEntry{
    			Hosts: []string{"www.foo.com"},
    		},
    	}
    	for n := 0; n < b.N; n++ {
    		b.StopTimer()
    		s := initStore(b)
    		b.StartTimer()
    		// update one thousand times
    		for i := 0; i < 1000; i++ {
    			cfg.Name = strconv.Itoa(i)
    			cfg.Spec.(*v1alpha3.ServiceEntry).Hosts[0] = cfg.Name
    			if _, err := s.Update(cfg); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 26 01:14:27 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  7. src/go/parser/performance_test.go

    		b.StopTimer()
    		fset := token.NewFileSet()
    		file, err := ParseFile(fset, "", src, SkipObjectResolution)
    		if err != nil {
    			b.Fatalf("benchmark failed due to parse error: %s", err)
    		}
    		b.StartTimer()
    		handle := fset.File(file.Package)
    		resolveFile(file, handle, nil)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 01 22:35:46 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  8. src/go/doc/testdata/benchmark.go

    	N         int
    	benchmark InternalBenchmark
    	bytes     int64
    	timerOn   bool
    	result    BenchmarkResult
    }
    
    // StartTimer starts timing a test. This function is called automatically
    // before a benchmark starts, but it can also used to resume timing after
    // a call to StopTimer.
    func (b *B) StartTimer() {
    	if !b.timerOn {
    		b.start = time.Now()
    		b.timerOn = true
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  9. src/runtime/netpoll_os_test.go

    package runtime_test
    
    import (
    	"runtime"
    	"sync"
    	"testing"
    )
    
    var wg sync.WaitGroup
    
    func init() {
    	runtime.NetpollGenericInit()
    }
    
    func BenchmarkNetpollBreak(b *testing.B) {
    	b.StartTimer()
    	for i := 0; i < b.N; i++ {
    		for j := 0; j < 10; j++ {
    			wg.Add(1)
    			go func() {
    				runtime.NetpollBreak()
    				wg.Done()
    			}()
    		}
    	}
    	wg.Wait()
    	b.StopTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 520 bytes
    - Viewed (0)
  10. src/go/doc/testdata/testing.0.golden

    	func (b *B) ResetTimer()
    
    	// SetBytes records the number of bytes processed in a single ...
    	func (b *B) SetBytes(n int64)
    
    	// StartTimer starts timing a test. This function is called ...
    	func (b *B) StartTimer()
    
    	// StopTimer stops timing a test. This can be used to pause the ...
    	func (b *B) StopTimer()
    
    	// The results of a benchmark run. 
    	type BenchmarkResult struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4.1K bytes
    - Viewed (0)
Back to top