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

Issue 96910043: code review 96910043: testing: RunParallel and SetParallelism are misleading. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 12 months ago by btracey
Modified:
9 years, 11 months ago
CC:
dvyukov, josharian
Visibility:
Public.

Description

testing: RunParallel and SetParallelism are misleading. RunParallel actually executes benchmarks concurrently, and SetParallelism controls the level of concurrency (-cpu sets the level of parallelism). This cl changes these names to RunConcurrent and SetConcurrency respectively, and improves the description of RunParallel. It adds two example benchmarks to RunParallel in order to hilight when to and not to use it. Lastly, this CL modifies the rest of the source tree files that call RunParallel and SetParallelism so that ./all.bash passes. Aside from the renaming, no functional lines have been changed. Fixes issue 7433.

Patch Set 1 #

Patch Set 2 : diff -r 7f529f73708a http://code.google.com/p/go #

Patch Set 3 : diff -r 7f529f73708a http://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -61 lines) Patch
M src/pkg/fmt/fmt_test.go View 1 7 chunks +7 lines, -7 lines 0 comments Download
M src/pkg/math/big/nat_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/http/serve_test.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/net/rpc/server_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/chan_test.go View 1 8 chunks +8 lines, -8 lines 0 comments Download
M src/pkg/runtime/mfinal_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/norace_test.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/proc_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/sync/mutex_test.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/sync/once_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/sync/pool_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/sync/runtime_sema_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/sync/rwmutex_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/sync/waitgroup_test.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/testing/benchmark.go View 1 6 chunks +19 lines, -16 lines 0 comments Download
M src/pkg/testing/benchmark_test.go View 1 5 chunks +79 lines, -7 lines 0 comments Download
M src/pkg/time/sleep_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4
btracey
Hello golang-codereviews@googlegroups.com (cc: dvyukov@google.com, josharian@gmail.com), I'd like you to review this change to http://code.google.com/p/go
9 years, 12 months ago (2014-04-29 23:13:21 UTC) #1
minux1
why change the names? i've read the discussion (on both ML and issue tracker), but ...
9 years, 12 months ago (2014-04-30 01:38:34 UTC) #2
rh
On 2014/04/30 01:38:34, minux wrote: > why change the names? > > i've read the ...
9 years, 12 months ago (2014-05-02 12:00:58 UTC) #3
minux1
9 years, 12 months ago (2014-05-02 18:26:31 UTC) #4
On May 2, 2014 8:00 AM, <robert.hencke@gmail.com> wrote:
>
> On 2014/04/30 01:38:34, minux wrote:
>>
>> why change the names?
>
>
>> i've read the discussion (on both ML and issue tracker), but i don't
>
> think
>>
>> we've reached concensus yet. esp. 1.3beta1 has already been released,
>
> we
>>
>> should be extremely careful doing any breaking changes.
>
>
> I think the name change makes sense.  The Go documentation I have read
> seems to be very careful with its use of parallel and concurrent, and
> the Go blog itself features
> http://blog.golang.org/concurrency-is-not-parallelism.  I'd rather have
> a breaking change now before these names are set in stone for the
> foreseeable future.  FWIW.
the problem is that the code really want to do parallel benchmark, not just
concurrent benchmark.

naming it concurrent might be technically correct for some cases, but that
misses the whole point of parallel benchmarking (where you want to see what
your program will behave when there are contentions, for example).

as rob said on the issue tracker, the original docs is fine as is. (it even
mentions you need to set -cpu or set GOMAXPROCS to actually have
parallelism).

not lgtm, at least for the renaming part.
Sign in to reply to this message.

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