Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkNewTask (0.19 sec)

  1. src/runtime/trace/annotation_test.go

    	ctx, task := NewTask(context.Background(), "benchmark")
    	defer task.End()
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			StartRegion(ctx, "region").End()
    		}
    	})
    }
    
    func BenchmarkNewTask(b *testing.B) {
    	b.ReportAllocs()
    	pctx, task := NewTask(context.Background(), "benchmark")
    	defer task.End()
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			_, task := NewTask(pctx, "task")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 16:44:47 UTC 2024
    - 721 bytes
    - Viewed (0)
Back to top