- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 193 for startTimer (0.17 sec)
-
src/sort/sort_test.go
for i := 0; i < b.N; i++ { copy(data, unsorted) b.StartTimer() Stable(StringSlice(data)) b.StopTimer() } } func BenchmarkSortInt1K(b *testing.B) { b.StopTimer() for i := 0; i < b.N; i++ { data := make([]int, 1<<10) for i := 0; i < len(data); i++ { data[i] = i ^ 0x2cc } b.StartTimer() Ints(data) b.StopTimer() } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 19:41:04 UTC 2024 - 16.9K bytes - Viewed (0) -
src/regexp/all_test.go
x := strings.Repeat("x", 50) + "y" b.StopTimer() re := MustCompile("y") b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { b.Fatalf("no match!") } } } func BenchmarkNotLiteral(b *testing.B) { x := strings.Repeat("x", 50) + "y" b.StopTimer() re := MustCompile(".y") b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { b.Fatalf("no match!")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 25.8K bytes - Viewed (0) -
src/encoding/json/bench_test.go
break } } panic("re-marshal code.json: different result") } } func BenchmarkCodeEncoder(b *testing.B) { b.ReportAllocs() if codeJSON == nil { b.StopTimer() codeInit() b.StartTimer() } b.RunParallel(func(pb *testing.PB) { enc := NewEncoder(io.Discard) for pb.Next() { if err := enc.Encode(&codeStruct); err != nil { b.Fatalf("Encode error: %v", err) } } })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 15:00:17 UTC 2024 - 12.5K bytes - Viewed (0) -
src/math/big/natconv_test.go
b.StopTimer() originalLeafSize := leafSize resetTable(cacheBase10.table[:]) leafSize = size b.StartTimer() for d := 1; d <= 10000; d *= 10 { b.StopTimer() var z nat z = z.expWW(Word(base), Word(d)) // build target number _ = z.utoa(base) // warm divisor cache b.StartTimer() for i := 0; i < b.N; i++ { _ = z.utoa(base) } } b.StopTimer()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 12:54:00 UTC 2019 - 16.8K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/pruning/algorithm_test.go
if err != nil { b.Fatal(err) } instances := make([]map[string]interface{}, 0, b.N) for i := 0; i < b.N; i++ { instances = append(instances, runtime.DeepCopyJSON(obj)) } b.StartTimer() for i := 0; i < b.N; i++ { Prune(instances[i], schema, true) } } func BenchmarkDeepCopy(b *testing.B) { b.StopTimer() b.ReportAllocs() var obj map[string]interface{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 20.3K bytes - Viewed (0) -
src/testing/benchmark.go
netAllocs uint64 netBytes uint64 // Extra metrics collected by ReportMetric. extra map[string]float64 } // StartTimer starts timing a test. This function is called automatically // before a benchmark starts, but it can also be used to resume timing after // a call to [B.StopTimer]. func (b *B) StartTimer() { if !b.timerOn { runtime.ReadMemStats(&memStats) b.startAllocs = memStats.Mallocs
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23.9K bytes - Viewed (0) -
platforms/ide/tooling-api/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiIntegrationTest.groovy
def startMarkerFile = projectDir.file("start.marker") def foundStartMarker = startMarkerFile.exists() CountdownTimer startTimer = Time.startCountdownTimer(startTimeoutMs) while (handle.running && !foundStartMarker) { if (startTimer.hasExpired()) { throw new Exception("timeout waiting for start marker") } else { sleep retryIntervalMs
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Sep 26 14:49:20 UTC 2023 - 13.8K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl-tooling-builders/src/main/kotlin/org/gradle/kotlin/dsl/tooling/builders/KotlinBuildScriptModelBuilder.kt
import org.gradle.internal.classpath.ClassPath import org.gradle.internal.classpath.DefaultClassPath import org.gradle.internal.resource.TextFileResourceLoader import org.gradle.internal.time.Time.startTimer import org.gradle.kotlin.dsl.* import org.gradle.kotlin.dsl.accessors.AccessorsClassPath import org.gradle.kotlin.dsl.accessors.ProjectAccessorsClassPathGenerator
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 02 11:06:08 UTC 2024 - 17.8K bytes - Viewed (0) -
src/runtime/slice_test.go
for i := 0; i < b.N; i++ { s = append(s[:0:length], make([]int, length)...) } SinkIntSlice = s }) } func BenchmarkAppend(b *testing.B) { b.StopTimer() x := make([]int, 0, N) b.StartTimer() for i := 0; i < b.N; i++ { x = x[0:0] for j := 0; j < N; j++ { x = append(x, j) } } } func BenchmarkAppendGrowByte(b *testing.B) { for i := 0; i < b.N; i++ { var x []byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 17 09:45:44 UTC 2020 - 10.3K bytes - Viewed (0) -
pkg/slices/slices_test.go
for i := 0; i < b.N; i++ { b.StopTimer() ss := makeRandomStructs(N) b.StartTimer() SortFunc(ss, cmpFunc) } }) b.Run("SortStableFunc", func(b *testing.B) { cmpFunc := func(a, b *myStruct) int { return a.n - b.n } for i := 0; i < b.N; i++ { b.StopTimer() ss := makeRandomStructs(N) b.StartTimer() SortStableFunc(ss, cmpFunc) } }) b.Run("SortBy", func(b *testing.B) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 18.2K bytes - Viewed (0)