Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1235)

Side by Side Diff: src/pkg/runtime/proc_test.go

Issue 96910043: code review 96910043: testing: RunParallel and SetParallelism are misleading. (Closed)
Patch Set: diff -r 7f529f73708a http://code.google.com/p/go Created 9 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/norace_test.go ('k') | src/pkg/sync/mutex_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package runtime_test 5 package runtime_test
6 6
7 import ( 7 import (
8 "math" 8 "math"
9 "runtime" 9 "runtime"
10 "sync/atomic" 10 "sync/atomic"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 func TestSchedLocalQueue(t *testing.T) { 364 func TestSchedLocalQueue(t *testing.T) {
365 runtime.TestSchedLocalQueue1() 365 runtime.TestSchedLocalQueue1()
366 } 366 }
367 367
368 func TestSchedLocalQueueSteal(t *testing.T) { 368 func TestSchedLocalQueueSteal(t *testing.T) {
369 runtime.TestSchedLocalQueueSteal1() 369 runtime.TestSchedLocalQueueSteal1()
370 } 370 }
371 371
372 func benchmarkStackGrowth(b *testing.B, rec int) { 372 func benchmarkStackGrowth(b *testing.B, rec int) {
373 » b.RunParallel(func(pb *testing.PB) { 373 » b.RunConcurrent(func(pb *testing.PB) {
374 for pb.Next() { 374 for pb.Next() {
375 stackGrowthRecursive(rec) 375 stackGrowthRecursive(rec)
376 } 376 }
377 }) 377 })
378 } 378 }
379 379
380 func BenchmarkStackGrowth(b *testing.B) { 380 func BenchmarkStackGrowth(b *testing.B) {
381 benchmarkStackGrowth(b, 10) 381 benchmarkStackGrowth(b, 10)
382 } 382 }
383 383
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 for k := k0; k < k1; k++ { 467 for k := k0; k < k1; k++ {
468 C[i][j] += A[i][k] * B[k][j] 468 C[i][j] += A[i][k] * B[k][j]
469 } 469 }
470 } 470 }
471 } 471 }
472 } 472 }
473 if done != nil { 473 if done != nil {
474 done <- struct{}{} 474 done <- struct{}{}
475 } 475 }
476 } 476 }
OLDNEW
« no previous file with comments | « src/pkg/runtime/norace_test.go ('k') | src/pkg/sync/mutex_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b