OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |