- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for RunParallel (0.1 sec)
-
cmd/url_test.go
b.ReportAllocs() // the actual benchmark for PutObject starts here. Reset the benchmark timer. b.ResetTimer() if err := req.ParseForm(); err != nil { b.Fatal(err) } b.RunParallel(func(pb *testing.PB) { for pb.Next() { req.Form.Get("uploadId") } }) // Benchmark ends here. Stop timer. b.StopTimer() } // BenchmarkURLQuery - benchmark URL memory allocations
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 16 17:28:29 UTC 2021 - 2K bytes - Viewed (0) -
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/s3select/select_benchmark_test.go
<Enabled>FALSE</Enabled> </RequestProgress> </SelectObjectContentRequest> `) csvData := genSampleCSVData(count) b.ResetTimer() b.ReportAllocs() b.SetBytes(int64(count)) b.RunParallel(func(pb *testing.PB) { for pb.Next() { s3Select, err := NewS3Select(bytes.NewReader(requestXML)) if err != nil { b.Fatal(err) } if err = s3Select.Open(newBytesRSC(csvData)); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 14 13:54:47 UTC 2022 - 5K 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)