- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for RunParallel (0.06 sec)
-
internal/dsync/dsync_test.go
} for i := 0; i < 10; i++ { <-c } } func BenchmarkMutexUncontended(b *testing.B) { b.ResetTimer() b.ReportAllocs() type PaddedMutex struct { *DRWMutex } b.RunParallel(func(pb *testing.PB) { mu := PaddedMutex{NewDRWMutex(ds, "")} for pb.Next() { mu.Lock(id, source) mu.Unlock(context.Background()) } }) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:35:19 UTC 2024 - 11.1K bytes - Viewed (0) -
internal/grid/benchmark_test.go
defer cancel() b.ReportAllocs() b.SetBytes(int64(len(payload) * 2)) b.ResetTimer() t := time.Now() var ops int64 var lat int64 b.SetParallelism(par) b.RunParallel(func(pb *testing.PB) { rng := rand.New(rand.NewSource(time.Now().UnixNano())) n := 0 var latency int64 managers := grid.Managers hosts := grid.Hosts for pb.Next() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/jwt_test.go
b.Fatal(err) } creds := globalActiveCred token, err := authenticateNode(creds.AccessKey, creds.SecretKey) if err != nil { b.Fatal(err) } b.ResetTimer() b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { err = xjwt.ParseWithStandardClaims(token, xjwt.NewStandardClaims(), []byte(creds.SecretKey)) if err != nil { b.Fatal(err) } } }) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/cachevalue/cache_test.go
cache := New[time.Time]() cache.InitOnce(1*time.Millisecond, Opts{}, func(ctx context.Context) (time.Time, error) { return time.Now(), nil }, ) b.ReportAllocs() b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { cache.Get() } })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 2.7K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
mu.Lock(id, source) mu.RUnlock(context.Background()) } // Borrowed from rwmutex_test.go func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) { b.ResetTimer() b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { foo := 0 for pb.Next() { rwm := NewDRWMutex(ds, "test") foo++ if foo%writeRatio == 0 { rwm.Lock(id, source) rwm.Unlock(context.Background()) } else {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
cmd/benchmark-utils_test.go
// benchmark utility which helps obtain number of allocations and bytes allocated per ops. b.ReportAllocs() // the actual benchmark for PutObject starts here. Reset the benchmark timer. b.ResetTimer() b.RunParallel(func(pb *testing.PB) { i := 0 for pb.Next() { // insert the object. objInfo, err := obj.PutObject(context.Background(), bucket, "object"+strconv.Itoa(i),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Dec 23 15:46:00 UTC 2022 - 8.2K bytes - Viewed (0) -
cmd/format-erasure_test.go
b.ResetTimer() b.ReportAllocs() fsDirs, err := getRandomDisks(nDisks) if err != nil { b.Fatal(err) } endpoints := mustGetNewEndpoints(0, 16, fsDirs...) b.RunParallel(func(pb *testing.PB) { endpoints := endpoints for pb.Next() { initStorageDisksWithErrors(endpoints, storageOpts{cleanUp: false, healthCheck: false}) } })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Apr 15 08:25:46 UTC 2024 - 12.9K bytes - Viewed (0) -
src/archive/zip/writer_test.go
// Run once and then reset the timer. // This effectively discards the very large initial flate setup cost, // as well as the initialization of bigBuf. runOnce(&bytes.Buffer{}) b.ResetTimer() b.RunParallel(func(pb *testing.PB) { var buf bytes.Buffer for pb.Next() { runOnce(&buf) } }) } func writeTestsToFS(tests []WriteTest) fs.FS { fsys := fstest.MapFS{} for _, wt := range tests {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
src/archive/zip/zip_test.go
testZip64(b, 1<<26) } } func BenchmarkZip64TestSizes(b *testing.B) { for _, size := range []int64{1 << 12, 1 << 20, 1 << 26} { b.Run(fmt.Sprint(size), func(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { testZip64(b, size) } }) }) } } func TestSuffixSaver(t *testing.T) { const keep = 10 ss := &suffixSaver{keep: keep}
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0)